X-Authentication-Warning: delorie.com: mailnull set sender to djgpp-bounces using -f Message-ID: <3C32B63E.473EBF65@gmx.de> From: schaecsn X-Mailer: Mozilla 4.76 [en] (X11; U; Linux 2.4.17 i586) X-Accept-Language: en MIME-Version: 1.0 Newsgroups: comp.os.msdos.djgpp Subject: Re: cannot find -lgcc References: Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Lines: 134 Date: Wed, 02 Jan 2002 07:27:18 GMT NNTP-Posting-Host: 165.247.200.233 X-Complaints-To: abuse AT earthlink DOT net X-Trace: newsread1.prod.itd.earthlink.net 1009956438 165.247.200.233 (Tue, 01 Jan 2002 23:27:18 PST) NNTP-Posting-Date: Tue, 01 Jan 2002 23:27:18 PST Organization: EarthLink Inc. -- http://www.EarthLink.net X-Received-Date: Tue, 01 Jan 2002 23:27:20 PST (newsmaster1.prod.itd.earthlink.net) To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Reply-To: djgpp AT delorie DOT com Hi Eli, thanks for a reply. (them most interesting fact is derived from the --Xliner --verbose parameter shown further below). > On Tue, 1 Jan 2002, schaecsn wrote: > > hi just installed djgpp-2.03, gcc-3.0.3 and some other utilites. > > What version of Binutils did you install? What does "ld --version" > print? GNU ld 2.11.2 > > >gcc hello.c -o hello.exe -O2 -Wall > > c:/djgpp/bin/ld.exe: cannot find -lgcc > > collect2: ld returned 1 exit status > > > > Well, I do have libgcc.a: > > >find / | grep libgcc.a > > /djgpp/lib/gcc-lib/djgpp/3.03/libgcc.a > > Was this "find / | grep" command invoked from the DOS box or from the > Linux shell prompt? If the latter, it's not an evidence that the DJGPP > linker will see the file, because that depends on how the C: drive is > mapped. Please make sure the library is visible from the DOS box. find from within the dosbox. ( the ">" supposed to be the dos prompt ;-) ) > > when I compile a C file with -v I get that at the end: > > c:/djgpp/lib/gcc-lib/djgpp/3.03/collect2.exe c:/djgpp/lib/crt0.o > > -Lc:/djgpp/lib -Lc:/djgpp/lib/gcc-lib/djgpp/3.03 -Lc:/djgpp/bin -Lc:/djgpp/lib > > -Lc:/djgpp/lib/gcc-lib/djgpp/3.03/../../.. C:\TMP\cc0iOfUR.o -lgcc -lc -lgcc > > -Tdjgpp-x.djl > > c:/djgpp/bin/ld.exe: cannot find -lgcc > > First, please show the entire output of compiling with -v, not just some > part of it. The parts that you removed could have vital clues to the > nature of your problem. that was my intention but most output scrolls away and I have no clue how to write the output into a textfile unter dos. the unix way - a little bit simplified - doesn't work: gcc -v hello.c > out or gcc -v hello.c 2> out). so here you get everything I could capture from the 80x24 screen: (actually, just 2 or three lines are missing). c:/djgpp/lib/gcc-lib/djgpp/3.03/cc1.exe -lang-c -remap -imacros c:/djgpp/lib/gc c-lib/djgpp/3.03/djgpp.ver -v -D__GNUC__=3 -D__GNUC_MINOR__=0 -D__GNUC_PATCHLEVE L__=3 -D__MSDOS__ -D__GO32__ -D__DJGPP__=2 -D__unix__ -D__MSDOS__ -D__GO32__ -D_ _DJGPP__=2 -D__unix__ -Asystem=msdos -Asystem=unix -D__NO_INLINE__ -D__STDC_HOST ED__=1 -Acpu=i386 -Amachine=i386 -Di386 -D__i386 -D__i386__ -D__tune_i586__ -D__ tune_pentium__ -DMSDOS -DGO32 -DDJGPP=2 -Dunix hello.c -quiet -dumpbase hello.c -version -o C:\TMP\cccaSPys.s GNU CPP version 3.0.3 (cpplib) (80386, BSD syntax) GNU C version 3.0.3 (djgpp) compiled by GNU C version 3.0.3. ignoring nonexistent directory "c:/djgpp/djgpp/include" #include "..." search starts here: #include <...> search starts here: c:/djgpp/lib/gcc-lib/djgpp/3.03/include c:/djgpp/include End of search list. c:/djgpp/bin/as.exe --traditional-format -o C:\TMP\ccWKDBdR.o C:\TMP\cccaSPys.s c:/djgpp/lib/gcc-lib/djgpp/3.03/collect2.exe c:/djgpp/lib/crt0.o -Lc:/djgpp/lib -Lc:/djgpp/lib/gcc-lib/djgpp/3.03 -Lc:/djgpp/bin -Lc:/djgpp/lib -Lc:/djgpp/lib/ gcc-lib/djgpp/3.03/../../.. C:\TMP\ccWKDBdR.o -lgcc -lc -lgcc -Tdjgpp-x.djl c:/djgpp/bin/ld.exe: cannot find -lgcc collect2: ld returned 1 exit status > Second, what happens if you use the "-Xlinker --verbose" switch on the > compilation command line--does this give any clues about the nature of > the problem? How about "-Xlinker --trace"? >gcc -Xlinker --verbose hello.c c:/djgpp/bin/ld.exe: cannot find -lgcc GNU ld version 2.11.2 (with BFD 2.11.2) Supported emulations: i386go32 cannot find script file djgpp-x.djl cannot find script file c:/djgpp/lib/djgpp-x.djl opened script file c:/djgpp/lib/gcc-lib/djgpp/3.03/djgpp-x.djl attempt to open c:/djgpp/lib/crt0.o succeeded c:/djgpp/lib/crt0.o attempt to open C:\TMP\cccRjwil.o succeeded C:\TMP\cccRjwil.o attempt to open c:/djgpp/lib/libgcc.a failed attempt to open c:/djgpp/lib/gcc-lib/djgpp/3.03/libgcc.a failed attempt to open c:/djgpp/bin/libgcc.a failed attempt to open c:/djgpp/lib/libgcc.a failed attempt to open c:/djgpp/lib/gcc-lib/djgpp/3.03/../../../libgcc.a failed attempt to open c:/djgpp/bin/../lib/libgcc.a failed collect2: ld returned 1 exit status ops: attempt to open c:/djgpp/lib/gcc-lib/djgpp/3.03/libgcc.a failed but it is there (the attrib is just a). >dir c:\djgpp\lib\gcc-lib\djgpp\3.03\libgcc.a LIBGCC A 66800 12-21-01 12:47p (copying libgcc.a to /djgpp/lib doesn't help, either). >gcc -Xlinker --trace hello.c c:/djgpp/bin/ld.exe: cannot find -lgcc c:/djgpp/bin/ld.exe: mode i386go32 c:/djgpp/lib/crt0.o C:\TMP\ccsn7dW3.o collect2: ld returned 1 exit status > Finally, it's possible that your libgcc.a is somehow damaged. Try > listing its contents with, e.g., "nm -A", and see if there are some error > messages. no error messages from nm -A libgcc.a. - Stefan