Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

collect2: libncurses.a: not a COFF file

Status
Not open for further replies.

Morsing

Technical User
Jun 25, 2002
881
GB

I'm trying to compile Bash-2.05b with GCC-2.95.3 but get the error in the subject.
The file is a link to /usr/ccs/lib/libxcurses.a which is of type "archive (big format)".

The gcc compiler is from Bull freeware compiled for AIX 5.1 although I'm using 5.2.

Cheers

Henrik Morsing
Certified AIX 4.3 Systems Administration
& p690 Technical Support
 
Ok, I found lots of information but no fix. Here is what I did to fix it. very ugly but worked. Note: this only works for 32 bit code. If you use 64 bit libs, your out of luck.

xcoff is the big format ( extended coff ) you need to convert the libs ( in your case libxcurses.a ) to small format. copy the lib into a new dir ( /tools/tmp for example )
run ar -X32 -x ./LIBNAME
this unpacks the 32 bit objects from the lib
rm ./LIBNAME
ar -v -q NEWLIBNAME ./*
this packs the 32 bit objects into a new lib
ar -g NEWLIBNAME
MAKE SURE YOU USE A DIFFERENT LIB NAME OR YOU WILL GET CONFUSED AND VERY BAD THINGS MIGHT HAPPEN. ( I add COFF32 to all mine so yours would be libCOFF32xcurses.a)
this strips the xcoff info from the objects and turns them into coff
copy this lib to a new location ( /tools/coff32lib/ for example )
thats the easy part.

now you need to look at the configure script for the code you want to compile find each reference to libxcurses.a ( look for -lxcurses and change them to "-L DIRLOC -l LIBNAME " example "-L/tools/coff32lib -lCOFF32xcurses " NOTE: make assumes the "lib" at the front and the ".a" on the end.

if you get them all, rerun configure. then run make. if you are not using any 64 bit code, everything should be good.

Before you criticize someone, you should walk a mile in their shoes. That way you're a mile away and you have their shoes.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top