3

I'm trying to install Gentoo amd64 on an HP DL380 G4. I've managed to get to the Configuring the Linux Kernel section in the Gentoo Installation Handbook. After using this command:

emerge --ask sys-kernel/gentoo-sources

I get the following output:

(chroot) livecd / # emerge --ask sys-kernel/gentoo-sources

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

Calculating dependencies... done!
[ebuild  N     ] sys-devel/bc-1.06.95-r2  USE="readline -libedit -static" 
[ebuild  N     ] sys-kernel/gentoo-sources-4.14.65  USE="-build -experimental -symlink" 

Would you like to merge these packages? [Yes/No] yes

>>> Verifying ebuild manifests

>>> Emerging (1 of 2) sys-devel/bc-1.06.95-r2::gentoo
 * Fetching files in the background.
 * To view fetch progress, run in another terminal:
 * tail -f /var/log/emerge-fetch.log
 * bc-1.06.95.tar.bz2 BLAKE2B SHA512 size ;-) ...                                                                                                                                      [ ok ]
>>> Unpacking source...
>>> Unpacking bc-1.06.95.tar.bz2 to /var/tmp/portage/sys-devel/bc-1.06.95-r2/work
>>> Source unpacked in /var/tmp/portage/sys-devel/bc-1.06.95-r2/work
>>> Preparing source in /var/tmp/portage/sys-devel/bc-1.06.95-r2/work/bc-1.06.95 ...
 * Applying bc-1.06.95-void_uninitialized.patch ...                                                                                                                                    [ ok ]
 * Applying bc-1.06.95-mem-leak.patch ...                                                                                                                                              [ ok ]
>>> Source prepared.
>>> Configuring source in /var/tmp/portage/sys-devel/bc-1.06.95-r2/work/bc-1.06.95 ...
./configure --prefix=/usr --build=x86_64-pc-linux-gnu --host=x86_64-pc-linux-gnu --mandir=/usr/share/man --infodir=/usr/share/info --datadir=/usr/share --sysconfdir=/etc --localstatedir=/var/lib --disable-dependency-tracking --libdir=/usr/lib64 --with-readline --without-libedit
checking for a BSD-compatible install... /usr/lib/portage/python3.6/ebuild-helpers/xattr/install -c
checking whether build environment is sane... yes
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking for x86_64-pc-linux-gnu-gcc... x86_64-pc-linux-gnu-gcc
checking for C compiler default output file name... configure: error: C compiler cannot create executables
See `config.log' for more details.

!!! Please attach the following file when seeking support:
!!! /var/tmp/portage/sys-devel/bc-1.06.95-r2/work/bc-1.06.95/config.log
 * ERROR: sys-devel/bc-1.06.95-r2::gentoo failed (configure phase):
 *   econf failed
 * 
 * Call stack:
 *               ebuild.sh, line  124:  Called src_configure
 *             environment, line 2172:  Called econf '--with-readline' '--without-libedit'
 *        phase-helpers.sh, line  718:  Called __helpers_die 'econf failed'
 *   isolated-functions.sh, line  121:  Called die
 * The specific snippet of code:
 *          die "$@"
 * 
 * If you need support, post the output of `emerge --info '=sys-devel/bc-1.06.95-r2::gentoo'`,
 * the complete build log and the output of `emerge -pqv '=sys-devel/bc-1.06.95-r2::gentoo'`.
 * The complete build log is located at '/var/tmp/portage/sys-devel/bc-1.06.95-r2/temp/build.log'.
 * The ebuild environment file is located at '/var/tmp/portage/sys-devel/bc-1.06.95-r2/temp/environment'.
 * Working directory: '/var/tmp/portage/sys-devel/bc-1.06.95-r2/work/bc-1.06.95'
 * S: '/var/tmp/portage/sys-devel/bc-1.06.95-r2/work/bc-1.06.95'

>>> Failed to emerge sys-devel/bc-1.06.95-r2, Log file:

>>>  '/var/tmp/portage/sys-devel/bc-1.06.95-r2/temp/build.log'

 * Messages for package sys-devel/bc-1.06.95-r2:

 * ERROR: sys-devel/bc-1.06.95-r2::gentoo failed (configure phase):
 *   econf failed
 * 
 * Call stack:
 *               ebuild.sh, line  124:  Called src_configure
 *             environment, line 2172:  Called econf '--with-readline' '--without-libedit'
 *        phase-helpers.sh, line  718:  Called __helpers_die 'econf failed'
 *   isolated-functions.sh, line  121:  Called die
 * The specific snippet of code:
 *          die "$@"
 * 
 * If you need support, post the output of `emerge --info '=sys-devel/bc-1.06.95-r2::gentoo'`,
 * the complete build log and the output of `emerge -pqv '=sys-devel/bc-1.06.95-r2::gentoo'`.
 * The complete build log is located at '/var/tmp/portage/sys-devel/bc-1.06.95-r2/temp/build.log'.
 * The ebuild environment file is located at '/var/tmp/portage/sys-devel/bc-1.06.95-r2/temp/environment'.
 * Working directory: '/var/tmp/portage/sys-devel/bc-1.06.95-r2/work/bc-1.06.95'
 * S: '/var/tmp/portage/sys-devel/bc-1.06.95-r2/work/bc-1.06.95'

What could the problem be?

3
  • Gentoo Linux has a forum where you will find people who know Gentoo Linux very well. I highly recommend you post your question there. Sep 18 '18 at 23:59
  • For this type of error, when there is the line See `config.log' for more details., before running emerge again you should look at config.log. The full path is given right after !!! Please attach the following file when seeking support: line. Normally this file has a bunch of envvars and stuff at the end and a bunch of output from commands at the beginning. The error is normally right in the middle at the end of the commands section and before the envvars section. As the answerer says, it is likely to be invalid CFLAGS or LDFLAGS or similar settings in /etc/portage/make.conf.
    – binki
    Sep 21 '18 at 17:33
  • Can you post the config.log? !!! Please attach the following file when seeking support: !!! /var/tmp/portage/sys-devel/bc-1.06.95-r2/work/bc-1.06.95/config.log
    – level42
    Sep 27 '18 at 15:14
2

The relevant line is this:

checking for C compiler default output file name... configure: error: C compiler cannot create executables

This means that when the configure script for the bc package (which is needed by the kernel build process) checked to make sure that calling the C compiler (GCC) the way it's been told to, it failed. Possible reasons for this include, but are not limited to:

  • Invalid options (which on Gentoo would be in the CFLAGS variable in /etc/portage/make.conf). This is the most likely case. Examples include passing -fstack-protector options to older GCC versions, trying to build 32 or 64-bit code on the wrong type of system, or trying to use Graphite optimization options when GCC is built without Graphite support.
  • Hardware problems (bad RAM, bad PSU, bad CPU, etc).
  • Silent data corruption on-disk.
  • Insufficient memory (not likely unless you already have things configured t build in tmpfs and you don't have very much RAM).

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.