Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
GCC broken, binutils uninstalled, ways to move forward?
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
atmosx
n00b
n00b


Joined: 17 Jul 2009
Posts: 42

PostPosted: Sat May 02, 2020 8:00 am    Post subject: GCC broken, binutils uninstalled, ways to move forward? Reply with quote

Hi,

I ended in the following weird state:

Code:

proliant ~ # emerge glibc
Calculating dependencies... done!

>>> Verifying ebuild manifests
>>> Running pre-merge checks for sys-libs/glibc-2.30-r8
 * Checking general environment sanity.
make -j2 glibc-test
cc -march=native -O2 -pipe   -Wl,-O1 -Wl,--as-needed  glibc-test.c   -o glibc-test
cc: fatal error: cannot execute ‘as’: execvp: No such file or directory
compilation terminated.
make: *** [<builtin>: glibc-test] Error 1
emake failed
 * Simple build failed ... assuming this is desired #324685
 * Checking that IA32 emulation is enabled in the running kernel ...
x86_64-pc-linux-gnu-gcc: fatal error: cannot execute ‘as’: execvp: No such file or directory
compilation terminated.
 * Failed to compile the ABI test. Broken host glibc?                                                                                                                           [ ok ]
 * Checking gcc for __thread support ...                                                                                                                                        [ !! ]

 * Could not find a gcc that supports the __thread directive!
 * Please update your binutils/gcc and try again.
 * ERROR: sys-libs/glibc-2.30-r8::gentoo failed (pretend phase):
 *   No __thread support in gcc!
 *
 * Call stack:
 *              ebuild.sh, line 125:  Called pkg_pretend
 *   glibc-2.30-r8.ebuild, line 726:  Called sanity_prechecks
 *   glibc-2.30-r8.ebuild, line 687:  Called die
 * The specific snippet of code:
 *                      die "No __thread support in gcc!"
 *
 * If you need support, post the output of `emerge --info '=sys-libs/glibc-2.30-r8::gentoo'`,
 * the complete build log and the output of `emerge -pqv '=sys-libs/glibc-2.30-r8::gentoo'`.
 * The complete build log is located at '/var/tmp/portage/sys-libs/glibc-2.30-r8/temp/build.log'.
 * The ebuild environment file is located at '/var/tmp/portage/sys-libs/glibc-2.30-r8/temp/die.env'.
 * Working directory: '/var/tmp/portage/sys-libs/glibc-2.30-r8/homedir'
 * S: '/var/tmp/portage/sys-libs/glibc-2.30-r8/work/glibc-2.30'

 * Messages for package sys-libs/glibc-2.30-r8:

 * Simple build failed ... assuming this is desired #324685
 * Failed to compile the ABI test. Broken host glibc?
 * Could not find a gcc that supports the __thread directive!
 * Please update your binutils/gcc and try again.
 * ERROR: sys-libs/glibc-2.30-r8::gentoo failed (pretend phase):
 *   No __thread support in gcc!
 *
 * Call stack:
 *              ebuild.sh, line 125:  Called pkg_pretend
 *   glibc-2.30-r8.ebuild, line 726:  Called sanity_prechecks
 *   glibc-2.30-r8.ebuild, line 687:  Called die
 * The specific snippet of code:
 *                      die "No __thread support in gcc!"
 *
 * If you need support, post the output of `emerge --info '=sys-libs/glibc-2.30-r8::gentoo'`,
 * the complete build log and the output of `emerge -pqv '=sys-libs/glibc-2.30-r8::gentoo'`.
 * The complete build log is located at '/var/tmp/portage/sys-libs/glibc-2.30-r8/temp/build.log'.
 * The ebuild environment file is located at '/var/tmp/portage/sys-libs/glibc-2.30-r8/temp/die.env'.
 * Working directory: '/var/tmp/portage/sys-libs/glibc-2.30-r8/homedir'
 * S: '/var/tmp/portage/sys-libs/glibc-2.30-r8/work/glibc-2.30'

proliant ~ # gcc-config --list-profiles
 [1] x86_64-pc-linux-gnu-7.3.0
 [2] x86_64-pc-linux-gnu-8.2.0
 [3] x86_64-pc-linux-gnu-8.3.0
 [4] x86_64-pc-linux-gnu-9.2.0 *

proliant ~ # gcc -v
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/libexec/gcc/x86_64-pc-linux-gnu/9.2.0/lto-wrapper
Target: x86_64-pc-linux-gnu
Configured with: /var/tmp/portage/sys-devel/gcc-9.2.0-r2/work/gcc-9.2.0/configure --host=x86_64-pc-linux-gnu --build=x86_64-pc-linux-gnu --prefix=/usr --bindir=/usr/x86_64-pc-linux-gnu/gcc-bin/9.2.0 --includedir=/usr/lib/gcc/x86_64-pc-linux-gnu/9.2.0/include --datadir=/usr/share/gcc-data/x86_64-pc-linux-gnu/9.2.0 --mandir=/usr/share/gcc-data/x86_64-pc-linux-gnu/9.2.0/man --infodir=/usr/share/gcc-data/x86_64-pc-linux-gnu/9.2.0/info --with-gxx-include-dir=/usr/lib/gcc/x86_64-pc-linux-gnu/9.2.0/include/g++-v9 --with-python-dir=/share/gcc-data/x86_64-pc-linux-gnu/9.2.0/python --enable-languages=c,c++,fortran --enable-obsolete --enable-secureplt --disable-werror --with-system-zlib --enable-nls --without-included-gettext --enable-checking=release --with-bugurl=https://bugs.gentoo.org/ --with-pkgversion='Gentoo 9.2.0-r2 p3' --disable-esp --enable-libstdcxx-time --enable-shared --enable-threads=posix --enable-__cxa_atexit --enable-clocale=gnu --enable-multilib --with-multilib-list=m32,m64 --disable-altivec --disable-fixed-point --enable-targets=all --enable-libgomp --disable-libmudflap --disable-libssp --disable-systemtap --enable-vtable-verify --enable-lto --without-isl --enable-default-pie --enable-default-ssp
Thread model: posix
gcc version 9.2.0 (Gentoo 9.2.0-r2 p3)
proliant ~ # cat file.c
#include <stdio.h>
int main() {
   // printf() displays the string inside quotation
   printf("Hello, World!");
   return 0;
}
proliant ~ # gcc file.c
gcc: fatal error: cannot execute ‘as’: execvp: No such file or directory
compilation terminated.

emerge binutils
[...]
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/sys-devel/binutils-2.33.1-r1/work/build':
configure: error: C compiler cannot create executables
See `config.log' for more details


Is there any way to get out of this mess?

Regards,
Back to top
View user's profile Send private message
fedeliallalinea
Bodhisattva
Bodhisattva


Joined: 08 Mar 2003
Posts: 24023
Location: here

PostPosted: Sat May 02, 2020 8:09 am    Post subject: Reply with quote

What return emerge -pv binutils and namei /usr/bin/as commands?
_________________
Questions are guaranteed in life; Answers aren't.
Back to top
View user's profile Send private message
atmosx
n00b
n00b


Joined: 17 Jul 2009
Posts: 42

PostPosted: Sat May 02, 2020 8:15 am    Post subject: Reply with quote

fedeliallalinea wrote:
What return emerge -pv binutils and namei /usr/bin/as commands?


Code:

proliant ~ #  emerge -pv binutils

These are the packages that would be merged, in order:

Calculating dependencies... done!
[ebuild  N     ] sys-devel/binutils-2.33.1-r1:2.33::gentoo  USE="gold nls plugins -default-gold -doc -multitarget -static-libs -test" 0 KiB

proliant ~ # namei /usr/bin/as
f: /usr/bin/as
 d /
 d usr
 d bin
 l as -> x86_64-pc-linux-gnu-as
   l x86_64-pc-linux-gnu-as -> /usr/x86_64-pc-linux-gnu/bin/as
     d /
     d usr
     d x86_64-pc-linux-gnu
     d bin
     l as -> /usr/x86_64-pc-linux-gnu/binutils-bin/2.32/as
       d /
       d usr
       d x86_64-pc-linux-gnu
       d binutils-bin
         2.32 - No such file or directory
Back to top
View user's profile Send private message
fedeliallalinea
Bodhisattva
Bodhisattva


Joined: 08 Mar 2003
Posts: 24023
Location: here

PostPosted: Sat May 02, 2020 8:23 am    Post subject: Reply with quote

Ok same problem as here follow solution to install binary from http://packages.gentooexperimental.org/packages/
_________________
Questions are guaranteed in life; Answers aren't.
Back to top
View user's profile Send private message
atmosx
n00b
n00b


Joined: 17 Jul 2009
Posts: 42

PostPosted: Sat May 02, 2020 9:42 am    Post subject: Reply with quote

fedeliallalinea wrote:
Ok same problem as here follow solution to install binary from http://packages.gentooexperimental.org/packages/


Strangely, "buildpkgonly" flag doesn't seem to work. Am I missing something?

Code:

proliant /etc/portage # grep -i pack /etc/portage/make.conf
PKGDIR="${PORTDIR}/packages"
PORTAGE_BINHOST="http://packages.gentooexperimental.org/packages/"
proliant /etc/portage # emerge --buildpkgonly sys-devel/binutils
Calculating dependencies... done!

>>> Verifying ebuild manifests

>>> Emerging (1 of 1) sys-devel/binutils-2.33.1-r1::gentoo
>>> Resuming download...
>>> Downloading 'http://ftp.ntua.gr/pub/linux/gentoo/distfiles/binutils-2.33.1.tar.xz'
--2020-05-02 12:37:00--  http://ftp.ntua.gr/pub/linux/gentoo/distfiles/binutils-2.33.1.tar.xz
Resolving ftp.ntua.gr (ftp.ntua.gr)... 2001:648:2000:de::211, 147.102.222.211
Connecting to ftp.ntua.gr (ftp.ntua.gr)|2001:648:2000:de::211|:80... connected.
HTTP request sent, awaiting response... 206 Partial Content
Length: 21490848 (20M), 19537189 (19M) remaining [application/x-tar]
Saving to: ‘/usr/portage/distfiles/binutils-2.33.1.tar.xz.__download__’
[..]


Emerge tries to download the source to compile the package instead of downloading the binary package.
Back to top
View user's profile Send private message
fedeliallalinea
Bodhisattva
Bodhisattva


Joined: 08 Mar 2003
Posts: 24023
Location: here

PostPosted: Sat May 02, 2020 9:47 am    Post subject: Reply with quote

You are in stable branch so run command
Code:
# PORTAGE_BINHOST="http://packages.gentooexperimental.org/packages/amd64-stable/"  emerge -av --oneshot --getbinpkgonly binutils sys-devel/binutils

_________________
Questions are guaranteed in life; Answers aren't.
Back to top
View user's profile Send private message
atmosx
n00b
n00b


Joined: 17 Jul 2009
Posts: 42

PostPosted: Sat May 02, 2020 10:40 am    Post subject: Reply with quote

fedeliallalinea wrote:
You are in stable branch so run command
Code:
# PORTAGE_BINHOST="http://packages.gentooexperimental.org/packages/amd64-stable/"  emerge -av --oneshot --getbinpkgonly binutils sys-devel/binutils


That did the trick! I had to symlink the

Code:

ln -sf /usr/x86_64-pc-linux-gnu/binutils-bin/2.33.1/  /usr/x86_64-pc-linux-gnu/bin


But everything seems to work now. Thanks for the help, much appreciated!
Back to top
View user's profile Send private message
fedeliallalinea
Bodhisattva
Bodhisattva


Joined: 08 Mar 2003
Posts: 24023
Location: here

PostPosted: Sat May 02, 2020 11:04 am    Post subject: Reply with quote

There is an error in my command, without consequences, I added two time binutils correct command is
Code:
# PORTAGE_BINHOST="http://packages.gentooexperimental.org/packages/amd64-stable/"  emerge -av --oneshot --getbinpkgonly binutils

_________________
Questions are guaranteed in life; Answers aren't.
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