Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Broke my GCC during Profile 17 Update
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Portage & Programming
View previous topic :: View next topic  
Author Message
Crimjob
Tux's lil' helper
Tux's lil' helper


Joined: 04 Dec 2006
Posts: 111

PostPosted: Wed Apr 18, 2018 10:16 pm    Post subject: Broke my GCC during Profile 17 Update Reply with quote

Hey guys,

I seem to have royally broken my GCC installation during the upgrade to profile 17.0. I assumed it was a fluke / one-off, however it has now occurred on 3 separate machines I've tried to update Gentoo on (two at work and one at home). My Google-Fu is usually pretty good, and I've been able to solve most of my issues simply by looking up others, but this one has me stumped.

If I switch back to my original pre-upgraded GCC compiler, everything works fine. As soon as I switch to GCC 6.4.0, I get strange errors as if GCC is not even correctly configured on the system. Again would have assumed a fluke, but this same issue happens on all 3 computers I've tried.

Doing some digging in the forums, I've found some commands & things to try (building my own hello.c program etc.) and all things point to broken GCC install, however no matter how many times I reinstall it or which computer it's on, same issue.

I have been following the steps from https://www.gentoo.org/support/news-items/2017-11-30-new-17-profiles.html. Some machines were harder than others to get libtool / binutils going but ultimately resolved all the conflicts, ready to emerge @world but cannot get past this damn GCC issue.

Once flipped to GCC 6.4.0, any and all GCC actions fail. Attempting to emerge a package (any package) fails with "cannot create executables" or "internal compiler error: killed (program ccl)"
Code:

checking for x86_64-pc-linux-gnu-gcc... x86_64-pc-linux-gnu-gcc
checking for C compiler default output file name...
configure: error: in `/var/tmp/portage/portage/sys-devel/binutils-2.29.1-r1/work/build':
configure: error: C compiler cannot create executables
See `config.log' for more details.


Code:
creating /var/tmp/portage/portage/sys-apps/portage-2.3.28/work/portage-2.3.28-python2_7/temp.linux-x86_64-2.7/src
x86_64-pc-linux-gnu-gcc -march=native -O2 -pipe -fPIC -I/usr/include/python2.7 -c src/portage_util_libc.c -o /var/tmp/portage/portage/sys-apps/portage-2.3.28/work/portage-2.3.28-python2_7/temp.linux-x86_64-2.7/src/portage_util_libc.o -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE
x86_64-pc-linux-gnu-gcc: internal compiler error: Killed (program cc1)
Please submit a full bug report,
with preprocessed source if appropriate.
See <https://bugs.gentoo.org/> for instructions.
error: command 'x86_64-pc-linux-gnu-gcc' failed with exit status 4


Running through the motions on my own hello.c (started in GCC 4.8.4, compiled fine, switched to GCC 6.4.0, no compile)

Code:
Spitfire ~ # gcc-config -l
 [1] x86_64-pc-linux-gnu-4.8.4 *
 [2] x86_64-pc-linux-gnu-4.8.4-hardenednopie
 [3] x86_64-pc-linux-gnu-4.8.4-hardenednopiessp
 [4] x86_64-pc-linux-gnu-4.8.4-hardenednossp
 [5] x86_64-pc-linux-gnu-4.8.4-vanilla
 [6] x86_64-pc-linux-gnu-4.9.3
 [7] x86_64-pc-linux-gnu-4.9.3-hardenednopie
 [8] x86_64-pc-linux-gnu-4.9.3-hardenednopiessp
 [9] x86_64-pc-linux-gnu-4.9.3-hardenednossp
 [10] x86_64-pc-linux-gnu-4.9.3-vanilla
 [11] x86_64-pc-linux-gnu-6.4.0
Spitfire ~ # gcc -Wall hello.c -o hello
Spitfire ~ # ./hello
Hello, world!
Spitfire ~ # gcc-config 11
 * Switching native-compiler to x86_64-pc-linux-gnu-6.4.0 ...
>>> Regenerating /etc/ld.so.cache...                                                                                                                                                                  [ ok ]

 * If you intend to use the gcc from the new profile in an already
 * running shell, please remember to do:

 *   . /etc/profile

Spitfire ~ # . /etc/profile
Spitfire ~ # gcc-config -l
 [1] x86_64-pc-linux-gnu-4.8.4
 [2] x86_64-pc-linux-gnu-4.8.4-hardenednopie
 [3] x86_64-pc-linux-gnu-4.8.4-hardenednopiessp
 [4] x86_64-pc-linux-gnu-4.8.4-hardenednossp
 [5] x86_64-pc-linux-gnu-4.8.4-vanilla
 [6] x86_64-pc-linux-gnu-4.9.3
 [7] x86_64-pc-linux-gnu-4.9.3-hardenednopie
 [8] x86_64-pc-linux-gnu-4.9.3-hardenednopiessp
 [9] x86_64-pc-linux-gnu-4.9.3-hardenednossp
 [10] x86_64-pc-linux-gnu-4.9.3-vanilla
 [11] x86_64-pc-linux-gnu-6.4.0 *
Spitfire ~ # gcc -Wall hello.c -o hello
gcc: internal compiler error: Killed (program cc1)
Please submit a full bug report,
with preprocessed source if appropriate.
See <https://bugs.gentoo.org/> for instructions.


I am getting the feeling it is something really silly, as all my searches at this point are coming up on posts from 2002-2009, but alas I am out of ideas (and thinking I am missing something due to the fact it happened on 3 of my machines).

Can anyone help point me in the right direction for next troubleshooting steps?


EDIT: May be worth noting I followed the steps on the Wiki as well for upgrading GCC @ https://wiki.gentoo.org/wiki/Upgrading_GCC (all steps except of course uninstalling the old version as that's the only version I can get to work presently)
_________________
"Who are you to judge the life I live? I know I'm not perfect and I don't live to be, but before you start pointing fingers... make sure your hands are clean." ~Bob Marley
Back to top
View user's profile Send private message
fedeliallalinea
Administrator
Administrator


Joined: 08 Mar 2003
Posts: 30887
Location: here

PostPosted: Thu Apr 19, 2018 6:07 am    Post subject: Reply with quote

You can post your emerge --info?
And also emerge -pvq gcc:6.4.0
_________________
Questions are guaranteed in life; Answers aren't.
Back to top
View user's profile Send private message
freke
l33t
l33t


Joined: 23 Jan 2003
Posts: 974
Location: Somewhere in Denmark

PostPosted: Thu Apr 19, 2018 6:40 am    Post subject: Reply with quote

Upgrading from gcc4.x.x this might also apply?
https://wiki.gentoo.org/wiki/Upgrading_from_gcc-4.x_to_gcc-5.x - new C++ ABI
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 54214
Location: 56N 3W

PostPosted: Thu Apr 19, 2018 5:39 pm    Post subject: Reply with quote

Crimjob,

Code:
x86_64-pc-linux-gnu-gcc: internal compiler error: Killed (program cc1)

Probably the OOM kicked in. Reduce the -j in MAKEOPTS.

The entire build loc on a pastebin would be good.
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
Crimjob
Tux's lil' helper
Tux's lil' helper


Joined: 04 Dec 2006
Posts: 111

PostPosted: Thu Apr 19, 2018 7:29 pm    Post subject: Reply with quote

Thanks guys!

fedeliallalinea wrote:
You can post your emerge --info?
And also emerge -pvq gcc:6.4.0


Pastebin of --info and -pvq @ https://pastebin.ca/4017031

Will check the GCC 4x > 5x guide as well a bit later today.

MAKEOPTS was set to -j8 on all 3 machines. I tried dropping it to -j4 on one and -j1 on another, same issues.
_________________
"Who are you to judge the life I live? I know I'm not perfect and I don't live to be, but before you start pointing fingers... make sure your hands are clean." ~Bob Marley
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 54214
Location: 56N 3W

PostPosted: Thu Apr 19, 2018 8:10 pm    Post subject: Reply with quote

Crimjob,

Code:
sys-devel/gcc:            4.8.4::gentoo, 4.9.3::gentoo, 6.4.0-r1::gentoo

Going from gcc-4.x to 6.x is a big step. gcc is only tested one version up and one version down.
I have heard success stories though.

You must do the C++ ABI change steps before you do anything else.
That is, rebuild all your installed C++ code.

Now the good news. You have selected the default/linux/amd64/17.0/hardened profile.
Providing you were on a hardened profile before, you have been using USE=(pie) for a long time, so no special action is needed for the profile change.
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
Crimjob
Tux's lil' helper
Tux's lil' helper


Joined: 04 Dec 2006
Posts: 111

PostPosted: Fri Apr 20, 2018 6:34 pm    Post subject: Reply with quote

Thanks Neddy!

The guide suggest rebuilding libtool first, however both rebuilding libtool and the C++ ABI change steps are failing with a similar result on GCC 5.4.0.

I tried switching my GCC back to 4.8.4 or 4.9.3 (slightly different versions among all 3 machines) and was able to emerge GCC 5.4.0 without error on all 3.

When attempting to rebuild libtool, a similar error occurs as 6.4.0

Code:
checking for x86_64-pc-linux-gnu-gcc... x86_64-pc-linux-gnu-gcc
checking whether the C compiler works... no
configure: error: in `/var/tmp/portage/portage/sys-devel/libtool-2.4.6-r3/work/libtool-2.4.6':
configure: error: C compiler cannot create executables
See `config.log' for more details


Same errors when trying to compile hello.c. I feel I've really buggered something.
_________________
"Who are you to judge the life I live? I know I'm not perfect and I don't live to be, but before you start pointing fingers... make sure your hands are clean." ~Bob Marley
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 54214
Location: 56N 3W

PostPosted: Fri Apr 20, 2018 6:38 pm    Post subject: Reply with quote

Crimjob,

We need the config.log
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
Crimjob
Tux's lil' helper
Tux's lil' helper


Joined: 04 Dec 2006
Posts: 111

PostPosted: Fri Apr 20, 2018 6:57 pm    Post subject: Reply with quote

Pastebin: https://pastebin.ca/4017290

What sticks out to me:
Code:
configure:3871: x86_64-pc-linux-gnu-gcc -V >&5
x86_64-pc-linux-gnu-gcc: error: unrecognized command line option '-V'
x86_64-pc-linux-gnu-gcc: fatal error: no input files
compilation terminated.
configure:3882: $? = 1
configure:3871: x86_64-pc-linux-gnu-gcc -qversion >&5
x86_64-pc-linux-gnu-gcc: error: unrecognized command line option '-qversion'
x86_64-pc-linux-gnu-gcc: fatal error: no input files
compilation terminated.
configure:3882: $? = 1
configure:3902: checking whether the C compiler works
configure:3924: x86_64-pc-linux-gnu-gcc -march=native -O2 -pipe  -Wl,-O1 -Wl,--as-needed conftest.c  >&5
x86_64-pc-linux-gnu-gcc: internal compiler error: Killed (program cc1)
Please submit a full bug report,
with preprocessed source if appropriate.
See <https://bugs.gentoo.org/> for instructions.

_________________
"Who are you to judge the life I live? I know I'm not perfect and I don't live to be, but before you start pointing fingers... make sure your hands are clean." ~Bob Marley
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Portage & Programming 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