Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[Solved]Can't compile kernel after GCC-7.3 update
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware
View previous topic :: View next topic  
Author Message
ShanaXXII
Apprentice
Apprentice


Joined: 29 Jun 2014
Posts: 281
Location: Canada

PostPosted: Sun Jul 01, 2018 1:31 am    Post subject: [Solved]Can't compile kernel after GCC-7.3 update Reply with quote

After updating to gcc-7.3.0-r3 from gcc-6.4.0-r1, I couldn't compile vanilla-sources-4.17.1.

Code:
~ # make -j5
  CHK     include/config/kernel.release
  CHK     include/generated/uapi/linux/version.h
  DESCEND  objtool
make[4]: *** No rule to make target '/usr/lib/gcc/x86_64-pc-linux-gnu/6.4.0/include/stddef.h', needed by '/usr/src/linux-4.17.1/tools/objtool/fixdep.o'.  Stop.
make[3]: *** [Makefile:43: /usr/src/linux-4.17.1/tools/objtool/fixdep-in.o] Error 2
make[2]: *** [/usr/src/linux-4.17.1/tools/build/Makefile.include:4: fixdep] Error 2
make[1]: *** [Makefile:63: objtool] Error 2
make: *** [Makefile:1699: tools/objtool] Error 2
make: *** Waiting for unfinished jobs....


Code:
[ebuild   R    ] sys-devel/gcc-7.3.0-r3:7.3.0::gentoo  USE="cxx fortran (multilib) nls nptl openmp pch (pie) sanitize ssp (-altivec) -cilk -debug -doc (-fixed-point) -go -graphite (-hardened) (-jit) (-libssp) -mpx -objc -objc++ -objc-gc -pgo -regression-test -vanilla -vtv" 0 KiB


Last edited by ShanaXXII on Tue Jul 03, 2018 3:08 am; edited 1 time in total
Back to top
View user's profile Send private message
bunder
Bodhisattva
Bodhisattva


Joined: 10 Apr 2004
Posts: 5801

PostPosted: Sun Jul 01, 2018 1:34 am    Post subject: Reply with quote

yeah I had problems at first too... hopefully this should work though

Code:
cp /usr/src/linux/.config /root/kernel-config
cd /usr/src/linux
make clean
mv /root/kernel-config .config
make oldconfig (optional)
make


i would also check with gcc-config -l to make sure gcc7 is the selected gcc.
_________________
overlay | patches
Neddyseagoon wrote:
The problem with leaving is that you can only do it once and it reduces your influence.
Back to top
View user's profile Send private message
Marcih
Tux's lil' helper
Tux's lil' helper


Joined: 19 Feb 2018
Posts: 147

PostPosted: Sun Jul 01, 2018 6:59 am    Post subject: Re: Can't compile kernel after GCC-7.3 update Reply with quote

ShanaXXII wrote:
Code:
make[4]: *** No rule to make target '/usr/lib/gcc/x86_64-pc-linux-gnu/6.4.0/include/stddef.h', needed by '/usr/src/linux-4.17.1/tools/objtool/fixdep.o'.  Stop.

Have you followed the Upgrading GCC Wiki article? That line makes me think you've either not re-compiled libtool (it has hard links against the current GGC when compiled, needs to be rebuilt after every GCC update) or you've already compiled some objects with GCC 6.4.0 and it's looking for headers in the folder of the old GCC to continue(?).
To clean the cached objects, do what bunder said (It's not strictly necessary to back up the config when doing make clean, it's good practice to do so nevertheless. To "make sure there are no stale .o files and dependencies lying around", to quote from the Linux README file, follow bunder's instructions, replacing clean with mrproper), both cleaning your sources folder from old .o files and checking whether you have 7.3.0 selected; it almost certainly is, the newest GCC gets selected automagically when you unmerge an older version, not to mention that you probably wouldn't be getting this error if 6.4.0 was still installed and selected.
If that fails, try rebuiling sys-devel/libtool, like it says in the Wiki article linked at the start:
Code:
# emerge --ask --verbose --oneshot sys-devel/libtool

_________________
Bones McCracker wrote:
It wouldn't be so bad, if it didn't suck.

===
I refuse to move on from GTK+2.
Back to top
View user's profile Send private message
ShanaXXII
Apprentice
Apprentice


Joined: 29 Jun 2014
Posts: 281
Location: Canada

PostPosted: Tue Jul 03, 2018 3:07 am    Post subject: Reply with quote

bunder wrote:
yeah I had problems at first too... hopefully this should work though

Code:
cp /usr/src/linux/.config /root/kernel-config
cd /usr/src/linux
make clean
mv /root/kernel-config .config
make oldconfig (optional)
make


i would also check with gcc-config -l to make sure gcc7 is the selected gcc.


Thanks that worker :)
Sorry for long reply. Laptop died.
Back to top
View user's profile Send private message
papandreoos
Tux's lil' helper
Tux's lil' helper


Joined: 17 Dec 2014
Posts: 136

PostPosted: Sat Mar 09, 2019 9:22 pm    Post subject: Reply with quote

bunder wrote:
yeah I had problems at first too... hopefully this should work though

Code:
cp /usr/src/linux/.config /root/kernel-config
cd /usr/src/linux
make clean
mv /root/kernel-config .config
make oldconfig (optional)
make


i would also check with gcc-config -l to make sure gcc7 is the selected gcc.


thank you very much!
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum