Hi all,

I'm having link problem which comes up first time when configuring gawk:

[EMAIL PROTECTED]:/mnt/lfs/sources/gawk-3.1.4$ ./configure --prefix=/tools
...
checking for gcc... gcc
checking for C compiler default output file name... configure: error:
C compiler cannot create executables
See `config.log' for more details.

I checked several things, and narrowed problem with these steps:

Sanity check:

[EMAIL PROTECTED]:/mnt/lfs/sources$ echo 'main(){}' > dummy.c
[EMAIL PROTECTED]:/mnt/lfs/sources$ cc dummy.c
/mnt/lfs/tools/bin/../lib/gcc/i686-pc-linux-gnu/3.4.1/../../../../i686-pc-linux-gnu/bin/ld:
warning: ld-linux.so.2, needed by /tools/lib/libc.so.6, not found (try
using -rpath or -rpath-link)
/tools/lib/libc.so.6: undefined reference to [EMAIL PROTECTED]'
... (several lines removed)
/tools/lib/libc.so.6: undefined reference to [EMAIL PROTECTED]'
collect2: ld returned 1 exit status

Sanity check actually worked first time I tryed it in chapter 5.9.
Adjusting the Toolchain.

Then some checks:

[EMAIL PROTECTED]:/mnt/lfs/sources$ which cc
/tools/bin/cc     (<= that is symbolic link to gcc)

[EMAIL PROTECTED]:/mnt/lfs/sources$ cc --print-file specs
/mnt/lfs/tools/bin/../lib/gcc/i686-pc-linux-gnu/3.4.1/specs

[EMAIL PROTECTED]:/mnt/lfs/sources$ grep /lib/ld-linux.so.2
/mnt/lfs/tools/bin/../lib/gcc/i686-pc-linux-gnu/3.4.1/specs
%{!static:--eh-frame-hdr} -m elf_i386 %{shared:-shared}   %{!shared:  
  %{!ibcs:       %{!static:      %{rdynamic:-export-dynamic}       
%{!dynamic-linker:-dynamic-linker /tools/lib/ld-linux.so.2}}   
%{static:-static}}}

[EMAIL PROTECTED]:/mnt/lfs/sources$ cc -dumpspecs | grep ld-linux.so.2
%{!static:--eh-frame-hdr} -m elf_i386 %{shared:-shared}   %{!shared:  
  %{!ibcs:       %{!static:      %{rdynamic:-export-dynamic}       
%{!dynamic-linker:-dynamic-linker /lib/ld-linux.so.2}} 
%{static:-static}}}

Ok, here is point on which I need help, it seems that I have done that
sed command right as instructed, but problem is that ld uses some
other spec than it should.

How I can check which spec cc prints?
How can I change cc to use correct spec?

Sorry for long post, I'm new with LFS and thus cannot see essential
points so I just provided all I could think of.

:)Marko
-- 
http://linuxfromscratch.org/mailman/listinfo/lfs-support
FAQ: http://www.linuxfromscratch.org/lfs/faq.html
Unsubscribe: See the above information page

Reply via email to