GNU bug report logs - #15471
"hardcode_directy=yes" on OpenBSD causes build DBus failure

Previous Next

Package: libtool;

Reported by: Chengwei Yang <chengwei.yang.cn <at> gmail.com>

Date: Fri, 27 Sep 2013 06:28:09 UTC

Severity: normal

To reply to this bug, email your comments to 15471 AT debbugs.gnu.org.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-libtool <at> gnu.org:
bug#15471; Package libtool. (Fri, 27 Sep 2013 06:28:10 GMT) Full text and rfc822 format available.

Acknowledgement sent to Chengwei Yang <chengwei.yang.cn <at> gmail.com>:
New bug report received and forwarded. Copy sent to bug-libtool <at> gnu.org. (Fri, 27 Sep 2013 06:28:11 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Chengwei Yang <chengwei.yang.cn <at> gmail.com>
To: bug-libtool <at> gnu.org
Cc: Simon McVittie <simon.mcvittie <at> collabora.co.uk>
Subject: "hardcode_directy=yes" on OpenBSD causes build DBus failure
Date: Thu, 26 Sep 2013 15:22:32 +0800
Hi List,

When I was trying to build dbus (http://cgit.freedesktop.org/dbus/dbus/)
master branch on OpenBSD 5.3, with GNU libtool 2.4.2 installed, I got
below failure. (https://bugs.freedesktop.org/show_bug.cgi?id=69801)

------------------------>8---------------->8--------------------------
gcc -DHAVE_CONFIG_H -I. -I..  -I..  -I/usr/X11R6/include
-DDBUS_COMPILATION
-DDBUS_MACHINE_UUID_FILE=\""/usr/local/var/lib/dbus/machine-id"\"
-Wall -Wextra -Wchar-subscripts -Wmissing-declarations
-Wmissing-prototypes -Wnested-externs -Wpointer-arith -Wcast-align
-Wno-address -Wfloat-equal -Wdeclaration-after-statement
-Wno-missing-field-initializers -Wno-unused-parameter -Wno-sign-compare
-Wno-pointer-sign -fno-common -fno-strict-aliasing -I/usr/local/include
-MT dbus-run-session.o -MD -MP -MF .deps/dbus-run-session.Tpo -c -o
dbus-run-session.o dbus-run-session.c
mv -f .deps/dbus-run-session.Tpo .deps/dbus-run-session.Po
/bin/sh ../libtool  --tag=CC   --mode=link gcc  -Wall -Wextra
-Wchar-subscripts -Wmissing-declarations -Wmissing-prototypes
-Wnested-externs -Wpointer-arith -Wcast-align -Wno-address -Wfloat-equal
-Wdeclaration-after-statement -Wno-missing-field-initializers
-Wno-unused-parameter -Wno-sign-compare -Wno-pointer-sign -fno-common
-fno-strict-aliasing -I/usr/local/include -export-dynamic
-L/usr/local/lib -o dbus-run-session dbus-run-session.o
../dbus/libdbus-1.la  
libtool: link: gcc -Wall -Wextra -Wchar-subscripts
-Wmissing-declarations -Wmissing-prototypes -Wnested-externs
-Wpointer-arith -Wcast-align -Wno-address -Wfloat-equal
-Wdeclaration-after-statement -Wno-missing-field-initializers
-Wno-unused-parameter -Wno-sign-compare -Wno-pointer-sign -fno-common
-fno-strict-aliasing -I/usr/local/include -o .libs/dbus-run-session
dbus-run-session.o -Wl,-E  -L/usr/local/lib -L../dbus/.libs -ldbus-1
-lpthread -Wl,-rpath,/usr/local/lib
/usr/local/lib/libdbus-1.so.10.2: warning: vsprintf() is often misused,
please use vsnprintf()
dbus-run-session.o(.text+0x1eb): In function `exec_dbus_daemon':
: warning: sprintf() is often misused, please use snprintf()
dbus-run-session.o(.text+0x9f5): In function `main':
: undefined reference to `dbus_setenv'
dbus-run-session.o(.text+0xa0a): In function `main':
: undefined reference to `dbus_setenv'
dbus-run-session.o(.text+0xa1f): In function `main':
: undefined reference to `dbus_setenv'
dbus-run-session.o(.text+0xa34): In function `main':
: undefined reference to `dbus_setenv'
dbus-run-session.o(.text+0xa49): In function `main':
: undefined reference to `dbus_setenv'
collect2: ld returned 1 exit status
gmake[2]: *** [dbus-run-session] Error 1
gmake[2]: Leaving directory `/home/chengwei/Upstream/dbus.git/tools'
gmake[1]: *** [all-recursive] Error 1
gmake[1]: Leaving directory `/home/chengwei/Upstream/dbus.git'
gmake: *** [all] Error 2
------------------------->8--------------->8----------------------

From the above log, it says libtool was trying to link
/usr/local/lib/libdbus-1.so.10.2 rather than the one in local build
directory.

Since all the non-built-in libs installed with prefix /usr/local, so I
configured dbus with "CFLAGS=-I/usr/local/include
LDFLAGS=-L/usr/local/lib", so that all the required headers/libs can
pass check when doing configure.


After did some investigations, I found that it's hardcod_direct=yes
cause the build failure and try to link to the old installed library
which hasn't the new introduced symbol.

$ sed -ne '5467,+4p' m4/libtool.m4
    openbsd* | bitrig*)
      if test -f /usr/libexec/ld.so; then
        _LT_TAGVAR(hardcode_direct, $1)=yes
   	    _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
        _LT_TAGVAR(hardcode_direct_absolute, $1)=yes

Do you consider this is a bug?


--
Thanks,
Chengwei




This bug report was last modified 11 years and 264 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.