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

Error making - code model kernel does not support PIC mode #10

Open
ctgreybeard opened this issue May 6, 2018 · 4 comments
Open

Error making - code model kernel does not support PIC mode #10

ctgreybeard opened this issue May 6, 2018 · 4 comments

Comments

@ctgreybeard
Copy link

When attempting to make the module I get:

make -C /lib/modules/4.15.0-20-generic/build M=/home/bill/Projects/intel_nuc_led modules
make[1]: Entering directory '/usr/src/linux-headers-4.15.0-20-generic'
  CC [M]  /home/bill/Projects/intel_nuc_led/nuc_led.o
cc1: error: code model kernel does not support PIC mode
scripts/Makefile.build:339: recipe for target '/home/bill/Projects/intel_nuc_led/nuc_led.o' failed
make[2]: *** [/home/bill/Projects/intel_nuc_led/nuc_led.o] Error 1
Makefile:1552: recipe for target '_module_/home/bill/Projects/intel_nuc_led' failed
make[1]: *** [_module_/home/bill/Projects/intel_nuc_led] Error 2
make[1]: Leaving directory '/usr/src/linux-headers-4.15.0-20-generic'
Makefile:8: recipe for target 'default' failed
make: *** [default] Error 2

This is a new install on a NUC7i5BNH with Ubuntu Server 18.04.

╰─➤  uname -a
Linux hyrule 4.15.0-20-generic #21-Ubuntu SMP Tue Apr 24 06:16:15 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux
@milesp20
Copy link
Owner

milesp20 commented May 8, 2018

@ctgreybeard Can you add this extra CFLAG to the Makefile and try compiling?

-fno-pie

@ahmebane
Copy link

ahmebane commented May 8, 2018 via email

@ahmebane
Copy link

ahmebane commented May 8, 2018 via email

@ctgreybeard
Copy link
Author

@milesp20 Adding that flag did get me farther but I'm now running into some includes that I don't have yet. It started with stdargs.h iirc and went from there. I am thinking that the Server edition isn't intended to be a dev machine. I decided to use that one because I didn't want the gui baggage. Maybe I'll spin up a desktop version to do the build on.

But if you know which packages I will need then that would be helpful.

Bill

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

3 participants