Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot compile click linux module #200

Open
nikhildps opened this issue Jul 8, 2015 · 3 comments
Open

Cannot compile click linux module #200

nikhildps opened this issue Jul 8, 2015 · 3 comments

Comments

@nikhildps
Copy link

I am trying to compile the click linux module on ubuntu set up on virtual box

but i am getting the error:

Your Linux kernel header files cause errors when included by a C++ program.

Click modifies the Linux kernel's header files to make them work with
C++, using the program 'linuxmodule/fixincludes.pl'. It looks like
your kernel header files have features that 'linuxmodule/fixincludes.pl'
doesn't know how to fix. You can report this error to us on the Click
mailing list, or, even better, try to fix the error. See the config.log
file for more information on the error.

I tried to run the following command
sudo ./configure --with-linux=/usr/src/linux-headers-3.16.0-30-generic --with-linux-map=/boot/System.map-3.16.0-30-generic --enable-linuxmodule

and based on devious posts I also do ln -s ../generated/autoconf.h inside /usr/src/linux-headers-3.16.0-30-generic/include/linux.

Please help me

@tbarbette
Copy link
Collaborator

Did you also merged the headers-common with headers-amd64 (or other arch-specific folder) before the ln -s autoconf.h ?

mkdir /usr/src/linux-headers-merged/
cp -r /usr/src/linux-headers--common/ /usr/src/linux-headers-merged/
cp -r /usr/src/linux-headers--amd64/ /usr/src/linux-headers-merged/
then the ln -s.
And use the linux-headers-merged as the --with-linux path

I also have a problem which appeared recently with proclikefs during make, solved by doing :
sed -i 's/d_u.d_child/d_child/' linuxmodule/proclikefs.c
And have another make error corrected by adding this line in include/click-linuxmodule/include0/asm/barrier.h :
#define alternative(oldinstr, newinstr, feature)
asm volatile (ALTERNATIVE(oldinstr, newinstr, feature) : : : "memory");

@yahyaezzeldin
Copy link

I have the same problem, but even doing this linking, it isn't fixed.
It still says the same

Your Linux kernel header files cause errors when included by a C++ program.

Click modifies the Linux kernel's header files to make them work with
C++, using the program 'linuxmodule/fixincludes.pl'. It looks like
your kernel header files have features that 'linuxmodule/fixincludes.pl'
doesn't know how to fix. You can report this error to us on the Click
mailing list, or, even better, try to fix the error. See the config.log
file for more information on the error.

Ubuntu has only linux-headers-3.16.0-30-generic folder with no arch-specific folder.

@wtao0221
Copy link

wtao0221 commented Jun 2, 2017

@yahyaezzeldin I come into the same problem, do you fix it now?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants