Examples of packages that fail with the same error: sys-apps/sed sys-apps/busybox sys-devel/flex sys-devel/patch ...and more. Error happens very early in configure stage and always looks like this (from configure.log): configure:2198: checking for C compiler default output file name configure:2220: i686-pc-linux-uclibc-gcc -O2 -pipe -march=pentium-m -mtune=pentium-m -fomit-frame-pointer -msse -msse2 -mmmx -Wl,-O1 -Wl,--as-needed -static-libgcc -static conftest.c >&5 configure:2224: $? = 0 configure:2262: result: a.out configure:2281: checking whether the C compiler works configure:2291: ./a.out configure:2295: $? = 139 According to exit code list this is a "Segmentation violation". I selected "Critical" as severity, since compiling even a basic gentoo system with this setup seems impossible. Reproducible: Always Steps to Reproduce: 1. use uclibc stage tarball 2. set 'static' useflag 3. try to emerge one of the mentioned packages Actual Results: !!! Please attach the following file when seeking support: !!! /var/tmp/portage/sys-devel/patch-2.6.1/work/patch-2.6.1/config.log * ERROR: sys-devel/patch-2.6.1 failed: * econf failed * * Call stack: * ebuild.sh, line 56: Called src_compile * environment, line 2651: Called econf * ebuild.sh, line 552: Called die * The specific snippet of code: * die "econf failed" * * If you need support, post the output of 'emerge --info =sys-devel/patch-2.6.1', * the complete build log and the output of 'emerge -pqv =sys-devel/patch-2.6.1'. * The complete build log is located at '/var/tmp/portage/sys-devel/patch-2.6.1/temp/build.log'. * The ebuild environment file is located at '/var/tmp/portage/sys-devel/patch-2.6.1/temp/environment'. * S: '/var/tmp/portage/sys-devel/patch-2.6.1/work/patch-2.6.1' >>> Failed to emerge sys-devel/patch-2.6.1, Log file: >>> '/var/tmp/portage/sys-devel/patch-2.6.1/temp/build.log' * Messages for package sys-devel/patch-2.6.1: * ERROR: sys-devel/patch-2.6.1 failed: * econf failed * * Call stack: * ebuild.sh, line 56: Called src_compile * environment, line 2651: Called econf * ebuild.sh, line 552: Called die * The specific snippet of code: * die "econf failed" * * If you need support, post the output of 'emerge --info =sys-devel/patch-2.6.1', * the complete build log and the output of 'emerge -pqv =sys-devel/patch-2.6.1'. * The complete build log is located at '/var/tmp/portage/sys-devel/patch-2.6.1/temp/build.log'. * The ebuild environment file is located at '/var/tmp/portage/sys-devel/patch-2.6.1/temp/environment'. * S: '/var/tmp/portage/sys-devel/patch-2.6.1/work/patch-2.6.1' I am compiling through chroot from an Arch Linux hostsystem. Packages that don't call 'configure' (like bzip2) compile fine. I recompiled gcc/uclibc/etc many times trying different things, nothing seemed to solve the problem at hand. I am no expert, so I realize I may have overlooked something obvious.
Created attachment 254551 [details] example config.log from sys-devel/patch
configure:2281: checking whether the C compiler works configure:2291: ./a.out configure:2295: $? = 139 configure:2302: error: in `/var/tmp/portage/sys-devel/patch-2.6.1/work/patch-2.6.1': configure:2306: error: cannot run C compiled programs. If you meant to cross compile, use `--host'. See `config.log' for more details. Is that filesystem mounted rw? Is executing files on that filesystem enabled (i.e. noexec is not a mount option)?
(In reply to comment #2) Actually, forget about this one: > Is that filesystem mounted rw? And focus on this one: > Is executing files on that filesystem enabled > (i.e. noexec is not a mount option)?
(In reply to comment #3) > (In reply to comment #2) > > Actually, forget about this one: > > > Is that filesystem mounted rw? > Yes it is. Obviously. > And focus on this one: > > > Is executing files on that filesystem enabled > > (i.e. noexec is not a mount option)? > I appreciate your replies, but these seem to be - no offense intended - redundant questions. How would I even be able to execute emerge or configure or anything else for that matter if the filesystem were 'noexec'.
> And focus on this one: > > > Is executing files on that filesystem enabled > > (i.e. noexec is not a mount option)? > Additional information about the filesystem: xfs formated loop device: "/dev/loop0 on /media/gentoo type xfs (rw,nosuid,nodev)" But I really don't think there is any problem with the filesystem, since I already have compiled and installed some packages without problems. I am currently in the process of rerunning the bootstrap.sh script, to make sure that the toolchain is sane.
On a hunch I changed the CHOST to "CHOST="i586-pc-linux-uclibc". With this CHOST the aforementioned packages compile fine. Switching back to i686 I see the same error again. => gcc bug?!
Testing some other combinations of variables revealed that CHOST="i686-pc-linux-uclibc" CBUILD="i586-pc-linux-uclibc also works. Could that indicate a problem with my toolchain (I ran bootstrap.sh and compiled gcc/binutils/uclibc many times with the i686 CHOST, so it should be ok)? Seems weird to me.
(In reply to comment #6) > On a hunch I changed the CHOST to "CHOST="i586-pc-linux-uclibc". With this > CHOST the aforementioned packages compile fine. Switching back to i686 I see > the same error again. > > => gcc bug?! Rather misunderstanding of the cross-compilation idea. As I guess, switching to i586- makes configure not match any compiler with that prefix and fallback to simple 'gcc' which uses your host's default compiler. Thus, as I see it, the problem is that your host system is unable to execute uclibc-based programs. In other words, you should try cross-compiling. I think you can find some information on the topic in the Embedded Handbook [1]. Feel free to reopen the bug if you really think it's an issue with Gentoo. [1] http://www.gentoo.org/proj/en/base/embedded/handbook/