Bug 14899 - Link failure
Summary: Link failure
Alias: None
Product: dbus
Classification: Unclassified
Component: core (show other bugs)
Version: unspecified
Hardware: All Mac OS X (All)
: medium normal
Assignee: Havoc Pennington
QA Contact: John (J5) Palmieri
Whiteboard: unreproducible on 10.6
Keywords: NEEDINFO
Depends on:
Reported: 2008-03-07 17:42 UTC by Marius Schamschula
Modified: 2014-09-10 15:27 UTC (History)
1 user (show)

See Also:
i915 platform:
i915 features:

configure log (94.78 KB, text/plain)
2008-03-30 16:50 UTC, Marius Schamschula

Description Marius Schamschula 2008-03-07 17:42:57 UTC
I get the following link failute under Mac OS 10.3.9, 10.4.11 and 10.5.2: (this snippet is from 10.4.11/PPC)

gcc -dynamiclib  -o .libs/libdbus-  .libs/dbus-address.o .libs/dbus-auth.o .libs/dbus-auth-script.o .libs/dbus-bus.o .libs/dbus-connection.o .libs/dbus-credentials.o .libs/dbus-errors.o .libs/dbus-keyring.o .libs/dbus-marshal-header.o .libs/dbus-marshal-byteswap.o .libs/dbus-marshal-recursive.o .libs/dbus-marshal-validate.o .libs/dbus-message.o .libs/dbus-misc.o .libs/dbus-object-tree.o .libs/dbus-pending-call.o .libs/dbus-resources.o .libs/dbus-server.o .libs/dbus-server-debug-pipe.o .libs/dbus-server-socket.o .libs/dbus-server-unix.o .libs/dbus-sha.o .libs/dbus-signature.o .libs/dbus-timeout.o .libs/dbus-threads.o .libs/dbus-transport.o .libs/dbus-transport-socket.o .libs/dbus-transport-unix.o .libs/dbus-uuidgen.o .libs/dbus-watch.o .libs/dbus-dataslot.o .libs/dbus-hash.o .libs/dbus-internals.o .libs/dbus-list.o .libs/dbus-marshal-basic.o .libs/dbus-memory.o .libs/dbus-mempool.o .libs/dbus-string.o .libs/dbus-sysdeps.o .libs/dbus-sysdeps-pthread.o .libs/dbus-sysdeps-unix.o .libs/dbus-userdb.o   -Wl,-z -Wl,relro -install_name  /usr/local/lib/libdbus-1.3.dylib -compatibility_version 8 -current_version 8.0
/usr/libexec/gcc/powerpc-apple-darwin8/4.0.1/libtool: unknown option character `z' in: -z
Usage: /usr/libexec/gcc/powerpc-apple-darwin8/4.0.1/libtool -static [-] file [...] [-filelist listfile[,dirname]] [-arch_only arch] [-sacLT]
Usage: /usr/libexec/gcc/powerpc-apple-darwin8/4.0.1/libtool -dynamic [-] file [...] [-filelist listfile[,dirname]] [-arch_only arch] [-o output] [-install_name name] [-compatibility_version #] [-current_version #] [-seg1addr 0x#] [-segs_read_only_addr 0x#] [-segs_read_write_addr 0x#] [-seg_addr_table <filename>] [-seg_addr_table_filename <file_system_path>] [-all_load] [-noall_load]
make[3]: *** [libdbus-1.la] Error 1
make[2]: *** [all] Error 2
make[1]: *** [all-recursive] Error 1
make: *** [all] Error 2
Comment 1 John (J5) Palmieri 2008-03-10 06:53:51 UTC
What version are you using?  Have you tried the latest from git? I have corrected some issues with MacOSX linking by testing for link flags and had gotten confirmation that it worked.  -z and -relro are both checked for.
Comment 2 Marius Schamschula 2008-03-29 16:39:30 UTC
The version is 1.1.20.

I looked at the MacPorts Portfile 


and got a little farther. However, I now get the following error (this is form the 10.4.11 PPC box - I get the same thing under 10.5.2 - it looks a little different):

gcc -dynamiclib  -o .libs/libdbus-  .libs/dbus-address.o .libs/dbus-auth.o .libs/dbus-auth-script.o .libs/dbus-bus.o .libs/dbus-connection.o .libs/dbus-credentials.o .libs/dbus-errors.o .libs/dbus-keyring.o .libs/dbus-marshal-header.o .libs/dbus-marshal-byteswap.o .libs/dbus-marshal-recursive.o .libs/dbus-marshal-validate.o .libs/dbus-message.o .libs/dbus-misc.o .libs/dbus-object-tree.o .libs/dbus-pending-call.o .libs/dbus-resources.o .libs/dbus-server.o .libs/dbus-server-debug-pipe.o .libs/dbus-server-socket.o .libs/dbus-server-unix.o .libs/dbus-sha.o .libs/dbus-signature.o .libs/dbus-timeout.o .libs/dbus-threads.o .libs/dbus-transport.o .libs/dbus-transport-socket.o .libs/dbus-transport-unix.o .libs/dbus-uuidgen.o .libs/dbus-watch.o .libs/dbus-dataslot.o .libs/dbus-hash.o .libs/dbus-internals.o .libs/dbus-list.o .libs/dbus-marshal-basic.o .libs/dbus-memory.o .libs/dbus-mempool.o .libs/dbus-string.o .libs/dbus-sysdeps.o .libs/dbus-sysdeps-pthread.o .libs/dbus-sysdeps-unix.o .libs/dbus-userdb.o   -install_name  /usr/local/lib/libdbus-1.3.dylib -compatibility_version 8 -current_version 8.0
ld: Undefined symbols:
/usr/libexec/gcc/powerpc-apple-darwin8/4.0.1/libtool: internal link edit command failed
make[3]: *** [libdbus-1.la] Error 1
make[2]: *** [all] Error 2
make[1]: *** [all-recursive] Error 1
make: *** [all] Error 2

Comment 3 John (J5) Palmieri 2008-03-30 16:20:52 UTC
It looks like macosx does not support clearenv but we have a check for that in configure.in so it shouldn't be used.  Can you attach the output of ./configure?
Comment 4 Marius Schamschula 2008-03-30 16:50:30 UTC
Created attachment 15576 [details]
configure log
Comment 5 John (J5) Palmieri 2008-04-03 10:45:40 UTC
It looks like clearenv is detected.  I'm assuming this is some issue with your build environment.  Have you talked to the macports D-Bus guy?  I assume they have gotten this compiled.  One thing you can do is hack up the configure stuff to look at why the test for clearenv compiles correctly.  That may give you clues as to why the app is not working (e.g. search for clearenv in configure)

Comment 6 Marius Schamschula 2008-04-03 18:38:54 UTC
I'm using all the same settings (- xml doc generation, i.e. --disable-xml-docs) and patches...

However, since "nomaintainer" has no e-mail address, I'm just trying to get info from trac.

I had to add the following change to configure:

*** configure.orig	Thu Apr  3 20:04:42 2008
--- configure	Thu Apr  3 20:06:01 2008
*** 24217,24221 ****
! for ac_func in vsnprintf vasprintf nanosleep usleep poll setenv clearenv unsetenv socketpair getgrouplist fpathconf setrlimit
  as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
--- 24217,24221 ----
! for ac_func in vsnprintf vasprintf nanosleep usleep poll setenv unsetenv socketpair getgrouplist fpathconf setrlimit
  as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`

To get things to work. I have no idea how the MacPorts build happens w/o this change...
Comment 7 Mike McQuaid 2010-12-30 03:18:11 UTC
I can't reproduce this on 10.6. Can you try with the latest master?
Comment 8 Marius Schamschula 2011-01-26 10:48:53 UTC
Please note the date of the original post. We were dealing with dbus version 1.1.20. I no longer maintain ports for Mac OS X 10.3.x and 10.4.x. dbus 1.4.1 builds just fine under Mac OS X 10.5.x and 10.6.x.
Comment 9 Simon McVittie 2014-09-10 15:27:28 UTC
Unreproducible/obsolete; please open a new bug if you're getting linking failures in a modern dbus version.

Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.