LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   glibc fails to build (https://www.linuxquestions.org/questions/linux-software-2/glibc-fails-to-build-595407/)

pauledwards03 10-29-2007 04:11 AM

glibc fails to build
 
I am using gentoo 2007.0 with a custom kernel. I'm totally new to gentoo but have been using linux for about 2 years now. When I was going through the install process, I did not set any use flags in /etc/make.conf.

My make.conf file now looks like:

Code:

# These settings were set by the catalyst build script that automatically
# built this stage.
# Please consult /etc/make.conf.example for a more detailed example.
CFLAGS="-O2 -pipe"
CXXFLAGS="${CFLAGS}"
# This should not be changed unless you know exactly what you are doing.  You
# should probably be using a different stage, instead.
CHOST="x86_64-pc-linux-gnu"

MAKEOPTS="-j3"

GENTOO_MIRRORS="http://gentoo.osuosl.org/ "
INPUT_DEVICES="keyboard mouse"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
VIDEO_CARDS="nvidia"
USE="X wxwindows imlib gtk2 gtk png jpeg java alsa gtkhtml -ipv6 truteype"

since I added these new use flags I thought it would be a good idea to do emerge world. (emerge -uavDN world). when I do this it fails with the following error:
Code:


checking size of long double... configure: error: cannot compute sizeof (long double), 77

See `config.log' for more details.

 *

 * ERROR: sys-libs/glibc-2.6.1 failed.

 * Call stack:

 *  ebuild.sh, line 1654:  Called dyn_compile

 *  ebuild.sh, line 990:  Called qa_call 'src_compile'

 *  ebuild.sh, line 44:  Called src_compile

 *  glibc-2.6.1.ebuild, line 147:  Called eblit-run 'src_compile'

 *  glibc-2.6.1.ebuild, line 143:  Called eblit-glibc-src_compile

 *  src_compile.eblit, line 168:  Called src_compile

 *  glibc-2.6.1.ebuild, line 147:  Called eblit-run 'src_compile'

 *  glibc-2.6.1.ebuild, line 143:  Called eblit-glibc-src_compile

 *  src_compile.eblit, line 179:  Called toolchain-glibc_src_compile

 *  src_compile.eblit, line 120:  Called glibc_do_configure 'nptl'

 *  src_compile.eblit, line 97:  Called die

 *

 * failed to configure glibc

 * If you need support, post the topmost build error, and the call stack if relevant.

 * A complete build log is located at '/var/tmp/portage/sys-libs/glibc-2.6.1/temp/build.log'.

 *


 * Messages for package sys-libs/glibc-2.6.1:

 *
 * ERROR: sys-libs/glibc-2.6.1 failed.
 * Call stack:
 *  ebuild.sh, line 1654:  Called dyn_compile
 *  ebuild.sh, line 990:  Called qa_call 'src_compile'
 *  ebuild.sh, line 44:  Called src_compile
 *  glibc-2.6.1.ebuild, line 147:  Called eblit-run 'src_compile'
 *  glibc-2.6.1.ebuild, line 143:  Called eblit-glibc-src_compile
 *  src_compile.eblit, line 168:  Called src_compile
 *  glibc-2.6.1.ebuild, line 147:  Called eblit-run 'src_compile'
 *  glibc-2.6.1.ebuild, line 143:  Called eblit-glibc-src_compile
 *  src_compile.eblit, line 179:  Called toolchain-glibc_src_compile
 *  src_compile.eblit, line 120:  Called glibc_do_configure 'nptl'
 *  src_compile.eblit, line 97:  Called die
 *
 * failed to configure glibc
 * If you need support, post the topmost build error, and the call stack if relevant.
 * A complete build log is located at '/var/tmp/portage/sys-libs/glibc-2.6.1/temp/build.log'.
 *

this may be related or not, but I emerged firefox and it would not work, then I ran the executable firefox I had from my other drive and that failed with the same error. After that firefox works fine. Opera does not. It fails with the same error that firefox had:
Code:

/usr/bin/opera: line 222: /opt/opera/lib/opera/9.24-20071015.6/opera: cannot execute binary file
/usr/bin/opera: line 222: /opt/opera/lib/opera/9.24-20071015.6/opera: success

Other than that, I love gentoo already :)

pauledwards03 10-30-2007 01:17 PM

anybody have any suggestions?

osor 10-30-2007 02:02 PM

What does the corresponding config.log say? It might be located at /var/tmp/portage/sys-libs/glibc-2.6.1/work/build-${foo}/config.log, where the value of foo depends on your setup. Also, what compiler and binutils do you have?

If you are stuck, please post (to a pastebin), the contents of /var/tmp/portage/sys-libs/glibc-2.6.1/temp/build.log and /var/tmp/portage/sys-libs/glibc-2.6.1/work/build-${foo}/config.log.

pauledwards03 10-30-2007 11:23 PM

this is the config.log:

http://pastebin.com/m6d00e18a
build.log:

http://pastebin.com/m357801cb

binutils:

ld -v : GNU ld (GNU Binutils) 2.18

compiler: (i think. i did "cc -v" to find out)
gcc version 4.1.1 (Gentoo 4.1.1-r3)

osor 10-31-2007 09:19 PM

From your pastebins, it seems there is a problem with your multi-lib setup. A few more questions: What version of glibc do you currently have? Can your binutils generate x86 and x86_64 executables? Can your gcc generate x86 and x86_64 executables? Does your current glibc support both ABIs? What happens when you run such an executable (one which is dynamically linked to glibc)?

To do a diagnostic check, try the following in a terminal (where $ is the command prompt):
Code:

$ echo -e '#include <stdio.h>\nint main() { puts("The use of this function requires glibc"); return 0; }' | x86_64-pc-linux-gnu-gcc -m32 -x c - -o test
$ ./test

The first line should compile and link a “dummy” program as a 32-bit executable. The second line will attempt to run it.

If my suspicion is correct, your multilib setup does not work and your binary interpreter cannot locate the x86 dynamic loader (which is why you can’t execute opera—an i386 executable).

Now, try the following:
Code:

$ echo -e '#include <stdio.h>\nint main() { puts("The use of this function requires glibc"); return 0; }' | x86_64-pc-linux-gnu-gcc -static -m32 -x c - -o test
$ ./test

Is there a difference?

pauledwards03 10-31-2007 11:16 PM

those commands just hung, i created a file called test with the code you mentioned in it and tried to compile that with gcc with -m32 and -static, it hangs just the same and does not do anything. But I solved the problem with the cannot execute binary files and the emerge glibc problem by recompiling my kernel with support for MISC binaries, ELF binaries and IA32 emulation. so far everything is working.


All times are GMT -5. The time now is 10:26 PM.