public inbox for linux-bluetooth@vger.kernel.org
 help / color / mirror / Atom feed
* [Bluez-devel] [PATCH] bluez-gnome link fix
@ 2006-12-21 19:15 Andrey Rahmatullin
  2006-12-21 19:37 ` Marcel Holtmann
  0 siblings, 1 reply; 3+ messages in thread
From: Andrey Rahmatullin @ 2006-12-21 19:15 UTC (permalink / raw)
  To: bluez-devel


[-- Attachment #1.1.1: Type: text/plain, Size: 222 bytes --]

Hi.

There is a small patch which fixes linking of bluetooth-sendto with
--as-needed linker option (libs should be in command line only after
sources and static libs that use them).

-- 
WBR, wRAR (ALT Linux Team)

[-- Attachment #1.1.2: bluez-gnome-0.6-alt-link-fixes.patch --]
[-- Type: text/plain, Size: 405 bytes --]

--- bluez-gnome/sendto/Makefile.am.orig	2006-10-22 23:41:40 +0600
+++ bluez-gnome/sendto/Makefile.am	2006-10-31 21:56:02 +0500
@@ -3,7 +3,7 @@
 
 bluetooth_sendto_SOURCES = main.c
 
-bluetooth_sendto_LDADD = @GTK_LIBS@ @DBUS_LIBS@ $(top_builddir)/common/libcommon.a
+bluetooth_sendto_LDADD = @GTK_LIBS@ $(top_builddir)/common/libcommon.a @DBUS_LIBS@
 
 AM_CFLAGS = @DBUS_CFLAGS@ @GTK_CFLAGS@
 

[-- Attachment #1.2: Digital signature --]
[-- Type: application/pgp-signature, Size: 189 bytes --]

[-- Attachment #2: Type: text/plain, Size: 347 bytes --]

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV

[-- Attachment #3: Type: text/plain, Size: 164 bytes --]

_______________________________________________
Bluez-devel mailing list
Bluez-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bluez-devel

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [Bluez-devel] [PATCH] bluez-gnome link fix
  2006-12-21 19:15 [Bluez-devel] [PATCH] bluez-gnome link fix Andrey Rahmatullin
@ 2006-12-21 19:37 ` Marcel Holtmann
  2006-12-21 19:55   ` Andrey Rahmatullin
  0 siblings, 1 reply; 3+ messages in thread
From: Marcel Holtmann @ 2006-12-21 19:37 UTC (permalink / raw)
  To: BlueZ development

Hi Andrey,

> There is a small patch which fixes linking of bluetooth-sendto with
> --as-needed linker option (libs should be in command line only after
> sources and static libs that use them).

I need a more detailed explanation on why your fix is correct, because I
simply don't see it.

Regards

Marcel



-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Bluez-devel mailing list
Bluez-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bluez-devel

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [Bluez-devel] [PATCH] bluez-gnome link fix
  2006-12-21 19:37 ` Marcel Holtmann
@ 2006-12-21 19:55   ` Andrey Rahmatullin
  0 siblings, 0 replies; 3+ messages in thread
From: Andrey Rahmatullin @ 2006-12-21 19:55 UTC (permalink / raw)
  To: bluez-devel


[-- Attachment #1.1: Type: text/plain, Size: 2208 bytes --]

On Thu, Dec 21, 2006 at 08:37:54PM +0100, Marcel Holtmann wrote:
> I need a more detailed explanation on why your fix is correct, because I
> simply don't see it.
gcc -I/usr/include/dbus-1.0 -I/usr/lib/dbus-1.0/include -I/usr/include/glib-2.0
-I/usr/lib/glib-2.0/include   -DDBUS_API_SUBJECT_TO_CHANGE
-I/usr/include/gtk-2.0 -I/usr/lib/gtk-2.0/include -I/usr/include/atk-1.0
-I/usr/include/cairo -I/usr/include/pango-1.0 -I/usr/include/glib-2.0
-I/usr/lib/glib-2.0/include   -pipe -Wall -O2 -march=athlon -mtune=athlon-xp
-D_FORTIFY_SOURCE=2   -o bluetooth-sendto  main.o -lgtk-x11-2.0 -lgdk-x11-2.0
-latk-1.0 -lgdk_pixbuf-2.0 -lm -lpangocairo-1.0 -lpango-1.0 -lcairo
-lgobject-2.0 -lgmodule-2.0 -ldl -lglib-2.0   -ldbus-glib-1 -ldbus-1 -lglib-2.0
../common/libcommon.a

../common/libcommon.a(manager.o): In function `update_adapter_list':
manager.c:(.text+0x26a): undefined reference to `dbus_g_proxy_call'
../common/libcommon.a(manager.o): In function `bluetooth_manager_init':
manager.c:(.text+0x306): undefined reference to `dbus_g_proxy_new_for_name'
manager.c:(.text+0x332): undefined reference to `dbus_g_proxy_add_signal'
manager.c:(.text+0x356): undefined reference to `dbus_g_proxy_connect_signal'
manager.c:(.text+0x376): undefined reference to `dbus_g_proxy_add_signal'
manager.c:(.text+0x39a): undefined reference to `dbus_g_proxy_connect_signal'
../common/libcommon.a(private.o): In function `bluetooth_get_connection':
private.c:(.text+0x2c): undefined reference to `dbus_g_bus_get'
collect2: ld returned 1 exit status
make[2]: *** [bluetooth-sendto] Error 1


If you use ld --as-needed (which is by default in some distributions), you
should write all -l options after, not before .o files (and .a file is
just a collection of .o) which use symbols from that -l libs, or they will
be ignored. 

Note also that if -lfoo resolves to static lib, this behavior will be
always the same even without --as-needed.

Normally if you use autotools, all that you need to do is writing your
-lfoo to LDADD/LIBADD, not LDFLAGS. But if you link internal static libs
to your binaries, you still need to check the order of -l and .a .

-- 
WBR, wRAR (ALT Linux Team)

[-- Attachment #1.2: Digital signature --]
[-- Type: application/pgp-signature, Size: 189 bytes --]

[-- Attachment #2: Type: text/plain, Size: 347 bytes --]

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV

[-- Attachment #3: Type: text/plain, Size: 164 bytes --]

_______________________________________________
Bluez-devel mailing list
Bluez-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bluez-devel

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2006-12-21 19:55 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-12-21 19:15 [Bluez-devel] [PATCH] bluez-gnome link fix Andrey Rahmatullin
2006-12-21 19:37 ` Marcel Holtmann
2006-12-21 19:55   ` Andrey Rahmatullin

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox