On Sep 22, 2013, at 1:16 PM, Christian Stimming <christ...@cstimming.de> wrote:

> Am Samstag, 21. September 2013, 15:44:05 schrieb John Ralls:
>> On Sep 21, 2013, at 2:36 PM, Christian Stimming <christ...@cstimming.de> 
> wrote:
>>> 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'
>> 
>> That's the problem, and it's a big one.
>> ...
>> That part doesn't matter until we can sort out why the linker can't find
>> dlopen. It's supposed to be in libdl.so, which Debian installs in
>> /usr/lib/x86_64-linux-gnu. Can you check that it's there (it might be in
>> /lib instead of /usr/lib)? 
> 
> The error message in config.log is still unchanged. libdl.so is in 
> /usr/lib/x86_64-linux-gnu, as you guessed. Also the linker error message 
> doesn't complain about "could not link 'dl'" but it rather complains only 
> about the undefined reference. Hence, it found libdl.so but somehow doesn't 
> find that reference.
> 
> $ ls -l /usr/lib/x86_64-linux-gnu/libdl*
> -rw-r--r-- 1 root root 13194 2012-09-21 09:04 /usr/lib/x86_64-linux-
> gnu/libdl.a
> lrwxrwxrwx 1 root root    32 2012-09-21 09:04 /usr/lib/x86_64-linux-
> gnu/libdl.so -> /lib/x86_64-linux-gnu/libdl.so.2
> 
>> Also, please run  grep lt_cv_dlopen config.log
> 
> lt_cv_dlopen=dlopen
> lt_cv_dlopen_libs=-ldl
> lt_cv_dlopen_self=yes
> lt_cv_dlopen_self_static=no

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:
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


_______________________________________________
gnucash-devel mailing list
gnucash-devel@gnucash.org
https://lists.gnucash.org/mailman/listinfo/gnucash-devel

Reply via email to