3

I'm learning how to compile the Linux kernel on Ubuntu. Following step by step, I encountered errors like this. There is no problem until

$ sudo make menuconfig

but sudo make doesn't work. I installed these libs.

sudo apt-get install libncurses5-dev
sudo apt-get install libssl-dev
sudo apt-get install libelf-dev
sudo apt-get install flex
sudo apt-get install bison

How can I include this header file?

drivers/gpu/drm/nouveau/nvkm/subdev/i2c/base.c:25:10: fatal error: aux.h: No such file or directory
25 | #include "aux.h"

enter image description here

  • Stack Overflow discourages using a screenshot of text. Please, replace the screenshot in your question with a text demonstrated by that screenshot: copy paste the output into the question post and format it with `Ctrl+K` or `{}` button. – Tsyvarev Nov 13 '20 at 08:40
  • Okay, I changed it. but it was not possible to copy and paste the code since the os is running by a virtual box. I've tried to copy them, but there might be a different stack –  Nov 13 '20 at 10:45

2 Answers2

1

The aux.h file should be in the directory drivers/gpu/drm/nouveau/nvkm/subdev/i2c, you can go to the path to check whether there is the file and if not, you can redownload it.

zhangxaochen
  • 32,744
  • 15
  • 77
  • 108
  • I've searched that aux.h is a kind of library in glaux.h. So I downloaded it and moved to the destination folder. In i2c, there are some kinds of the c files, but the operation to move GLAUX.H to the folder is not permitted. –  Nov 13 '20 at 10:49
  • @Sonak: You need exactly `aux.h` file (not `glaux.h`). That file should exist in the Linux source tree at the exact path as stated in the answer. Absence of the file means that your Linux source tree is corrupted. You may try to re-download this source tree as whole, or download a single file and copy it to the required location. As you use `sudo` in operations for building the kernel, it may be required for copy files too. – Tsyvarev Nov 13 '20 at 12:18
  • You were right. There was no aux. h file at there. I downloaded the Linux kernel 5.9.1.tar.gz. at here. https://mirrors.edge.kernel.org/pub/linux/kernel/v5.x/ I've tried 5.9.1 and 5.9.8, but both cases gave me the same result. I extracted the kernel but there was no aux.h file. Does this file have a problem or maybe the way I extract the files? I used extraction cmd. –  Nov 17 '20 at 07:53
  • I tried linux-5.9.8.tar.gz and it includes the aux.h file. You can use tar -zxvf linux-5.9.8.tar.gz command to extra the tar.gz file. – zhangxaochen Nov 17 '20 at 08:45
0

You said you are using a Virtual Machine, so I assume Windows is your host. Windows doesn't allow files name aux*, but there are ways around it, e.g rename in WSL or cygwin... and perhaps a virtual machine will work too. See here for more information:

https://superuser.com/questions/206423/windows-7-can-not-rename-a-file-to-aux-svg-the-specified-device-name-is-inva

Samuel
  • 8,063
  • 8
  • 45
  • 41