Source: libdbi-drivers
Version: 0.9.0-1
Severity: important
Tags: patch
User: debian-h...@lists.debian.org
Usertags: hurd

Hi,

libdbi-drivers fails to build from source on GNU/Hurd due to two
reasons:

1) tests/Makefile.am: Add libpthread to the libraries to link with for
the test program test_dbi too, see
http://www.gnu.org/software/hurd/faq/libpthread_dlopen.html

The updated text is (not yet on the web site): 
...
This can be worked around by making the application link against
libpthread (i.e. not only the plugin, but also the main binary), or
without recompiling by explicitly pre-loading libpthread, for example:
$LD_PRELOAD=/lib/i386-gnu/libpthread.so.0.3 [application]

2) debian/rules: Tests are run for both mysql and pgsql. Since
semaphores are not yet supported for Hurd the test for pgsql is
disabled.

This patch would make gnucash (and gammu) build since it build-depends
on libdbd-sqlite3 provided by libdbi-drivers.

Thanks!
--- a/debianrules	2014-01-20 21:31:51.000000000 +0100
+++ b/debian/rules	2014-01-28 18:45:07.000000000 +0100
@@ -89,9 +89,13 @@ test-stamp: build-stamp
 
 	# Testing MySQL and Postgress
 ifeq (,$(filter nocheck,$(DEB_BUILD_OPTIONS)))
-	chmod +x ./debian/test_mysql.sh ./debian/test_pgsql.sh
+	chmod +x ./debian/test_mysql.sh
 	./debian/test_mysql.sh
+	# Semaphores are not yet supported on GNU/Hurd
+ifneq (gnu,$(DEB_HOST_GNU_SYSTEM))
+	chmod +x ./debian/test_pgsql.sh
 	./debian/test_pgsql.sh
+endif
 	touch test-stamp
 endif
 
--- a/tests/Makefile.am	2011-02-20 12:03:15.000000000 +0100
+++ b/tests/Makefile.am	2014-01-28 17:52:18.000000000 +0100
@@ -8,7 +8,7 @@ TESTS = @MYSQL_TEST@ @PGSQL_TEST@ @SQLIT
 check_PROGRAMS = test_dbi test_dbi_dlopen
 check_LTLIBRARIES = libtest_dbi_plugin.la
 test_dbi_SOURCES = test_dbi.c
-test_dbi_LDADD = $(top_srcdir)/tests/cgreen/libcgreen.a -L@libdir@ -lm -ldbi @LIBADD_LIBDBI@
+test_dbi_LDADD = $(top_srcdir)/tests/cgreen/libcgreen.a -L@libdir@ -lm -ldbi -lpthread @LIBADD_LIBDBI@
 test_dbi_dlopen_SOURCES = test_dbi_dlopen.c
 test_dbi_dlopen_LDFLAGS = @LIBADD_LIBDBI@
 libtest_dbi_plugin_la_SOURCES = test_dbi_plugin.c

Reply via email to