Bug 50958 - Undefined reference to symbol 'g_bus_get_sync' compiling against glib-2-32 at contrib/systemd-update
Summary: Undefined reference to symbol 'g_bus_get_sync' compiling against glib-2-32 at...
Status: RESOLVED FIXED
Alias: None
Product: PackageKit
Classification: Unclassified
Component: General (show other bugs)
Version: unspecified
Hardware: All Linux (All)
: medium normal
Assignee: Richard Hughes
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-06-11 03:42 UTC by Alejandro Leiva
Modified: 2012-06-11 08:20 UTC (History)
1 user (show)

See Also:
i915 platform:
i915 features:


Attachments
Patch (1.16 KB, patch)
2012-06-11 03:47 UTC, Alejandro Leiva
Details | Splinter Review

Description Alejandro Leiva 2012-06-11 03:42:12 UTC
Trying to compile PackageKit against glib-2-32 and glib-master linking process failed.

The g_bus_get_sync metod is defined in GIO so it's needed to add it to the LDFLAGS.

Trace:

aleiva@lysergic:/opt/gnome-shell/source/PackageKit/contrib/systemd-updates$ make V=1
/bin/bash ../../libtool  --tag=CC   --mode=link gcc -Werror -Wall -Wcast-align -Wno-uninitialized -Wmissing-declarations -Wpointer-arith -Wcast-align -Wwrite-strings -Winit-self -Wreturn-type -Wformat-nonliteral -Wformat-security -Wmissing-include-dirs -Wmissing-format-attribute -Wsign-compare -Wuninitialized -Waggregate-return -Wdeclaration-after-statement -Wshadow -Wno-strict-aliasing -Winline -g -O2  -L/opt/gnome-shell/install/lib  -o pk-offline-update pk_offline_update-pk-offline-update.o -L/opt/gnome-shell/install/lib -lgobject-2.0 -lglib-2.0   ../../lib/packagekit-glib2/libpackagekit-glib2.la 
libtool: link: gcc -Werror -Wall -Wcast-align -Wno-uninitialized -Wmissing-declarations -Wpointer-arith -Wcast-align -Wwrite-strings -Winit-self -Wreturn-type -Wformat-nonliteral -Wformat-security -Wmissing-include-dirs -Wmissing-format-attribute -Wsign-compare -Wuninitialized -Waggregate-return -Wdeclaration-after-statement -Wshadow -Wno-strict-aliasing -Winline -g -O2 -o .libs/pk-offline-update pk_offline_update-pk-offline-update.o  -L/opt/gnome-shell/install/lib -lgobject-2.0 -lglib-2.0 ../../lib/packagekit-glib2/.libs/libpackagekit-glib2.so -Wl,-rpath -Wl,/opt/gnome-shell/install/lib
/usr/bin/ld: pk_offline_update-pk-offline-update.o: undefined reference to symbol 'g_bus_get_sync'
/usr/bin/ld: note: 'g_bus_get_sync' is defined in DSO /opt/gnome-shell/install/lib/libgio-2.0.so.0 so try adding it to the linker command line
/opt/gnome-shell/install/lib/libgio-2.0.so.0: could not read symbols: Invalid operation
collect2: ld returned 1 exit status
make: *** [pk-offline-update] Error 1
Comment 1 Alejandro Leiva 2012-06-11 03:47:31 UTC
Created attachment 62883 [details] [review]
Patch
Comment 2 Richard Hughes 2012-06-11 08:20:02 UTC
Pushed to master, thanks dude.


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.