From: <mic...@ds...> - 2004-01-07 22:33:11
|
David, gcc -g -O2 -Wall -lm -o executable object object object object object object ... -lpthread I also tried the most simple example imaginable, much like you example. The Makefile specifies the CCLD macro as gcc: CC = gcc CFLAGS = -g -O2 -Wall COMPILE = $(CC) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) CCLD = $(CC) LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(LDFLAGS) -o $@ When I do: # ar -tv /usr/ccs/lib/libm.a I get rw-rw---- 2715/300 2180 Jul 12 22:40 1999 acos.o rw-rw---- 2715/300 1507 Jul 12 22:40 1999 acosh.o rw-rw---- 2715/300 2076 Jul 12 22:40 1999 asin.o rw-rw---- 2715/300 1603 Jul 12 22:40 1999 asinh.o rw-rw---- 2715/300 1934 Jul 12 22:40 1999 atan.o rw-rw---- 2715/300 3442 Jul 12 22:40 1999 atan2.o rw-rw---- 2715/300 1705 Jul 12 22:40 1999 atanh.o rw-rw---- 2715/300 2685 Jul 12 22:40 1999 cabs.o rw-rw---- 2715/300 1576 Jul 12 22:40 1999 cbrt.o rw-rw---- 2715/300 378 Dec 2 07:13 1998 class.o rw-rw---- 2715/300 446 Dec 2 07:13 1998 copysign.o rw-rw---- 2715/300 2005 Jul 12 22:40 1999 cos.o rw-rw---- 2715/300 2016 Jul 12 22:40 1999 cosh.o rw-rw---- 2715/300 3269 Jul 12 22:40 1999 drem.o rw-rw---- 2715/300 2195 Jul 12 22:40 1999 erf.o rw-rw---- 2715/300 2209 Jul 12 22:40 1999 exp.o rw-rw---- 2715/300 1459 Jul 12 22:41 1999 exp__E.o rw-rw---- 2715/300 330 Dec 2 07:13 1998 finite.o rw-rw---- 2715/300 2387 Jul 12 22:41 1999 floor.o rw-rw---- 2715/300 326 Dec 2 07:14 1998 isnan.o rw-rw---- 2715/300 4043 Jul 12 22:41 1999 lgamma.o rw-rw---- 2715/300 888 Dec 2 07:14 1998 ilogb.o rw-rw---- 2715/300 3172 Jul 12 22:41 1999 j0.o rw-rw---- 2715/300 3434 Jul 12 22:41 1999 j1.o rw-rw---- 2715/300 2780 Jul 12 22:41 1999 jn.o rw-rw---- 2715/300 2375 Jul 12 22:41 1999 log.o rw-rw---- 2715/300 2613 Jul 12 22:41 1999 log10.o rw-rw---- 2715/300 2473 Jul 12 22:41 1999 log1p.o rw-rw---- 2715/300 909 Dec 2 07:14 1998 logb.o rw-rw---- 2715/300 1166 Jul 12 22:41 1999 log__L.o rw-rw---- 2715/300 893 Dec 2 07:14 1998 nextaft.o rw-rw---- 2715/300 4855 Jul 12 22:41 1999 pow.o rw-rw---- 2715/300 1941 Jul 12 22:41 1999 scalb.o rw-rw---- 2715/300 1985 Jul 12 22:41 1999 sin.o rw-rw---- 2715/300 1960 Jul 12 22:41 1999 sinh.o rw-rw---- 2715/300 1028 Dec 2 07:14 1998 sqrt.o rw-rw---- 2715/300 3361 Jul 12 22:41 1999 tan.o rw-rw---- 2715/300 2041 Jul 12 22:41 1999 tanh.o rw-rw-r-- 2715/300 14188 Sep 29 12:25 1997 tantab.o rw-rw---- 2715/300 355 Dec 2 07:14 1998 unord.o rw-rw---- 2715/300 2181 Jul 12 22:41 1999 acosF.o rw-rw---- 2715/300 2077 Jul 12 22:41 1999 asinF.o rw-rw---- 2715/300 3443 Jul 12 22:41 1999 atan2F.o rw-rw---- 2715/300 1935 Jul 12 22:41 1999 atanF.o rw-rw---- 2715/300 2006 Jul 12 22:41 1999 cosF.o rw-rw---- 2715/300 2017 Jul 12 22:41 1999 coshF.o rw-rw---- 2715/300 2196 Jul 12 22:41 1999 erfF.o rw-rw---- 2715/300 2170 Jul 12 22:41 1999 expF.o rw-rw---- 2715/300 1258 Jul 12 22:41 1999 floorF.o rw-rw---- 2715/300 1475 Jul 12 22:41 1999 lgammaF.o rw-rw---- 2715/300 2614 Jul 12 22:41 1999 log10F.o rw-rw---- 2715/300 2376 Jul 12 22:41 1999 logF.o rw-rw---- 2715/300 4856 Jul 12 22:41 1999 powF.o rw-rw---- 2715/300 1986 Jul 12 22:41 1999 sinF.o rw-rw---- 2715/300 1961 Jul 12 22:41 1999 sinhF.o rw-rw---- 2715/300 1028 Dec 2 07:14 1998 sqrtF.o rw-rw---- 2715/300 3362 Jul 12 22:41 1999 tanF.o rw-rw---- 2715/300 2042 Jul 12 22:41 1999 tanhF.o rw-rw---- 2715/300 1897 Jul 6 14:10 1999 rsqrt.o rw-rw---- 2715/300 1898 Jul 6 14:10 1999 rsqrtF.o rw-rw---- 2715/300 1214 Mar 12 07:52 1999 __set_errno128.o rw-rw---- 2715/300 1506 Jul 12 22:41 1999 sqrt_raise_xcp.o rw-rw---- 2715/300 1150 Jul 12 22:41 1999 _class.o rw-rw---- 2715/300 770 Dec 2 07:14 1998 dtoi.o rw-rw-r-- 2715/300 1205 Sep 29 12:26 1997 guesses.o rw-r----- 2715/300 2347 Sep 29 12:26 1997 _q_treducex.o rw-r----- 2715/300 4689 Sep 29 12:26 1997 _qacos.o rw-r----- 2715/300 4178 Sep 29 12:26 1997 _qasin.o rw-r----- 2715/300 8686 Sep 29 12:27 1997 _qatan.o rw-r----- 2715/300 2184 Sep 29 12:27 1997 _qcosh.o rw-r----- 2715/300 4890 Dec 2 07:15 1998 _qexp.o rw-r----- 2715/300 6240 Sep 29 12:27 1997 _qlog.o rw-r----- 2715/300 2874 Dec 8 09:39 1997 _qpow.o rw-r----- 2715/300 6415 Sep 29 12:27 1997 _qsincos.o rw-r----- 2715/300 2332 Dec 8 09:39 1997 _qsinh.o rw-r----- 300/300 2929 Mar 1 12:05 2001 _qsqrt.o rw-r----- 2715/300 6491 Sep 29 12:27 1997 _qtan.o rw-r----- 2715/300 3642 Sep 29 12:27 1997 _qtanh.o rw-r----- 2715/300 1214 Sep 29 12:27 1997 _q_a6.o rw-r----- 2715/300 1234 Sep 29 12:27 1997 _q_d6.o rw-r----- 2715/300 1006 Sep 29 12:27 1997 _q_m6.o rw-r----- 2715/300 7943 Sep 29 12:27 1997 _qgamma.o rw-r----- 2715/300 9318 Sep 29 12:27 1997 _qerf.o rw-rw---- 2715/300 2325 Jul 12 22:41 1999 expm1.o rw-rw---- 2715/300 11092 Jun 1 17:38 1999 m_tables.o rw-rw-r-- 2715/300 1387 Sep 29 12:27 1997 ceill.o rw-r----- 2715/300 830 Sep 29 12:27 1997 fabsl.o rw-rw-r-- 2715/300 1388 Sep 29 12:27 1997 floorl.o rw-rw---- 2715/300 2575 Mar 12 07:52 1999 fmodl.o However, if I do: # ar -X64 -tv /usr/ccs/lib/libm.a I get nothing. Am I just missing the 64-bit version of libm.a? Thanks in advance! /MickO David Clissold <cl...@au...> 01/07/2004 01:18 PM To mic...@ds... cc aix...@ww... Subject Re: [tbox-l] libm.a not a COFF file libm.a is a system library which contains XCOFF files. You'll need to look at the compile or link command being executed which is producing this error to see how it is arriving at this error. Typical simple usage would be: $ gcc myprog.c -lm -o myprog where the "-lm" says to link with the "libm.a" library. Somehow you are using incorrect link option(s) in some way to give you that message. So find the 'gcc' or the 'ld' command line which produced the error, and look at how it is trying to use libm.a. On Wed, Jan 07, 2004 at 12:08:34PM -0600, mic...@ds... wrote: > Hi there again. > > Now I've run into another problem that I couldn't really find the answer > to in the archives (I looked there first this time!). > > Basically, when I try to link a program, it fails on the libm.a archive: > > collect2: /usr/ccs/lib/libm.a: not a COFF file > ... > # file /usr/ccs/lib/libm.a > /usr/ccs/lib/libm.a: archive (big format) > > Anyone run into this issue before, and know how to fix it? > > Thankee-sai! > -- > [ Mick Ohrberg | DST Output | (816) 435-2004 ] > _______________________________________________ > aixtoolbox-list mailing list > aix...@ww... > http://www-124.ibm.com/developerworks/oss/mailman/listinfo/aixtoolbox-list -- David Clissold cl...@au... |