Skip to contentSkip to conversation

Undefined symbols in netlink plugin

DISCUSSION Ozan Çağlayan 2 participants 5 messages Sep 22, 2009 – Oct 13, 2009

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

Hi,

I'm getting the following when I launch bluetoothd with -n -d:

..
Can't load plugin /usr/lib/bluetooth/plugins/netlink.so:
/usr/lib/bluetooth/plugins/netlink.so: undefined symbol: debug ..

AFAIK, those libtool plugins are allowed to have undefined symbols after linking as they will probably be resolved during runtime loading but the warning above wasn't present on previous versions like 4.41 for example.

# ldd -u -r /usr/lib/bluetooth/plugins/netlink.so
     26771:     /usr/lib/bluetooth/plugins/netlink.so: error: symbol
lookup error: undefined symbol: g_io_channel_unix_new (continued)
undefined symbol: g_io_channel_unix_new
(/usr/lib/bluetooth/plugins/netlink.so)
     26771:     /usr/lib/bluetooth/plugins/netlink.so: error: symbol
lookup error: undefined symbol: debug (continued)
undefined symbol: debug (/usr/lib/bluetooth/plugins/netlink.so)
     26771:     /usr/lib/bluetooth/plugins/netlink.so: error: symbol
lookup error: undefined symbol: g_io_add_watch (continued)
undefined symbol: g_io_add_watch       
(/usr/lib/bluetooth/plugins/netlink.so)
     26771:     /usr/lib/bluetooth/plugins/netlink.so: error: symbol
lookup error: undefined symbol: info (continued)
undefined symbol: info  (/usr/lib/bluetooth/plugins/netlink.so)
     26771:     /usr/lib/bluetooth/plugins/netlink.so: error: symbol
lookup error: undefined symbol: g_io_channel_unref (continued)
undefined symbol: g_io_channel_unref   
(/usr/lib/bluetooth/plugins/netlink.so)
Unused direct dependencies:

So we have 3 undefined symbol from glib and 2 internal symbols from logging.c: debug() and info(). There's no difference if I install the libtool la file or not. Since glib is already needed by bluez daemon, those undefined symbols seems harmless but AFAIK the internal ones should have been linked against the static logging.o.

Or do I miss something?

Thanks,
Ozan Caglayan

#1 lore raw

Ozan Çağlayan wrote On 23-09-2009 01:22:

Quoted 41 lines

Hi,

I'm getting the following when I launch bluetoothd with -n -d:

..
Can't load plugin /usr/lib/bluetooth/plugins/netlink.so:
/usr/lib/bluetooth/plugins/netlink.so: undefined symbol: debug ..

AFAIK, those libtool plugins are allowed to have undefined symbols after linking as they will probably be resolved during runtime loading but the warning above wasn't present on previous versions like 4.41 for example.

# ldd -u -r /usr/lib/bluetooth/plugins/netlink.so
     26771:     /usr/lib/bluetooth/plugins/netlink.so: error: symbol
lookup error: undefined symbol: g_io_channel_unix_new (continued)
undefined symbol: g_io_channel_unix_new
(/usr/lib/bluetooth/plugins/netlink.so)
     26771:     /usr/lib/bluetooth/plugins/netlink.so: error: symbol
lookup error: undefined symbol: debug (continued)
undefined symbol: debug (/usr/lib/bluetooth/plugins/netlink.so)
     26771:     /usr/lib/bluetooth/plugins/netlink.so: error: symbol
lookup error: undefined symbol: g_io_add_watch (continued)
undefined symbol: g_io_add_watch       
(/usr/lib/bluetooth/plugins/netlink.so)
     26771:     /usr/lib/bluetooth/plugins/netlink.so: error: symbol
lookup error: undefined symbol: info (continued)
undefined symbol: info  (/usr/lib/bluetooth/plugins/netlink.so)
     26771:     /usr/lib/bluetooth/plugins/netlink.so: error: symbol
lookup error: undefined symbol: g_io_channel_unref (continued)
undefined symbol: g_io_channel_unref   
(/usr/lib/bluetooth/plugins/netlink.so)
Unused direct dependencies:

So we have 3 undefined symbol from glib and 2 internal symbols from logging.c: debug() and info(). There's no difference if I install the libtool la file or not. Since glib is already needed by bluez daemon, those undefined symbols seems harmless but AFAIK the internal ones should have been linked against the static logging.o.

Quoted 7 lines

Or do I miss something?

Thanks,
Ozan Caglayan

Still an issue on bluez 4.56. CC'ing Marcel Holtmann.

#2 lore raw

Hi Ozan,

Quoted 45 lines · Ozan Çağlayan

Ozan Çağlayan wrote On 23-09-2009 01:22:

Quoted 43 lines

Hi,

I'm getting the following when I launch bluetoothd with -n -d:

..
Can't load plugin /usr/lib/bluetooth/plugins/netlink.so:
/usr/lib/bluetooth/plugins/netlink.so: undefined symbol: debug ..

AFAIK, those libtool plugins are allowed to have undefined symbols after linking as they will probably be resolved during runtime loading but the warning above wasn't present on previous versions like 4.41 for example.

# ldd -u -r /usr/lib/bluetooth/plugins/netlink.so
     26771:     /usr/lib/bluetooth/plugins/netlink.so: error: symbol
lookup error: undefined symbol: g_io_channel_unix_new (continued)
undefined symbol: g_io_channel_unix_new
(/usr/lib/bluetooth/plugins/netlink.so)
     26771:     /usr/lib/bluetooth/plugins/netlink.so: error: symbol
lookup error: undefined symbol: debug (continued)
undefined symbol: debug (/usr/lib/bluetooth/plugins/netlink.so)
     26771:     /usr/lib/bluetooth/plugins/netlink.so: error: symbol
lookup error: undefined symbol: g_io_add_watch (continued)
undefined symbol: g_io_add_watch
(/usr/lib/bluetooth/plugins/netlink.so)
     26771:     /usr/lib/bluetooth/plugins/netlink.so: error: symbol
lookup error: undefined symbol: info (continued)
undefined symbol: info  (/usr/lib/bluetooth/plugins/netlink.so)
     26771:     /usr/lib/bluetooth/plugins/netlink.so: error: symbol
lookup error: undefined symbol: g_io_channel_unref (continued)
undefined symbol: g_io_channel_unref
(/usr/lib/bluetooth/plugins/netlink.so)
Unused direct dependencies:

So we have 3 undefined symbol from glib and 2 internal symbols from logging.c: debug() and info(). There's no difference if I install the libtool la file or not. Since glib is already needed by bluez daemon, those undefined symbols seems harmless but AFAIK the internal ones should have been linked against the static logging.o.

Or do I miss something?

The following patch fixes this issue but I am not sure if its the right way. Let Marcel take a call on this.

Quoted 6 lines
Quoted 5 lines

Thanks,
Ozan Caglayan

Quoted 6 lines

Still an issue on bluez 4.56. CC'ing Marcel Holtmann.
--
To unsubscribe from this list: send the line "unsubscribe linux-bluetooth" in the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Cheers,
Alok.

From f8716244d13e56a8d9116f654001b942f92e20ca Mon Sep 17 00:00:00 2001
From: Alok Barsode <[email protected]>
Date: Mon, 12 Oct 2009 14:05:20 +0530
Subject: [PATCH 1/1] Fix undefined symbol errors in netlink plugin.

---
 Makefile.am |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)
Makefile.am +2 -1
index d360acb..fa2497b 100644
@@ -90,7 +90,8 @@ endif
 if NETLINK
 plugin_LTLIBRARIES += plugins/netlink.la
 
-plugins_netlink_la_LIBADD = @NETLINK_LIBS@
+plugins_netlink_la_SOURCES = plugins/netlink.c src/logging.h src/logging.c
+plugins_netlink_la_LIBADD = @GLIB_LIBS@ @NETLINK_LIBS@
 plugins_netlink_la_LDFLAGS = -module -avoid-version -no-undefined
 plugins_netlink_la_CFLAGS = -fvisibility=hidden @DBUS_CFLAGS@ \
 					@GLIB_CFLAGS@ @NETLINK_CFLAGS@
Signature · 1 line
1.5.6.3
#3 lore raw

alok barsode wrote On 12-10-2009 11:37:

Quoted 4 lines

The following patch fixes this issue but I am not sure if its the right way. Let Marcel take a call on this.

Yes that fixed it. BTW, is it normal to get messages like

Failed to find Bluetooth netlink family
Failed to init netlink plugin

Does the netlink support really exist?

#4 lore raw

Hi Ozan,

Quoted 2 lines · On Tue, Oct 13, 2009 at 1:18 PM, Ozan =C3=87a=C4=9Flayan <[email protected]=…

alok barsode wrote On 12-10-2009 11:37:

Quoted 1 line

The following patch fixes this issue but I am not sure if its the right =

way.

Quoted 8 lines
Quoted 3 lines

Let Marcel take a call on this.

Yes that fixed it. BTW, is it normal to get messages like

Failed to find Bluetooth netlink family
Failed to init netlink plugin

At this point, yes. There in no netlink support in the kernel as of now.

Quoted 2 lines

Does the netlink support really exist?

Not right now. But we are working on it.

Cheers,
Alok.