Fedora link issue

From: Orion Poplawski <orion_at_nyahnyahspammersnyahnyah>
Date: Wed Feb 17 2010 - 08:39:09 MST

The next version of Fedora enforces strict linking requirements. This
has revealed that ictrans needs to get linked with -lm:

gcc -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions
-fstack-protector --param=ssp-buffer-size=4 -m32 -march=i386
-mtune=generic -fasynchronous-unwind-tables -fPIC -o ictrans main.o
../../../.././ncarview/src/lib/libictrans/libictrans.o
../../../.././ncarview/src/lib/libctrans/libctrans.o
-L../../../.././ncarview/src/lib/libcgm -lcgm
-L../../../.././ncarview/src/lib/libncarg_ras -lncarg_ras
-L../../../.././common/src/libncarg_c -lncarg_c -L/usr/lib/ncarg
-L/usr/lib/hdf -lX11 -lXext -lmfhdf -ldf -ljpeg -lz -lgfortran
../../../.././ncarview/src/lib/libcgm/libcgm.a(meta_edit.o): In function
`CGM_initMetaEdit':
/builddir/build/BUILD/ncl_ncarg-5.1.1/ncarview/src/lib/libcgm/meta_edit.c:1043:
warning: the use of `mktemp' is dangerous, better use `mkstemp'
/usr/bin/ld: ../../../.././ncarview/src/lib/libctrans/libctrans.o:
undefined reference to symbol 'sqrt@@GLIBC_2.0'
/usr/bin/ld: note: 'sqrt@@GLIBC_2.0' is defined in DSO /lib/libm.so.6 so
try adding it to the linker command line
/lib/libm.so.6: could not read symbols: Invalid operation

I've used the following patch, but I'm sure there is a better way:

--- ncl_ncarg-5.1.1/ncarview/src/bin/ictrans/yMakefile.libs
1998-02-04 08:58:14.000000000 -0700
+++ ncl_ncarg-5.1.1/ncarview/src/bin/ictrans/yMakefile 2010-02-16
17:01:18.942677616 -0700
@@ -29,6 +29,8 @@

  #ifdef IRIX
  MORE_LIBS = -lmalloc
+#else
+MORE_LIBS = -lm
  #endif

  EXTRA_LIBS = $(X11LIBS) $(SUNLIBS) $(NETCDFLIB) $(HDFLIB) $(CTOFLIBS)

-- 
Orion Poplawski
Technical Manager                     303-415-9701 x222
NWRA/CoRA Division                    FAX: 303-415-9702
3380 Mitchell Lane                  orion@cora.nwra.com
Boulder, CO 80301              http://www.cora.nwra.com
_______________________________________________
ncl-install mailing list
List instructions, subscriber options, unsubscribe:
http://mailman.ucar.edu/mailman/listinfo/ncl-install
Received on Wed Feb 17 08:39:15 2010

This archive was generated by hypermail 2.1.8 : Thu Feb 18 2010 - 10:34:27 MST