[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

[RFH] dextractor



Hi,

Currently dextractor FTCBFS. On investigation, I had a suspicion if this is due to incomplete flags being passed somewhere, and also hardcoding $(MAKE) in d/rules.
So I went ahead and patched with what looked sensible to me. My patch is attached with the mail, however it now fails with a chain of linker errors:

/usr/bin/ld: /tmp/ccd5ujJJ.o: warning: relocation against `H5T_NATIVE_INT_g' in read-only section `.text.startup'
/usr/bin/ld: /tmp/ccd5ujJJ.o: in function `main':
dextract.c:(.text.startup+0x1c): undefined reference to `H5Zfilter_avail'
/usr/bin/ld: dextract.c:(.text.startup+0x4d0): undefined reference to `H5Eset_auto2'
/usr/bin/ld: dextract.c:(.text.startup+0x4e4): undefined reference to `H5check_version'
/usr/bin/ld: dextract.c:(.text.startup+0x4e9): undefined reference to `H5open'
/usr/bin/ld: dextract.c:(.text.startup+0x4f5): undefined reference to `H5Fopen'
/usr/bin/ld: dextract.c:(.text.startup+0x512): undefined reference to `H5Dopen2'
/usr/bin/ld: dextract.c:(.text.startup+0x526): undefined reference to `H5Dget_space'
/usr/bin/ld: dextract.c:(.text.startup+0x541): undefined reference to `H5Sget_simple_extent_dims'
/usr/bin/ld: dextract.c:(.text.startup+0x55b): undefined reference to `H5open'
/usr/bin/ld: dextract.c:(.text.startup+0x562): undefined reference to `H5T_NATIVE_UCHAR_g'
/usr/bin/ld: dextract.c:(.text.startup+0x579): undefined reference to `H5Dread'
/usr/bin/ld: dextract.c:(.text.startup+0x584): undefined reference to `H5Sclose'
/usr/bin/ld: dextract.c:(.text.startup+0x58c): undefined reference to `H5Dclose'
/usr/bin/ld: dextract.c:(.text.startup+0x5bf): undefined reference to `H5Dopen2'
/usr/bin/ld: dextract.c:(.text.startup+0x5d3): undefined reference to `H5Dget_space'
/usr/bin/ld: dextract.c:(.text.startup+0x5f2): undefined reference to `H5Sget_simple_extent_dims'
/usr/bin/ld: dextract.c:(.text.startup+0x60c): undefined reference to `H5open'
/usr/bin/ld: dextract.c:(.text.startup+0x613): undefined reference to `H5T_NATIVE_UCHAR_g'
/usr/bin/ld: dextract.c:(.text.startup+0x62a): undefined reference to `H5Dread'
/usr/bin/ld: dextract.c:(.text.startup+0x637): undefined reference to `H5Sclose'
....... (several of these logs)


I'm not sure of the way to move forward here, and any help is appreciated.

Nilesh
diff --git a/debian/patches/cross.patch b/debian/patches/cross.patch
new file mode 100644
index 0000000..6f77d69
--- /dev/null
+++ b/debian/patches/cross.patch
@@ -0,0 +1,16 @@
+--- a/Makefile
++++ b/Makefile
+@@ -1,3 +1,4 @@
++PKG_CONFIG ?= pkg-config
+ CFLAGS = -O3 -Wall -Wextra -fno-strict-aliasing
+ MACHINE_ARCH := $(shell echo `uname -m`)
+ 
+@@ -5,7 +6,7 @@
+ 
+ dextract: dextract.c DB.c DB.h QV.c QV.h
+ 	#gcc $(CFLAGS) -I/usr/include/hdf5/serial/ -L/usr/lib/${MACHINE_ARCH}-linux-gnu/hdf5/serial/ -o dextract dextract.c DB.c QV.c -lhdf5
+-	gcc $(CFLAGS) $(ARGS) -o dextract dextract.c DB.c QV.c -lhdf5
++	gcc $(ARGS) $(CFLAGS) -o dextract dextract.c DB.c QV.c `$(PKG_CONFIG) --libs hdf5`
+ 
+ dexta: dexta.c DB.c DB.h QV.c QV.h
+ 	gcc $(CFLAGS) -o dexta dexta.c DB.c QV.c
diff --git a/debian/patches/series b/debian/patches/series
index 0c590ad..e449290 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1 +1,2 @@
 use_system_packaged_libhdf5-dev.patch
+cross.patch
diff --git a/debian/rules b/debian/rules
index 59f4a0e..10b546f 100755
--- a/debian/rules
+++ b/debian/rules
@@ -12,7 +12,7 @@ include /usr/share/dpkg/default.mk
 
 override_dh_auto_build:
 ifneq ($(wildcard /usr/lib/$(DEB_HOST_MULTIARCH)/hdf5/serial/libhdf5.so),)
-	$(MAKE) all ARGS="-I/usr/include/hdf5/serial -L/usr/lib/$(DEB_HOST_MULTIARCH)/hdf5/serial"
+	dh_auto_build -- ARGS="-I/usr/include/hdf5/serial"
 endif
 
 override_dh_auto_clean:

Reply to: