Package: cmor
Version: 2.4.0-1
Severity: wishlist
Tags: patch
User: [email protected]
Usertags: origin-ubuntu natty ubuntu-patch

Hi,

cmor FTBFS with binutils-gold, with the following error:
...
   dh_auto_test
        make -j1 test
make[1]: Entering directory `/build/fabrice-cmor_2.4.0-1ubuntu1-i386-28GnaP/cmor
-2.4.0'
r - cmor.o
r - cmor_axes.o
r - cmor_variables.o
r - cmor_tables.o
r - cdTimeConv.o
r - cdUtil.o
r - timeConv.o
r - timeArith.o
r - cmor_grids.o
r - cmor_md5.o
r - cmor_cfortran_interface.o
r - cmor_fortran_interface.o
ln -sf TestTables Tables
/usr/bin/ld: ./libcmor.a(cdTimeConv.o): undefined reference to symbol 'floor@@GL
IBC_2.0'
/usr/bin/ld: note: 'floor@@GLIBC_2.0' is defined in DSO /lib/libm.so.6 so try ad
ding it to the linker command line
...

*** /tmp/tmppD118H
In Ubuntu, we've applied the attached patch to fix the FTBFS, by adding an
explicit link with libm. Also, we've modified the .pc file to add it also.

As binutils-gold will be the default in Debian after Squeeze, we thought that
you might be interested.

thanks,
Fabrice


-- System Information:
Debian Release: squeeze/sid
  APT prefers maverick-updates
  APT policy: (500, 'maverick-updates'), (500, 'maverick-security'), (500, 
'maverick-proposed'), (500, 'maverick')
Architecture: amd64 (x86_64)

Kernel: Linux 2.6.35-23-generic (SMP w/2 CPU cores)
Locale: LANG=es_ES.UTF-8, LC_CTYPE=es_ES.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
diff -Nru cmor-2.4.0/debian/patches/fix-ftbfs-with-binutils-gold.patch cmor-2.4.0/debian/patches/fix-ftbfs-with-binutils-gold.patch
--- cmor-2.4.0/debian/patches/fix-ftbfs-with-binutils-gold.patch	1970-01-01 01:00:00.000000000 +0100
+++ cmor-2.4.0/debian/patches/fix-ftbfs-with-binutils-gold.patch	2010-11-03 07:14:55.000000000 +0100
@@ -0,0 +1,42 @@
+Description: Fix FTBFS with binutils-gold by explicitly linking tests against
+ libm. Also, add -lm to .pc file, as the previous FTBFS has demonstrated that
+ libm is required to use libcmor
+Author: Fabrice Coutadeur <[email protected]>
+Index: cmor-2.4.0/Makefile.in
+===================================================================
+--- cmor-2.4.0.orig/Makefile.in	2010-11-03 07:04:14.000000000 +0100
++++ cmor-2.4.0/Makefile.in	2010-11-03 07:04:14.000000000 +0100
+@@ -113,9 +113,9 @@
+ Tables: TestTables
+ 	ln -sf TestTables Tables
+ test_C: cmor Tables
+-	@rm -f ./ipcc_test_code ; @CC@ @CPPFLAGS@ @CFLAGS@  Test/ipcc_test_code.c -...@prefix@/lib -...@prefix@/include  -L. -lcmor @NCCFLAGS@ @NCLDFLAGS@ @UDUNITS2LDFLAGS@ @UDUNITS2FLAGS@ @UUIDLDFLAGS@ @UUIDFLAGS@ -o ipcc_test_code  @VERB@; ./ipcc_test_code @VERB@
+-	@rm -f test_grid ; @CC@ @CPPFLAGS@ @CFLAGS@ @CPPFLAGS@  Test/test_grid.c -...@prefix@/lib -...@prefix@/include  -L. -lcmor @NCCFLAGS@ @NCLDFLAGS@ @UDUNITS2LDFLAGS@ @UDUNITS2FLAGS@ @UUIDLDFLAGS@ @UUIDFLAGS@ -o test_grid @VERB@; ./test_grid @VERB@;
+-	@rm -f test_lots_of_variables ; @CC@ @CPPFLAGS@ @CFLAGS@ @CPPFLAGS@  Test/test_lots_of_variables.c -...@prefix@/lib -...@prefix@/include  -L. -lcmor @NCCFLAGS@ @NCLDFLAGS@ @UDUNITS2LDFLAGS@ @UDUNITS2FLAGS@ @UUIDLDFLAGS@ @UUIDFLAGS@ -o test_lots_of_variables @VERB@; ./test_lots_of_variables @VERB@;
++	@rm -f ./ipcc_test_code ; @CC@ @CPPFLAGS@ @CFLAGS@  Test/ipcc_test_code.c -...@prefix@/lib -...@prefix@/include  -L. -lcmor -lm @NCCFLAGS@ @NCLDFLAGS@ @UDUNITS2LDFLAGS@ @UDUNITS2FLAGS@ @UUIDLDFLAGS@ @UUIDFLAGS@ -o ipcc_test_code  @VERB@; ./ipcc_test_code @VERB@
++	@rm -f test_grid ; @CC@ @CPPFLAGS@ @CFLAGS@ @CPPFLAGS@  Test/test_grid.c -...@prefix@/lib -...@prefix@/include  -L. -lcmor -lm @NCCFLAGS@ @NCLDFLAGS@ @UDUNITS2LDFLAGS@ @UDUNITS2FLAGS@ @UUIDLDFLAGS@ @UUIDFLAGS@ -o test_grid @VERB@; ./test_grid @VERB@;
++	@rm -f test_lots_of_variables ; @CC@ @CPPFLAGS@ @CFLAGS@ @CPPFLAGS@  Test/test_lots_of_variables.c -...@prefix@/lib -...@prefix@/include  -L. -lcmor -lm @NCCFLAGS@ @NCLDFLAGS@ @UDUNITS2LDFLAGS@ @UDUNITS2FLAGS@ @UUIDLDFLAGS@ @UUIDFLAGS@ -o test_lots_of_variables @VERB@; ./test_lots_of_variables @VERB@;
+ python:
+ 	@echo "Building Python interface"
+ 	@${PYTHONEXEC} setup.py install @CDATPREFIX@
+@@ -152,7 +152,7 @@
+ 
+ test_case:
+ 	@echo "${OK_COLOR}Testing: "${TEST_NAME}" with input file: ${INPUT_FILE}${NO_COLOR}"
+-	@rm -f ./${TEST_NAME} 2>/dev/null ; @FC@ @FCFLAGS@ @DEBUG@  Test/${TEST_NAME}.f90 -...@prefix@/lib -L. -lcmor @NCCFLAGS@ @NCLDFLAGS@ @UDUNITS2LDFLAGS@ @UDUNITS2FLAGS@ @UUIDLDFLAGS@ @UUIDFLAGS@ @ZFLAGS@ @ZLDFLAGS@ -o ${TEST_NAME} ;
++	@rm -f ./${TEST_NAME} 2>/dev/null ; @FC@ @FCFLAGS@ @DEBUG@  Test/${TEST_NAME}.f90 -...@prefix@/lib -L. -lcmor -lm @NCCFLAGS@ @NCLDFLAGS@ @UDUNITS2LDFLAGS@ @UDUNITS2FLAGS@ @UUIDLDFLAGS@ @UUIDFLAGS@ @ZFLAGS@ @ZLDFLAGS@ -o ${TEST_NAME} ;
+ 	@./${TEST_NAME} @VERB@ < ${INPUT_FILE} ;
+ 	@ rm ./${TEST_NAME}
+ ifeq (@MAKEDEPPYTHON@,python)
+Index: cmor-2.4.0/cmor.pc.in
+===================================================================
+--- cmor-2.4.0.orig/cmor.pc.in	2010-11-03 07:04:14.000000000 +0100
++++ cmor-2.4.0/cmor.pc.in	2010-11-03 07:04:14.000000000 +0100
+@@ -7,6 +7,6 @@
+ Name: cmor
+ Description: Climate Model Output Rewriter library
+ Version: @PACKAGE_VERSION@
+-Libs:  -L${libdir} -lcmor
++Libs:  -L${libdir} -lcmor -lm
+ CFlags: -I${includedir} -I${includedir}/cdTime
+ Requires:  udunits netcdf ossp-uuid
diff -Nru cmor-2.4.0/debian/patches/series cmor-2.4.0/debian/patches/series
--- cmor-2.4.0/debian/patches/series	2010-10-29 12:12:16.000000000 +0200
+++ cmor-2.4.0/debian/patches/series	2010-11-03 07:05:10.000000000 +0100
@@ -2,3 +2,4 @@
 shlib-link.patch
 pkgconfig.patch
 makefile-fix.patch
+fix-ftbfs-with-binutils-gold.patch

Reply via email to