aed@netcom.UUCP (Andrew Davidson) (01/15/91)
Organization: Netcom- The Bay Area's Public Access Unix System {408 241-9760 guest}
Keywords: ld ranlib ar
Hi
Is there a problem with ranlib on SCO UNIX? here is what happends
when I tried to use it
rm -f libwi.a
ar cq libwi.a wimain.o
ranlib libwi.a
ranlib: libwi.a: not an archive
I noticed that the makefile defines the following internal rule
.c.a:
does not use ranlib at all?
I also have the following error
g++ -o proto proto.cc -g -DSYSV -DXSIGHT -DMOTIF \
-I. -I/y/cats/r1_00p2.work/lib \
/y/cats/r1_00p2.work/lib/ui/libui.a \
/y/cats/r1_00p2.work/lib/wi/libwi.a \
/y/cats/r1_00p2.work/lib/mi/libmi.a \
/y/cats/r1_00p2.work/lib/tcl/tcl.a \
-lXm -lXt -lX11 -lsocket -lmalloc -lm -lg++
ld proto.o fatal: Can't open file for input
ttest: /y/cats/r1_00p2.work/lib/ui/libui.a: cannot execute
but the file exists and is owned by me.
56% ll /y/cats/r1_00p2.work/lib/ui/libui.a
-rw------- 1 everett group 1101674 Jan 14 13:54 /y/cats/r1_00p2.work/lib/u
i/libui.a
Why does ld need to open the library for input
Any Ideas? Thanks Andy
--
-----------------------------------------------------------------
"bede-bede-bede Thats all Folks"
Porky Pig
Andy Davidson
Woodside CA.
aed@netcom
-----------------------------------------------------------------allbery@NCoast.ORG (Brandon S. Allbery KB8JRR) (01/18/91)
As quoted from <20886@netcom.UUCP> by aed@netcom.UUCP (Andrew Davidson): +--------------- | Is there a problem with ranlib on SCO UNIX? here is what happends | when I tried to use it | | rm -f libwi.a | ar cq libwi.a wimain.o | ranlib libwi.a | ranlib: libwi.a: not an archive +--------------- "ranlib" is for Xenix libraries. UNIX uses an archive symbol table which is maintained by "ar"; this makes a separate "ranlib" unnecessary. The error "not an archive" comes from the fact that Xenix archives (xar) and UNIX archives (ar) have different formats. +--------------- | g++ -o proto proto.cc -g -DSYSV -DXSIGHT -DMOTIF \ | -I. -I/y/cats/r1_00p2.work/lib \ | /y/cats/r1_00p2.work/lib/ui/libui.a \ | /y/cats/r1_00p2.work/lib/wi/libwi.a \ | /y/cats/r1_00p2.work/lib/mi/libmi.a \ | /y/cats/r1_00p2.work/lib/tcl/tcl.a \ | -lXm -lXt -lX11 -lsocket -lmalloc -lm -lg++ | | ld proto.o fatal: Can't open file for input | ttest: /y/cats/r1_00p2.work/lib/ui/libui.a: cannot execute +--------------- Looks like garbage somewhere. Most likely, there's a space after the back- slash on the "-I. ..." line in the Makefile; this would cause ld to try to open the file " " for input (note the unsual spacing on that error line!), and make would then execute the remaining lines as commands (the "cannot execute" message). ++Brandon -- Me: Brandon S. Allbery VHF/UHF: KB8JRR on 220, 2m, 440 Internet: allbery@NCoast.ORG Packet: KB8JRR @ WA8BXN America OnLine: KB8JRR AMPR: KB8JRR.AmPR.ORG [44.70.4.88] uunet!usenet.ins.cwru.edu!ncoast!allbery Delphi: ALLBERY