code model kernel does not support PIC mode - Printable Version +- iPXE discussion forum (https://forum.ipxe.org) +-- Forum: iPXE user forums (/forumdisplay.php?fid=1) +--- Forum: General (/forumdisplay.php?fid=2) +--- Thread: code model kernel does not support PIC mode (/showthread.php?tid=14933) |
code model kernel does not support PIC mode - ChrisLucas29 - 2018-10-29 12:47 Hello, When I'm building "make bin-x86_64-pcbios/ipxe.lkrn", I get this error: Code: cc1: error: code model kernel does not support PIC mode Code: util/zbin.c:7:10: fatal error: lzma.h: No such file or directory RE: code model kernel does not support PIC mode - ChrisLucas29 - 2018-10-29 16:31 I found a way to solve the "kernel does not support PIC mode". You just add "-fno-pie" at the end of this line in Makefile.housekeeping. Apparently it's a bug with gcc v5+. link Code: CFLAGS += $(WORKAROUND_CFLAGS) $(EXTRA_CFLAGS) -fno-pie On both architecture, I get the lzma.h error. Does anybody have a clue? RE: code model kernel does not support PIC mode - NiKiZe - 2018-10-29 19:10 Any particular reason you are building bin-x86_64-pcbios instead of bin-i386-pcbios ? in regards to lzma, check the http://ipxe.org/download#source_code page, relevant prerequsit: "liblzma or xz header files" Are you building from latest git master? or what is the git commit that you are using? RE: code model kernel does not support PIC mode - ChrisLucas29 - 2018-10-31 11:19 Just needed to reinstall the liblzma package. Don't know why but now it works. Thanks! RE: code model kernel does not support PIC mode - labba7 - 2019-04-26 10:30 Hello, I have a similar issue , after cloning the ipxe code source, the command "Make " generate a set of errors and the final result is as you see below: Makefile.housekeeping:938: recipe for target 'bin/__umoddi3.o' failed make: *** [bin/__umoddi3.o] Error 1 anyone have an idea about this ? thank you RE: code model kernel does not support PIC mode - NiKiZe - 2019-04-26 20:03 (2019-04-26 10:30)labba7 Wrote: Hello, Have you done as the OP did and make sure that you have liblzma headers installed? If so, what are you compiling on? (example Ubuntu 16 or similar) |