[Pkg-bluetooth-maintainers] Bug#625984: bluez-tools: FTBFS with "ld --as-needed"

Michael Bienia geser at ubuntu.com
Sat May 7 15:20:47 UTC 2011


Package: bluez-tools
Version: 0.1.38+git662e-2
Severity: normal
Tags: patch

Hello,

bluez-tools fails to build in Ubuntu as it uses "ld --as-needed" for
linking by default and blueztools misuses AM_LDFLAGS to specify the
libraries to link with. As configure uses AM_LDFLAGS before the object
files in the linker call the linking fails. The proper variable for them
is LDADD, program_LDADD or even LIBS (I'm not very familiar with
automake which one is prefered when).

The attached patch renames AM_LDFLAGS in src/Makefile.{am,in} to LDADD
(instead of adding program_LDADD for each binary).

Regards,
Michael


https://launchpadlibrarian.net/71108320/buildlog_ubuntu-oneiric-i386.bluez-tools_0.1.38%2Bgit662e-2_FAILEDTOBUILD.txt.gz
gcc -std=gnu99  -g -O2 -L/usr/lib/i386-linux-gnu -ldbus-1 -lpthread -lrt   -L/usr/lib/i386-linux-gnu -lglib-2.0   -pthread -L/usr/lib/i386-linux-gnu -ldbus-glib-1 -ldbus-1 -lpthread -lgobject-2.0 -lgthread-2.0 -lrt -lglib-2.0   -Wl,-Bsymbolic-functions -o bt-monitor lib/marshallers.o lib/dbus-common.o lib/helpers.o lib/sdp.o  lib/bluez/adapter.o lib/bluez/agent.o lib/bluez/audio.o lib/bluez/device.o lib/bluez/input.o lib/bluez/manager.o lib/bluez/network.o lib/bluez/network_server.o lib/bluez/serial.o lib/obexd/obexagent.o lib/obexd/obexclient.o lib/obexd/obexclient_file_transfer.o lib/obexd/obexclient_session.o lib/obexd/obexclient_transfer.o lib/obexd/obexmanager.o lib/obexd/obexsession.o lib/obexd/obextransfer.o bt-monitor.o  
bt-monitor.o: In function `adapter_device_disappeared':
/build/buildd/bluez-tools-0.1.38+git662e/src/bt-monitor.c:123: undefined reference to `g_print'
bt-monitor.o: In function `device_disconnect_requested':
/build/buildd/bluez-tools-0.1.38+git662e/src/bt-monitor.c:182: undefined reference to `g_print'
bt-monitor.o: In function `reload_device_services':
/build/buildd/bluez-tools-0.1.38+git662e/src/bt-monitor.c:371: undefined reference to `g_hash_table_lookup'
/build/buildd/bluez-tools-0.1.38+git662e/src/bt-monitor.c:378: undefined reference to `g_slist_nth_data'
/build/buildd/bluez-tools-0.1.38+git662e/src/bt-monitor.c:379: undefined reference to `g_slist_remove'
/build/buildd/bluez-tools-0.1.38+git662e/src/bt-monitor.c:380: undefined reference to `g_object_unref'
[...]
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 01_ld-as-needed.patch
Type: text/x-diff
Size: 2029 bytes
Desc: not available
URL: <http://lists.alioth.debian.org/pipermail/pkg-bluetooth-maintainers/attachments/20110507/81cbf6ca/attachment.patch>


More information about the Pkg-bluetooth-maintainers mailing list