r23186 - gnucash/trunk - Bug 654196 - "make check" fails when built with --enable-dbi
Christian Stimming
christian at cstimming.de
Tue Sep 24 16:43:58 EDT 2013
Am Sonntag, 22. September 2013, 14:56:52 schrieb John Ralls:
> >>> The new test fails for me as well: Kubuntu 11.10, and config.log
> >>> says:
> >>>
> >>> configure:20323: checking Looking for at least one supported DBD
> >>> module
> >>> configure:20343: gcc -o conftest -I/home/cs/usr/include -ldl
> >>> conftest.c - lpthread
> >>>> &5
> >>> /tmp/ccISRVMn.o: In function `main':
> >>> conftest.c:(.text+0xf): undefined reference to `dlopen'
>
> So libtool.m4's call of AC_CHECK_LIB([ldl], [dlopen],...) found dlopen in
> libdl.so.
>
> More likely then that the command gcc -o conftest -I/home/cs/usr/include
> -ldl conftest.c - lpthread isn't trying to link libdl. Which is strange,
> especially since it works fine on Debian Wheezy 64.
>
> Hmm. That space between - and lpthread is bothersome. Try this patch and
> see if it changes anything:
Indeed, with this patch it works. The log says
configure:20283: checking for dbi/dbi.h
configure:20283: result: yes
configure:20320: checking Looking for at least one supported DBD module
configure:20340: gcc -o conftest -I/home/cs/usr/include conftest.c -ldl -
lpthread >&5
configure:20340: $? = 0
configure:20340: ./conftest
configure:20340: $? = 0
Does this mean it "just" was the -ldl had to come after the conftest.c
argument? Seems a bit weird to me that it works for you, though.
In any case, I'd be glad if you could commit this patch. Thanks!
Regards,
Christian
> diff --git a/configure.ac b/configure.ac
> index 2b78423..17c3c6c 100644
> --- a/configure.ac
> +++ b/configure.ac
> @@ -534,6 +534,7 @@ then
> EXTRA_SEARCH_LIBS=""
> AC_CHECK_HEADERS(dbi/dbi.h)
> if test "x$ac_cv_header_dbi_dbi_h" != xno; then
> + saved_LIBS=$LIBS
> AC_ARG_WITH( dbi-dbd-dir,
> [AS_HELP_STRING([--with-dbi-dbd-dir=PATH],[specify location of libdbi
> dri [[GNC_DBD_DIR="$with_dbi_dbd_dir"
> @@ -551,7 +552,7 @@ then
> LDINC="#include <dlfcn.h>"
> LDFUNCARGS=", RTLD_NOW"
> LDEXT=so
> - export LDFLAGS="$LDFLAGS $lt_cv_dlopen_libs"
> + LIBS="$lt_cv_dlopen_libs $LIBS"
> ;;
> esac
> export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:$EXTRA_SEARCH_LIBS"
> @@ -581,6 +582,7 @@ to the configure argument list and run it again.
>
> LIBDBI_LIBS=-ldbi
> _COMPONENTS="$_COMPONENTS dbi"
> + LIBS=$saved_libs
> else
> AC_MSG_ERROR([
>
> Regards,
> John Ralls
More information about the gnucash-devel
mailing list