public inbox for gcc-help@gcc.gnu.org
 help / color / mirror / Atom feed
* checking whether the C compiler works... no
@ 2003-12-16 13:50 Reed Lawson
  2003-12-16 17:06 ` Rupert Wood
  0 siblings, 1 reply; 3+ messages in thread
From: Reed Lawson @ 2003-12-16 13:50 UTC (permalink / raw)
  To: gcc-help

Hi, I'll try to be breif...
I am on i686-pc-linux-gnu and want a toolchain for
i386-pc-linux-gnu Should be no problem, right? (ehem)
The i386 is a TS-3300 (mini i386 33 pc with no fpu)
running linux.

I sucessfully built the binutils-2.14 and glibc-2.3.2
but gcc-3.3.2 is stopping on: 
checking whether the C compiler works ... no
make: *** [configure-target-libiberty] Error 1

config.status looks like this:
# This file was generated automatically by configure. 
Do not edit.
# This directory was configured as follows:
../gcc-3.3.2/configure
--with-gcc-version-trigger=/home/reed/build/gcc/gcc-3.3.2/gcc/version.c
--host=i686-pc-linux-gnu
--prefix=/home/reed/rl/dev/toolroot
--target=i386-pc-linux-gnu --nfp --norecursion
#  using "mt-frag"

I looked in i386-pc-linux-gnu/libiberty/config.log
and see:

configure:2392: checking whether the C compiler (
/home/reed/build/gcc/build-gcc/gcc/xgcc
-B/home/reed/build/gcc/build-gcc/gcc/
-B/home/reed/rl/dev/toolroot/i386-pc-linux-gnu/bin/
-B/home/reed/rl/dev/toolroot/i386-pc-linux-gnu/lib/
-isystem
/home/reed/rl/dev/toolroot/i386-pc-linux-gnu/include
-O2 -g -O2 ) works
configure:2408: 
/home/reed/build/gcc/build-gcc/gcc/xgcc
-B/home/reed/build/gcc/build-gcc/gcc/
-B/home/reed/rl/dev/toolroot/i386-pc-linux-gnu/bin/
-B/home/reed/rl/dev/toolroot/i386-pc-linux-gnu/lib/
-isystem
/home/reed/rl/dev/toolroot/i386-pc-linux-gnu/include
-o conftest -O2 -g -O2   conftest.c  1>&5
/home/reed/rl/dev/toolroot/i386-pc-linux-gnu/bin/ld:
warning: ld-linux.so.2, needed by
/home/reed/rl/dev/toolroot/lib/libc.so.6, not found
(try using -rpath or
-rpath-link)
/

But LOOK! It's right there in the same place as
it found  libc.so.6!

reed@barbados:~/rl/dev/toolroot/lib$ ls -l
ld-linux.so.2 ld-2.3.2.so
-rwxr-xr-x    1 reed     reed       692062 Dec 12
08:16 ld-2.3.2.so
lrwxrwxrwx    1 reed     reed           11 Dec 12
08:16 ld-linux.so.2 -> ld-2.3.2.so

So, why can't it find ld-linux.so.2? Humm?

Thanks,
- Reed.




=====
Reed Lawson

^ permalink raw reply	[flat|nested] 3+ messages in thread

* RE: checking whether the C compiler works... no
  2003-12-16 13:50 checking whether the C compiler works... no Reed Lawson
@ 2003-12-16 17:06 ` Rupert Wood
  2003-12-17 16:26   ` Reed Lawson
  0 siblings, 1 reply; 3+ messages in thread
From: Rupert Wood @ 2003-12-16 17:06 UTC (permalink / raw)
  To: 'Reed Lawson'; +Cc: gcc-help

Reed Lawson wrote:

> warning: ld-linux.so.2, needed by /home/reed/rl/dev/toolroot/lib/
> libc.so.6, not found (try using -rpath or -rpath-link)

I'm well behind on cross-compilers - haven't built one for ages - so I can't
pick up the subtleties in those error messages. But here's a couple of
ideas:

1. there's a libc.la file (or thereabouts). This is a linker script and may
contain an absolute path, e.g. /lib/ld-linux.so.2, which you'll need to
change. I don't think the toolchain scripts deal with .la files yet.

2. the path to libc.so.6 could be hard-coded into GCC and it might not have
a library search for your toolchain/lib. You can add '-v' to the compile
line to check; look for the '-L's in the link line.

Good luck,
Rup.

^ permalink raw reply	[flat|nested] 3+ messages in thread

* RE: checking whether the C compiler works... no
  2003-12-16 17:06 ` Rupert Wood
@ 2003-12-17 16:26   ` Reed Lawson
  0 siblings, 0 replies; 3+ messages in thread
From: Reed Lawson @ 2003-12-17 16:26 UTC (permalink / raw)
  To: Rupert Wood; +Cc: gcc-help


--- Rupert Wood <me@rupey.net> wrote:
> Reed Lawson wrote:
> 
> > warning: ld-linux.so.2, needed by
> /home/reed/rl/dev/toolroot/lib/
> > libc.so.6, not found (try using -rpath or
> -rpath-link)
> 
> I'm well behind on cross-compilers - haven't built
> one for ages - so I can't
> pick up the subtleties in those error messages. 

Is it really a cross-compile? Heck, its a 386!

> But here's a couple of ideas:
> 
> 1. there's a libc.la file (or thereabouts). This is
> a linker script and may
> contain an absolute path, e.g. /lib/ld-linux.so.2,
> which you'll need to
> change. I don't think the toolchain scripts deal
> with .la files yet.

reed@barbados:~/build/gcc$ find gcc-3.3.2 -name "*.la"
reed@barbados:~/build/gcc$ find build-gcc  -name
"*.la"
reed@barbados:~/build/gcc$ find build-glib -name
"*.la"
reed@barbados:~/build/gcc$ find glibc-2.3.2 -name
"*.la"
reed@barbados:~/build/gcc$ cd ~/rl/dev/toolroot
reed@barbados:~/rl/dev/toolroot$ find . -name "*.la"
reed@barbados:~/rl/dev/toolroot$

Where exactly is that file? is that a "one" or an
"ell"? I cut and pasted from you mail, and I
tried both 1 and l as well as libc.la.
nothing.

> 2. the path to libc.so.6 could be hard-coded into
> GCC and it might not have
> a library search for your toolchain/lib. You can add
> '-v' to the compile
> line to check; look for the '-L's in the link line.

Well, I guess I could just hack the configure script
to ADD the path. However, won't it just break at the
next place its needed?  Do I need to rewrite the 
script to get it to work or is there something else
wrong with my setup....

> Good luck,
> Rup.

Thank you for the suggestions! I still need to try
#2. just ran out of time. Have to go to my Day job.
:-)

Thanks!!!



=====
Reed Lawson

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2003-12-17 16:26 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-12-16 13:50 checking whether the C compiler works... no Reed Lawson
2003-12-16 17:06 ` Rupert Wood
2003-12-17 16:26   ` Reed Lawson

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).