Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[SOLVED]gcc: error trying to exec 'as': execvp: No such file
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Installing Gentoo
View previous topic :: View next topic  
Author Message
fargred
n00b
n00b


Joined: 19 Oct 2010
Posts: 65

PostPosted: Sat Aug 26, 2017 8:59 pm    Post subject: [SOLVED]gcc: error trying to exec 'as': execvp: No such file Reply with quote

I have prepared a new system on a separate disk. Unpacked stage3, copied /etc and /var/lib/portage/world from the living system and made emerge -NuDave @world. After some --keep-going --resume the merge nicely completed, so I’ve done
Code:
emerge -cav

It has shown, that it wants to uninstall gcc-6.3.0 with which I’ve built the whole system. I’ve stopped emerge and ran gcc-config 2 to switch to gcc-6.4.0, then ran emerge -avc again and cleaned the packages. Then were
Code:
eclean-dist -df
eclean-pkg -dn
rm -rf /var/tmp/portage/*
CCACHE_DIR="/var/tmp/ccache" ccache -C

And now I cannot emerge anything, because GCC can’t find ‘as’:
Code:
make: *** [<builtin>: natpmp.o] Error 2
x86_64-pc-linux-gnu-gcc: error trying to exec 'as': execvp: No such file or directory
make: *** [<builtin>: getgateway.o] Error 2
 * ERROR: net-libs/libnatpmp-20150609::gentoo failed (compile phase):
 *   emake failed


Example build.log: http://sprunge.us/EUXL
emerge --info sys-devel/gcc: http://sprunge.us/FSeA


Last edited by fargred on Sun Aug 27, 2017 2:18 pm; edited 1 time in total
Back to top
View user's profile Send private message
DONAHUE
Watchman
Watchman


Joined: 09 Dec 2006
Posts: 7376
Location: Goose Creek SC

PostPosted: Sat Aug 26, 2017 11:41 pm    Post subject: Reply with quote

you may have lost one or more symlinks.
If you did not do, recommend doing:
Code:
env-update && source /etc/profile
emerge --ask --oneshot sys-devel/libtool
https://wiki.gentoo.org/wiki/Upgrading_GCC refers

if that fails. you should be able to emulate this chain of symlinks to the actual executable:
I7-6700K ~ # ls -l /usr/bin/as
lrwxrwxrwx 1 root root 22 Aug 20 22:47 /usr/bin/as -> x86_64-pc-linux-gnu-as
I7-6700K ~ # ls -l x86_64-pc-linux-gnu-as
ls: cannot access 'x86_64-pc-linux-gnu-as': No such file or directory
I7-6700K ~ # ls -l /usr/bin/as
lrwxrwxrwx 1 root root 22 Aug 20 22:47 /usr/bin/as -> x86_64-pc-linux-gnu-as
I7-6700K ~ # ls -l /usr/bin/x86_64-pc-linux-gnu-as
lrwxrwxrwx 1 root root 31 Aug 20 22:47 /usr/bin/x86_64-pc-linux-gnu-as -> /usr/x86_64-pc-linux-gnu/bin/as
I7-6700K ~ # ls -l /usr/x86_64-pc-linux-gnu/bin/as
lrwxrwxrwx 1 root root 47 Aug 20 22:47 /usr/x86_64-pc-linux-gnu/bin/as -> /usr/x86_64-pc-linux-gnu/binutils-bin/2.28.1/as
I7-6700K ~ # ls -l /usr/x86_64-pc-linux-gnu/binutils-bin/2.28.1/as
-rwxr-xr-x 1 root root 844488 Aug 4 03:14 /usr/x86_64-pc-linux-gnu/binutils-bin/2.28.1/as

If symlinks are missing recommend making them and try again. as symlinks may not be the only ones lost ...

/usr/x86_64-pc-linux-gnu/binutils-bin/2.28.1/as (actual exectable)
_________________
Defund the FCC.
Back to top
View user's profile Send private message
fargred
n00b
n00b


Joined: 19 Oct 2010
Posts: 65

PostPosted: Sun Aug 27, 2017 7:57 am    Post subject: Reply with quote

DONAHUE wrote:
you may have lost one or more symlinks.
If you did not do, recommend doing:
Code:
env-update && source /etc/profile
emerge --ask --oneshot sys-devel/libtool
https://wiki.gentoo.org/wiki/Upgrading_GCC refers

I did that. Had to use the binary package for libtool (built locally beforehand)
DONAHUE wrote:

if that fails. you should be able to emulate this chain of symlinks to the actual executable:
I7-6700K ~ # ls -l /usr/bin/as
lrwxrwxrwx 1 root root 22 Aug 20 22:47 /usr/bin/as -> x86_64-pc-linux-gnu-as
I7-6700K ~ # ls -l x86_64-pc-linux-gnu-as
ls: cannot access 'x86_64-pc-linux-gnu-as': No such file or directory

That’s what I see on my system.
DONAHUE wrote:
I7-6700K ~ # ls -l /usr/bin/as
lrwxrwxrwx 1 root root 22 Aug 20 22:47 /usr/bin/as -> x86_64-pc-linux-gnu-as
I7-6700K ~ # ls -l /usr/bin/x86_64-pc-linux-gnu-as
lrwxrwxrwx 1 root root 31 Aug 20 22:47 /usr/bin/x86_64-pc-linux-gnu-as -> /usr/x86_64-pc-linux-gnu/bin/as
I7-6700K ~ # ls -l /usr/x86_64-pc-linux-gnu/bin/as
lrwxrwxrwx 1 root root 47 Aug 20 22:47 /usr/x86_64-pc-linux-gnu/bin/as -> /usr/x86_64-pc-linux-gnu/binutils-bin/2.28.1/as
I7-6700K ~ # ls -l /usr/x86_64-pc-linux-gnu/binutils-bin/2.28.1/as
-rwxr-xr-x 1 root root 844488 Aug 4 03:14 /usr/x86_64-pc-linux-gnu/binutils-bin/2.28.1/as

If symlinks are missing recommend making them and try again. as symlinks may not be the only ones lost ...

Apparently, emerge depclean has deleted old version of binutils (2.28) and during update 2.28.1 was installed

Code:
# LC_TIME=C ls -l /usr/bin/as
lrwxrwxrwx 1 root root 22 Jul 20 07:24 /usr/bin/as -> x86_64-pc-linux-gnu-as

# LC_TIME=C ls -l /usr/bin/x86_64-pc-linux-gnu-as
lrwxrwxrwx 1 root root 31 Jul 20 07:24 /usr/bin/x86_64-pc-linux-gnu-as -> /usr/x86_64-pc-linux-gnu/bin/as

# LC_TIME=C ls -l /usr/x86_64-pc-linux-gnu/bin/as
lrwxrwxrwx 1 root root 45 Jul 20 07:24 /usr/x86_64-pc-linux-gnu/bin/as -> /usr/x86_64-pc-linux-gnu/binutils-bin/2.28/as

I have re-merged current binutils, libtool and gcc, but nothing changed. What should I do to fix the 39 broken symlinks in /usr/bin that I now have? Wiki doesn’t point what to do in such cases.
Code:
# find /usr/bin/ -xtype l | wc -l
39
Back to top
View user's profile Send private message
fargred
n00b
n00b


Joined: 19 Oct 2010
Posts: 65

PostPosted: Sun Aug 27, 2017 8:05 am    Post subject: Reply with quote

I should have thought faster. Thankfully, I′ve created binary packages for all toolchain programs. So I’ve just run emerge -Kav1 =binutils-2.28-r2 and it installed the needed files for the symlinks that were broken. Now what should I do in order to not have my system broken again after another emerge depclean?
Except for putting sys-devel/* -~amd64 into /etc/portage/package.accept_keywords?
Back to top
View user's profile Send private message
fargred
n00b
n00b


Joined: 19 Oct 2010
Posts: 65

PostPosted: Sun Aug 27, 2017 2:17 pm    Post subject: Reply with quote

Solved by this: https://bugs.gentoo.org/show_bug.cgi?id=629056#c2
Back to top
View user's profile Send private message
DONAHUE
Watchman
Watchman


Joined: 09 Dec 2006
Posts: 7376
Location: Goose Creek SC

PostPosted: Sun Aug 27, 2017 3:11 pm    Post subject: Reply with quote

had never had occasion to use or learn about binutil-config, thanks for the info
_________________
Defund the FCC.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Installing Gentoo 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