[libvirt] [PATCH] build: fix typos in configure-set makefile variable names

Without this change, the ..._MODULES_... variables are set in configure.ac, but never used. The variables that are actually used in src/Makefile.am are named _MODULE_...
From a3361a6ce032f71273d6f7a6b4b4f54438b1dd73 Mon Sep 17 00:00:00 2001 From: Jim Meyering <meyering@redhat.com> Date: Wed, 24 Feb 2010 12:04:27 +0100 Subject: [PATCH] build: fix typos in makefile variable names
* configure.ac: Fix typos: s/DRIVER_MODULES_CFLAGS/DRIVER_MODULE_CFLAGS/ s/DRIVER_MODULES_LIBS/DRIVER_MODULE_LIBS/ --- configure.ac | 14 +++++++------- 1 files changed, 7 insertions(+), 7 deletions(-) diff --git a/configure.ac b/configure.ac index 2f79970..43ea771 100644 --- a/configure.ac +++ b/configure.ac @@ -1695,8 +1695,8 @@ AC_ARG_WITH([driver-modules], [], [with_driver_modules=no]) -DRIVER_MODULES_CFLAGS= -DRIVER_MODULES_LIBS= +DRIVER_MODULE_CFLAGS= +DRIVER_MODULE_LIBS= if test "x$with_driver_modules" = "xyes" ; then old_cflags="$CFLAGS" old_libs="$LIBS" @@ -1710,13 +1710,13 @@ if test "x$with_driver_modules" = "xyes" ; then LIBS="$old_libs" fi if test "$with_driver_modules" = "yes"; then - DRIVER_MODULES_CFLAGS="-export-dynamic" - DRIVER_MODULES_LIBS="-ldl" + DRIVER_MODULE_CFLAGS="-export-dynamic" + DRIVER_MODULE_LIBS="-ldl" AC_DEFINE_UNQUOTED([WITH_DRIVER_MODULES], 1, [whether to build drivers as modules]) fi AM_CONDITIONAL([WITH_DRIVER_MODULES], [test "$with_driver_modules" != "no"]) -AC_SUBST([DRIVER_MODULES_CFLAGS]) -AC_SUBST([DRIVER_MODULES_LIBS]) +AC_SUBST([DRIVER_MODULE_CFLAGS]) +AC_SUBST([DRIVER_MODULE_LIBS]) # Set LV_LIBTOOL_OBJDIR to "." or $lt_cv_objdir, depending on whether @@ -1931,7 +1931,7 @@ AC_MSG_NOTICE([]) AC_MSG_NOTICE([Driver Loadable Modules]) AC_MSG_NOTICE([]) if test "$with_driver_modules" != "no" ; then -AC_MSG_NOTICE([ dlopen: $DRIVER_MODULES_CFLAGS $DRIVER_MODULES_LIBS]) +AC_MSG_NOTICE([ dlopen: $DRIVER_MODULE_CFLAGS $DRIVER_MODULE_LIBS]) else AC_MSG_NOTICE([ dlopen: no]) fi -- 1.7.0.367.g566c3

On Wed, Feb 24, 2010 at 12:08:01PM +0100, Jim Meyering wrote:
Without this change, the ..._MODULES_... variables are set in configure.ac, but never used.
The variables that are actually used in src/Makefile.am are named _MODULE_...
ACK, the patch is reasonable. However it still doesn't fix the current build failure for me on Rawhide: make[3]: Entering directory `/home/rjones/d/libvirt/tests' CC virshtest.o CC testutils.o CCLD virshtest CC conftest.o CCLD conftest CC nodeinfotest.o CCLD nodeinfotest /usr/bin/ld: ../src/.libs/libvirt_test.a(libvirt_driver_vbox_la-vbox_XPCOMCGlue.o): undefined reference to symbol 'dlclose@@GLIBC_2.2.5' /usr/bin/ld: note: 'dlclose@@GLIBC_2.2.5' is defined in DSO /lib64/libdl.so.2 so try adding it to the linker command line /lib64/libdl.so.2: could not read symbols: Invalid operation collect2: ld returned 1 exit status Just adding -ldl to the end of LDADDS in tests/Makefile.am fixes this problem for me, but I'm not sure if that is the correct way to fix it. Rich. -- Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones Read my programming blog: http://rwmj.wordpress.com Fedora now supports 80 OCaml packages (the OPEN alternative to F#) http://cocan.org/getting_started_with_ocaml_on_red_hat_and_fedora

Richard W.M. Jones wrote:
On Wed, Feb 24, 2010 at 12:08:01PM +0100, Jim Meyering wrote:
Without this change, the ..._MODULES_... variables are set in configure.ac, but never used.
The variables that are actually used in src/Makefile.am are named _MODULE_...
ACK, the patch is reasonable.
Thanks.
However it still doesn't fix the current build failure for me on Rawhide:
make[3]: Entering directory `/home/rjones/d/libvirt/tests' CC virshtest.o CC testutils.o CCLD virshtest CC conftest.o CCLD conftest CC nodeinfotest.o CCLD nodeinfotest /usr/bin/ld: ../src/.libs/libvirt_test.a(libvirt_driver_vbox_la-vbox_XPCOMCGlue.o): undefined reference to symbol 'dlclose@@GLIBC_2.2.5' /usr/bin/ld: note: 'dlclose@@GLIBC_2.2.5' is defined in DSO /lib64/libdl.so.2 so try adding it to the linker command line /lib64/libdl.so.2: could not read symbols: Invalid operation collect2: ld returned 1 exit status
Just adding -ldl to the end of LDADDS in tests/Makefile.am fixes this problem for me, but I'm not sure if that is the correct way to fix it.
That sounds reasonable, if we're guaranteed always to have a libdl. However, the fact that it's not needed on F12 suggests that we should be adding it only when necessary (hence a configure-time test). I hit that same problem a few hours ago, but haven't yet gotten to it.

Il giorno mer, 24/02/2010 alle 15.05 +0100, Jim Meyering ha scritto:
That sounds reasonable, if we're guaranteed always to have a libdl. However, the fact that it's not needed on F12 suggests that we should be adding it only when necessary (hence a configure-time test).
I guess the problem might lie in the way the VirtualBox driver's dependencies are linked; didn't FC13/Rawhide move to use --no-add-needed by default? If that's the case you have two options: - a bug in the VirtualBox driver's dependencies, that causes some of the libraries not to link to libdl; - the VirtualBox driver *does* need libdl, but never linked it in by itself as it relied on the --add-needed behaviour. Easy way to test this is to try configuring on Rawhide with LDFLAGS="-Wl,--add-needed" and see what happens… if it builds fine, it's the latter. On the other hand, you do have one problem: libdl is only present in glibc/uclibc, as other C libraries have it part of the base library, so I'd suggest adding a configure test. If Richard can confirm whether it's the case, I should be able to write one fairly quickly, I hope, as I have something similar laying around. -- Diego Elio Pettenò — “Flameeyes” http://blog.flameeyes.eu/ If you found a .asc file in this mail and know not what it is, it's a GnuPG digital signature: http://www.gnupg.org/

On Wed, Feb 24, 2010 at 03:13:52PM +0100, Diego Elio “Flameeyes” Pettenò wrote:
Il giorno mer, 24/02/2010 alle 15.05 +0100, Jim Meyering ha scritto:
That sounds reasonable, if we're guaranteed always to have a libdl. However, the fact that it's not needed on F12 suggests that we should be adding it only when necessary (hence a configure-time test).
I guess the problem might lie in the way the VirtualBox driver's dependencies are linked; didn't FC13/Rawhide move to use --no-add-needed by default?
If that's the case you have two options:
- a bug in the VirtualBox driver's dependencies, that causes some of the libraries not to link to libdl; - the VirtualBox driver *does* need libdl, but never linked it in by itself as it relied on the --add-needed behaviour.
Easy way to test this is to try configuring on Rawhide with LDFLAGS="-Wl,--add-needed" and see what happens… if it builds fine, it's the latter.
On the other hand, you do have one problem: libdl is only present in glibc/uclibc, as other C libraries have it part of the base library, so I'd suggest adding a configure test.
If Richard can confirm whether it's the case, I should be able to write one fairly quickly, I hope, as I have something similar laying around.
The command: make LDFLAGS="-Wl,--add-needed" does fix the issue for me. Rich. -- Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones Read my programming blog: http://rwmj.wordpress.com Fedora now supports 80 OCaml packages (the OPEN alternative to F#) http://cocan.org/getting_started_with_ocaml_on_red_hat_and_fedora

On Wed, Feb 24, 2010 at 03:05:01PM +0100, Jim Meyering wrote:
Richard W.M. Jones wrote:
/usr/bin/ld: ../src/.libs/libvirt_test.a(libvirt_driver_vbox_la-vbox_XPCOMCGlue.o): undefined reference to symbol 'dlclose@@GLIBC_2.2.5' /usr/bin/ld: note: 'dlclose@@GLIBC_2.2.5' is defined in DSO /lib64/libdl.so.2 so try adding it to the linker command line /lib64/libdl.so.2: could not read symbols: Invalid operation collect2: ld returned 1 exit status
Just adding -ldl to the end of LDADDS in tests/Makefile.am fixes this problem for me, but I'm not sure if that is the correct way to fix it.
That sounds reasonable, if we're guaranteed always to have a libdl. However, the fact that it's not needed on F12 suggests that we should be adding it only when necessary (hence a configure-time test).
I hit that same problem a few hours ago, but haven't yet gotten to it.
I'm assuming that the problem is related to: http://fedoraproject.org/wiki/Features/ChangeInImplicitDSOLinking The virtualbox driver seems like it needs -ldl, but this was only being provided implicitly before, but now needs to be given explicitly. Rich. -- Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones virt-df lists disk usage of guests without needing to install any software inside the virtual machine. Supports Linux and Windows. http://et.redhat.com/~rjones/virt-df/

Il giorno mer, 24/02/2010 alle 14.21 +0000, Richard W.M. Jones ha scritto:
http://fedoraproject.org/wiki/Features/ChangeInImplicitDSOLinking
That definitely seems to be it, I've sent a small series of patches that should handle that case properly, please let me know if there are problems. Somebody got to test that on RHEL5 as well as I don't have an ac 2.59 around. -- Diego Elio Pettenò — “Flameeyes” http://blog.flameeyes.eu/ If you found a .asc file in this mail and know not what it is, it's a GnuPG digital signature: http://www.gnupg.org/
participants (3)
-
Diego Elio “Flameeyes” Pettenò
-
Jim Meyering
-
Richard W.M. Jones