Console trouble with glibc compiled with gcc-3.4.x

Martin Schaffner
Fri Jul 30 23:10:00 GMT 2004

> Martin Schaffner wrote:
>> I am maintaining the Linux from Scratch Hint "LFS from OSX"  
>> ( I  
>> tried cross-compiling glibc-2.3.2 using Mac OS X as build for a  
>> GNU/Linux/PPC host. I use crosstool-0.28-rc28 available from   
>>  If I compile glibc-2.3.2 using gcc-3.3.3, everything is OK.
>>  If I compile glibc-2.3.2 using gcc-3.4.0 or gcc-3.4.1, then the  
>> console is broken: It doesn't display the bash prompt, and it echoes  
>> input but doesn't process it (like after typing `cat > /dev/null`).
>> What I found out later:
>>  glibc-build is 488M after compiling with gcc-3.3.3 but only 198M
>>  after compiling with gcc-3.4.1. The difference is distributed
>>  evenly among the subdirectories. This convinces me that the problem  
>> is in glibc.

Dan Kegel wrote:
> How about testing chimeric glibc's, i.e. ones compiled half
> with gcc-3.3.3, half with gcc-3.4.1?  You could do that
> by hitting ^C partway through the build and changing the PATH,
> I imagine.  (Or by selectively removing .o's and rerunning the build.)
> This ought to let you zero in on what part of glibc is being
> miscompiled...
> - Dan

Ryan Oliver wrote:
> Did you build bash static or shared?

I narrowed down the problem:
I built bash statically by adding the following to the final link  
command that creates "bash":
-static -nostdlib  

This gives an executable for which "readelf" tells me that it does not  
require an interpreter (like /tools/lib/

But when I boot with init=/bash, the console works only if  
/lib/ is compiled with gcc-3.3.3, not with gcc-3.4.1. I  
uploaded these two files, as well as my "static" bash: 

The first remarkable thing is that the version compiled with 3.4.1 is ~  
30 MB, but the other version is only ~ 11 MB.

I have a second problem with my LFS-from-OSX effort: Once I booted into  
the system in /tools, most things work, but if I try to compile a  
"hello world", I get:
linux-gnu/bin/ld: cannot open crt1.o: No such file or directory
collect2: ld returned 1 exit status

I tried with ld compiled with both LIB_PATH=/tools/lib and with no  
LIB_PATH, but saw no difference.

The file /tools/lib/crt1.o exists, but is not obviously not found by  
ld. --verbose gives me:
Reading specs from /tools/lib/gcc-lib/powerpc-750-linux-gnu/3.3.3/specs
linux-gnu/bin/as -mppc -V -Qy -o ./cc6iQp8l.o ./cclzxxOd.s
GNU assembler version 2.14 (powerpc-750-linux-gnu) using BFD version  
2.14 20030612
  /tools/lib/gcc-lib/powerpc-750-linux-gnu/3.3.3/collect2 --eh-frame-hdr  
-V -Qy -m elf32ppclinux -dynamic-linker /lib/ -o h crt1.o crti.o  
-750-linux-gnu/lib ./cc6iQp8l.o -lgcc -lgcc_eh -lc -lgcc -lgcc_eh  
/tools/lib/gcc-lib/powerpc-750-linux-gnu/3.3.3/crtend.o crtn.o
linux-gnu/bin/ld: cannot open crt1.o: No such file or directory
GNU ld version 2.14 20030612
   Supported emulations:
collect2: ld returned 1 exit status


Want more information?  See the CrossGCC FAQ,
Want to unsubscribe? Send a note to

More information about the crossgcc mailing list