gcc-2.7.2.2: cannot find "libgcc.a"

gcc-2.7.2.2: cannot find "libgcc.a"

Post by Jim Dutt » Sat, 15 Aug 1998 04:00:00



In trying to compile INN-2.1 under AIX-4.1.4.0 with GCC-2.7.7.2 and
PERL-5.00403, LD wants to open "libgcc.a" but reports that it can't find it.

Creating LD_LIBRARY_PATH with the full path to "libgcc.a" (and other system
library directories) doesn't help. Adding a compile-time LD flag for the gcc
library also did not help. Compiling UMich LDAP-3.3 with GCC-2.7.2.2 did not
encounter this problem.

So, why does GCC have a problem opening its own library?

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
gcc -o innd art.o cc.o chan.o his.o icd.o innd.o lc.o nc.o newsfeeds.o ng.o
 perl.o proc.o rc.o site.o status.o tcl.o timer.o wip.o
 ../storage/.libs/libstorage.a ../lib/.libs/libinn.a
 ../lib/perl.o -L/usr/local/lib/perl5/aix/5.00403/CORE -bE:perl.exp
 -L/usr/local/lib -L/usr/local/lib/perl5/aix/5.00403/CORE
 -lperl -lgdbm -ldbm -lld -lm -lc -lPW -lbsd

ld: 0706-005 Cannot find or open file: libgcc.a
        ld:open(): No such file or directory

 
 
 

gcc-2.7.2.2: cannot find "libgcc.a"

Post by Vic Abe » Sat, 15 Aug 1998 04:00:00



>In trying to compile INN-2.1 under AIX-4.1.4.0 with GCC-2.7.7.2 and
>PERL-5.00403, LD wants to open "libgcc.a" but reports that it can't find it.
>Creating LD_LIBRARY_PATH with the full path to "libgcc.a" (and other system
>library directories) doesn't help. Adding a compile-time LD flag for the gcc
>library also did not help. Compiling UMich LDAP-3.3 with GCC-2.7.2.2 did not
>encounter this problem.
>So, why does GCC have a problem opening its own library?
>- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
>gcc -o innd art.o cc.o chan.o his.o icd.o innd.o lc.o nc.o newsfeeds.o ng.o
> perl.o proc.o rc.o site.o status.o tcl.o timer.o wip.o
> ../storage/.libs/libstorage.a ../lib/.libs/libinn.a
> ../lib/perl.o -L/usr/local/lib/perl5/aix/5.00403/CORE -bE:perl.exp
> -L/usr/local/lib -L/usr/local/lib/perl5/aix/5.00403/CORE
> -lperl -lgdbm -ldbm -lld -lm -lc -lPW -lbsd
>ld: 0706-005 Cannot find or open file: libgcc.a
>        ld:open(): No such file or directory

Take a look at the directory, containing the gcc specifications
file, specs.  That directory can be identified with `gcc -v` and
should contain libgcc.a.  If it doesn't, that's your problem.



 
 
 

gcc-2.7.2.2: cannot find "libgcc.a"

Post by Jim Dutt » Sun, 16 Aug 1998 04:00:00





>>In trying to compile INN-2.1 under AIX-4.1.4.0 with GCC-2.7.7.2 and
>>PERL-5.00403, LD wants to open "libgcc.a" but reports that it can't find it.
>>Creating LD_LIBRARY_PATH with the full path to "libgcc.a" (and other system
>>library directories) doesn't help. Adding a compile-time LD flag for the gcc
>>library also did not help. Compiling UMich LDAP-3.3 with GCC-2.7.2.2 did not
>>encounter this problem.
>>So, why does GCC have a problem opening its own library?
>>ld: 0706-005 Cannot find or open file: libgcc.a
>>        ld:open(): No such file or directory
>Take a look at the directory, containing the gcc specifications
>file, specs.  That directory can be identified with `gcc -v` and
>should contain libgcc.a.  If it doesn't, that's your problem.

The "libgcc.a" library does reside in the same directory as the gcc "specs"
file?

Here, though, is something REALLY FUNKY:

- I did a MAN on GCC and saw a debug option of "-print-libgcc-file-name"

- I added said debug option to the INN LDFLAGS definition and reran INN's make

- it went off and recreated all of the (build) Makefiles and proceeded with
  compiling everything

- periodically, GCC would spit out,

        gcc -print-libgcc-file-name -o <filename> <filename>.o <local lib defs>
        /usr/local/...../2.7.2.2/libgcc.a

- NOW, for some unknown reason, the stupid compile completes 100% successfully!

HUH ? ! ? ! ? ! ?

I have been "banging my head against the wall" for several days about this
"cannot find or opeen file: libgcc.a" problem, and here I only had to add a
debug option to tell GCC to print out its library name ????? Say WHAT ???

 
 
 

gcc-2.7.2.2: cannot find "libgcc.a"

Post by Walter Harm » Fri, 21 Aug 1998 04:00:00


check all options that are used to call the ld some of them seems to
interfere with libloading causing ld to miss the libgcc.a

        walter

--
-----
I got my BS Degree from the U of NIX.
-----