public inbox for gcc-help@gcc.gnu.org
 help / color / mirror / Atom feed
* GCC 2.95.3 Cross-Compiler for Linux-PPC - libiberty configure fai lure
@ 2002-01-17  6:50 Rocha Iran-QIR001
  0 siblings, 0 replies; only message in thread
From: Rocha Iran-QIR001 @ 2002-01-17  6:50 UTC (permalink / raw)
  To: 'gcc-help@gcc.gnu.org'

Date: Thu, 17 Jan 2002 08:50:23 -0600
MIME-Version: 1.0
X-Mailer: Internet Mail Service (5.5.2654.52)
Content-Type: text/plain;
	charset="iso-8859-1"

Hi,

I am trying to install GCC 2.95.3 as a cross-compiler with the following configuration:

host:                            sparc-sun-solaris2.6
target:                          powerpc-unknown-linux-gnu
--with-gnu-as and --with-gnu-ld: GNU Binutils 2.11 installation of cross-assm and cross-linker
--enable-threads:                I'm not defining the threads type during configuration

Configure is called a few times during the build but the following call fails:

Configuring in powerpc-unknown-linux-gnu/libiberty
creating cache ./config.cache
checking host system type... powerpc-unknown-linux-gnu
checking build system type... sparc-sun-solaris2.6
checking for powerpc-unknown-linux-gnu-ar... powerpc-unknown-linux-gnu-ar
checking for powerpc-unknown-linux-gnu-ranlib... powerpc-unknown-linux-gnu-ranlib
checking for gcc... /export/usr1/srv/data/objdir/gcc/xgcc -B/export/usr1/srv/data/objdir/gcc/ -B/mot/proj/vendor/public_domain/gcc/2.95.3
/A11/powerpc-unknown-linux-gnu/bin/
checking whether we are using GNU C... yes
checking whether /export/usr1/srv/data/objdir/gcc/xgcc -B/export/usr1/srv/data/objdir/gcc/ -B/mot/proj/vendor/public_domain/gcc/2.95.3/A1
1/powerpc-unknown-linux-gnu/bin/ accepts -g... yes
checking for POSIXized ISC... no
checking for a BSD compatible install... ../../../gcc-2.95.3/libiberty/../install-sh -c
checking how to run the C preprocessor... /export/usr1/srv/data/objdir/gcc/xgcc -B/export/usr1/srv/data/objdir/gcc/ -B/mot/proj/vendor/pu
blic_domain/gcc/2.95.3/A11/powerpc-unknown-linux-gnu/bin/ -E
checking for sys/file.h... yes
checking for sys/param.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for unistd.h... yes
checking for strings.h... yes
checking for sys/time.h... yes
checking for sys/resource.h... yes
checking for sys/wait.h that is POSIX.1 compatible... yes
checking whether the C compiler (/export/usr1/srv/data/objdir/gcc/xgcc -B/export/usr1/srv/data/objdir/gcc/ -B/mot/proj/vendor/public_doma
in/gcc/2.95.3/A11/powerpc-unknown-linux-gnu/bin/ -g -O2 ) works... no
configure: error: installation or configuration problem: C compiler cannot create executables.

Since no Makefile for libiberty was generated, the whole build fails as follows:

make[2]: Entering directory `/export/usr1/srv/data/objdir/powerpc-unknown-linux-gnu/libiberty'
make[2]: *** No targets specified and no makefile found.  Stop.
make[2]: Leaving directory `/export/usr1/srv/data/objdir/powerpc-unknown-linux-gnu/libiberty'
make[1]: *** [../libiberty/libiberty.a] Error 2
make[1]: Leaving directory `/export/usr1/srv/data/objdir/powerpc-unknown-linux-gnu/libstdc++'
make: *** [all-target-libstdc++] Error 2

When I tail <build directory>/powerpc-unknown-linux-gnu/libiberty/config.log I see the following explanation for the failure:

configure:1765: /export/usr1/srv/data/objdir/gcc/xgcc -B/export/usr1/srv/data/objdir/gcc/ -B/mot/proj/vendor/public_domain/gcc/2.95.3/A11/powerpc-
unknown-linux-gnu/bin/ -o conftest -g -O2   conftest.c  1>&5
/usr/misc/GNU/binutils-2.11/bin/powerpc-unknown-linux-gnu-ld: cannot find -lc
collect2: ld returned 1 exit status

For some reason, the binary xgcc that was previously built is not able to compile because it cannot find libc. I have provided to the build a copy of libc from my target machine along with other libraries and include files using the --with-headers and --with-libs configure options. However, for some reason xgcc is still not able to find it. 

I was able to reproduce the problem by opening another shell and trying to compile a simple "Hello World" C program with xgcc as follows:

> /export/usr1/srv/data/objdir/gcc/xgcc -B/export/usr1/srv/data/objdir/gcc/ -B/mot/proj/vendor/public_domain/gcc/2.95.3/A11 -g -O2 my.c
/usr/misc/GNU/binutils-2.11/bin/powerpc-unknown-linux-gnu-ld: cannot find -lc
collect2: ld returned 1 exit status

Interesting enough, xgcc knows how to get to the libraries when I ask it to print the name of libgcc:

srv(usr)[403]> /export/usr1/srv/data/objdir/gcc/xgcc -print-libgcc-file-name
/mot/proj/vendor/public_domain/gcc/2.95.3/A11/powerpc-unknown-linux-gnu/lib/libgcc.a
srv(usr)[404]> ls /mot/proj/vendor/public_domain/gcc/2.95.3/A11/powerpc-unknown-linux-gnu/lib 
COPIED              crt1.o              crtn.o              libc-2.1.3.so*      libgcc.a            libm.a              libstdc++.a.2.10.0
Mcrt1.o             crti.o              gcrt1.o             libc.so.6@          libm-2.1.3.so*      libm.so.6@

I tried also to specify the path to libc using -L w/o success.

Am I missing something? I cannot identify the reason for the failure? Would anyone be able to help me?

Thank you in advance, 
Rocha

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2002-01-17 14:50 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-01-17  6:50 GCC 2.95.3 Cross-Compiler for Linux-PPC - libiberty configure fai lure Rocha Iran-QIR001

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).