! Please note that this is a snapshot of our old Bugzilla server, which is read only since May 29, 2020. Please go to gitlab.xfce.org for our new server !
Build error with implicit DSO linking
Status:
RESOLVED: FIXED
Product:
Xfce4-sensors-plugin
Component:
General

Comments

Description Christoph Wickert editbugs 2010-06-04 00:41:45 CEST
The default behavior for ld allows users to 'indirectly' link to required objects/libraries through intermediate objects/libraries. While this is convenient, it can also be dangerous because it makes your program's dependencies tied to the dependencies of other objects. This is why Fedora recently changed the DSO-linking semantics of their gcc compiler, which leads to several build errors like this one:

gcc -pthread -I/usr/include/xfce4/ -I/usr/include/xfce4 -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I/usr/include/gtk-2.0 -I/usr/lib/gtk-2.0/include -I/usr/include/pango-1.0 -I/usr/include/cairo -I/usr/include/pixman-1 -I/usr/include/freetype2 -I/usr/include/libpng12 -I/usr/include/atk-1.0 -DPACKAGE_LOCALE_DIR=\"/usr/share/locale\" -I/usr/include -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m32 -march=i386 -mtune=generic -fasynchronous-unwind-tables -o .libs/xfce4-sensors-plugin xfce4_sensors_plugin-sensors-plugin.o  ../lib/.libs/libxfce4sensors.so  -Wl,--rpath -Wl,/usr/lib/xfce4/modules
/usr/bin/ld: xfce4_sensors_plugin-sensors-plugin.o: undefined reference to symbol 'xfce_panel_plugin_unblock_menu'
/usr/bin/ld: note: 'xfce_panel_plugin_unblock_menu' is defined in DSO /usr/lib/libxfce4panel.so.1 so try adding it to the linker command line
/usr/lib/libxfce4panel.so.1: could not read symbols: Invalid operation
collect2: ld returned 1 exit status
make[2]: *** [xfce4-sensors-plugin] Error 1

For more info see http://fedoraproject.org/wiki/UnderstandingDSOLinkChange and the downstream bug report at https://bugzilla.redhat.com/show_bug.cgi?id=564840
Comment 1 Christoph Wickert editbugs 2010-06-04 00:43:19 CEST
Created attachment 3006 
patch to fix the issue in xfce4-sensors-plugin 1.0.0
Comment 2 Fabian Nowak editbugs 2010-06-06 20:32:42 CEST
thanks for reporting, i manually applied the content of the patch and also checked the remaining makefiles in other source folders.

Bug #6492

Reported by:
Christoph Wickert
Reported on: 2010-06-04
Last modified on: 2010-06-06

People

Assignee:
Fabian Nowak
CC List:
0 users

Version

Version:
unspecified

Attachments

Additional information