! 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 !
fails to build with -z,defs
Status:
RESOLVED: FIXED

Comments

Description Yves-Alexis Perez editbugs 2011-04-23 20:50:03 CEST
Created attachment 3635 
link against proper libs

Hey,

parole fails to build if one adds -z,defs to LDFLAGS. Some of the build failure can be fixed (I've attached an initial patch to the bug) but some of them aren't fixable.

For example the tray plugin uses a symbol from parole-utils.c which is only present in the binary. The symbol is unresolved and it only works fine because it's dlopen()ed later but it's not really convenient.

It'd be best, imho, to put the relevant symbols in a shared library (a .la file, I guess?) a have everything linked against that (then into parole itself). Or maybe just put those symbols into libparole, I'm not sure.
Comment 1 Simon Steinbeiss editbugs 2012-07-23 03:04:26 CEST
Even though this bugreport is a bit dusty already, I assume it's still valid?
(Could you quickly check with git master to confirm?)
Comment 2 Yves-Alexis Perez editbugs 2012-07-23 07:36:52 CEST
(In reply to comment #1)
> Even though this bugreport is a bit dusty already, I assume it's still valid?
> (Could you quickly check with git master to confirm?)

Indeed:

with LDFLAGS="-Wl,-z,defs" ./autogen.sh; make -j8 V=1:


/bin/bash ../../../libtool  --tag=CC   --mode=link gcc  -pthread -I/usr/include/gtk-2.0 -I/usr/lib/x86_64-linux-gnu/gtk-2.0/include -I/usr/include/atk-1.0 -I/usr/include/cairo -I/usr/include/gdk-pixbuf-2.0 -I/usr/include/pango-1.0 -I/usr/include/gio-unix-2.0/ -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -I/usr/include/pixman-1 -I/usr/include/freetype2 -I/usr/include/libpng12    -I/usr/include/xfce4 -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include   -g -O2 -avoid-version -export-dynamic -module  -Wl,-z,defs -o stream-properties.la -rpath /usr/local/lib/parole-0 stream_properties_la-stream-properties-plugin.lo stream_properties_la-stream-properties-provider.lo  
libtool: link: gcc -shared  -fPIC -DPIC  .libs/stream_properties_la-stream-properties-plugin.o .libs/stream_properties_la-stream-properties-provider.o    -pthread -O2 -Wl,-z -Wl,defs   -pthread -Wl,-soname -Wl,stream-properties.so -o .libs/stream-properties.so
.libs/stream_properties_la-stream-properties-plugin.o: In function `parole_plugin_initialize':
/home/corsac/projets/xfce/apps/parole/src/plugins/properties/stream-properties-plugin.c:36: undefined reference to `xfce_textdomain'
.libs/stream_properties_la-stream-properties-provider.o: In function `stream_properties_class_intern_init':
/home/corsac/projets/xfce/apps/parole/src/plugins/properties/stream-properties-provider.c:67: undefined reference to `g_type_class_peek_parent'
.libs/stream_properties_la-stream-properties-provider.o: In function `stream_properties_class_init':
/home/corsac/projets/xfce/apps/parole/src/plugins/properties/stream-properties-provider.c:543: undefined reference to `g_type_check_class_cast'
.libs/stream_properties_la-stream-properties-provider.o: In function `stream_properties_finalize':
/home/corsac/projets/xfce/apps/parole/src/plugins/properties/stream-properties-provider.c:555: undefined reference to `g_type_check_class_cast'
.libs/stream_properties_la-stream-properties-provider.o: In function `set_widget_text':
/home/corsac/projets/xfce/apps/parole/src/plugins/properties/stream-properties-provider.c:88: undefined reference to `gtk_label_get_type'
/home/corsac/projets/xfce/apps/parole/src/plugins/properties/stream-properties-provider.c:88: undefined reference to `g_type_check_instance_cast'
/home/corsac/projets/xfce/apps/parole/src/plugins/properties/stream-properties-provider.c:88: undefined reference to `gtk_label_set_text'
.libs/stream_properties_la-stream-properties-provider.o: In function `init_media_tag_entries':
/home/corsac/projets/xfce/apps/parole/src/plugins/properties/stream-properties-provider.c:140: undefined reference to `g_dgettext'
/home/corsac/projets/xfce/apps/parole/src/plugins/properties/stream-properties-provider.c:141: undefined reference to `g_dgettext'
/home/corsac/projets/xfce/apps/parole/src/plugins/properties/stream-properties-provider.c:142: undefined reference to `g_dgettext'
/home/corsac/projets/xfce/apps/parole/src/plugins/properties/stream-properties-provider.c:143: undefined reference to `g_dgettext'
.libs/stream_properties_la-stream-properties-provider.o: In function `tag_message_cb':
/home/corsac/projets/xfce/apps/parole/src/plugins/properties/stream-properties-provider.c:414: undefined reference to `g_type_check_instance_cast'
/home/corsac/projets/xfce/apps/parole/src/plugins/properties/stream-properties-provider.c:414: undefined reference to `g_object_get'
/home/corsac/projets/xfce/apps/parole/src/plugins/properties/stream-properties-provider.c:467: undefined reference to `g_free'
/home/corsac/projets/xfce/apps/parole/src/plugins/properties/stream-properties-provider.c:470: undefined reference to `g_type_check_instance_cast'
/home/corsac/projets/xfce/apps/parole/src/plugins/properties/stream-properties-provider.c:470: undefined reference to `g_object_get'
/home/corsac/projets/xfce/apps/parole/src/plugins/properties/stream-properties-provider.c:477: undefined reference to `g_free'
/home/corsac/projets/xfce/apps/parole/src/plugins/properties/stream-properties-provider.c:480: undefined reference to `g_type_check_instance_cast'
/home/corsac/projets/xfce/apps/parole/src/plugins/properties/stream-properties-provider.c:480: undefined reference to `g_object_get'
/home/corsac/projets/xfce/apps/parole/src/plugins/properties/stream-properties-provider.c:487: undefined reference to `g_free'
/home/corsac/projets/xfce/apps/parole/src/plugins/properties/stream-properties-provider.c:490: undefined reference to `g_type_check_instance_cast'
/home/corsac/projets/xfce/apps/parole/src/plugins/properties/stream-properties-provider.c:490: undefined reference to `g_object_get'
/home/corsac/projets/xfce/apps/parole/src/plugins/properties/stream-properties-provider.c:497: undefined reference to `g_free'
.libs/stream_properties_la-stream-properties-provider.o: In function `stream_properties_set_player':
/home/corsac/projets/xfce/apps/parole/src/plugins/properties/stream-properties-provider.c:518: undefined reference to `g_type_check_instance_cast'
.libs/stream_properties_la-stream-properties-provider.o: In function `stream_properties_create_widgets':
/home/corsac/projets/xfce/apps/parole/src/plugins/properties/stream-properties-provider.c:245: undefined reference to `gtk_vbox_new'
/home/corsac/projets/xfce/apps/parole/src/plugins/properties/stream-properties-provider.c:246: undefined reference to `gtk_table_new'
/home/corsac/projets/xfce/apps/parole/src/plugins/properties/stream-properties-provider.c:247: undefined reference to `pango_font_description_from_string'
/home/corsac/projets/xfce/apps/parole/src/plugins/properties/stream-properties-provider.c:252: undefined reference to `gtk_alignment_new'
/home/corsac/projets/xfce/apps/parole/src/plugins/properties/stream-properties-provider.c:254: undefined reference to `g_dgettext'
/home/corsac/projets/xfce/apps/parole/src/plugins/properties/stream-properties-provider.c:254: undefined reference to `gtk_label_new'
/home/corsac/projets/xfce/apps/parole/src/plugins/properties/stream-properties-provider.c:255: undefined reference to `gtk_container_get_type'
/home/corsac/projets/xfce/apps/parole/src/plugins/properties/stream-properties-provider.c:255: undefined reference to `g_type_check_instance_cast'
/home/corsac/projets/xfce/apps/parole/src/plugins/properties/stream-properties-provider.c:255: undefined reference to `gtk_container_add'
/home/corsac/projets/xfce/apps/parole/src/plugins/properties/stream-properties-provider.c:256: undefined reference to `gtk_widget_modify_font'
/home/corsac/projets/xfce/apps/parole/src/plugins/properties/stream-properties-provider.c:258: undefined reference to `gtk_table_get_type'
/home/corsac/projets/xfce/apps/parole/src/plugins/properties/stream-properties-provider.c:258: undefined reference to `g_type_check_instance_cast'
/home/corsac/projets/xfce/apps/parole/src/plugins/properties/stream-properties-provider.c:258: undefined reference to `gtk_table_attach'
.libs/stream_properties_la-stream-properties-provider.o: In function `new_tag_widget':
/home/corsac/projets/xfce/apps/parole/src/plugins/properties/stream-properties-provider.c:132: undefined reference to `gtk_label_new'
.libs/stream_properties_la-stream-properties-provider.o: In function `stream_properties_create_widgets':
/home/corsac/projets/xfce/apps/parole/src/plugins/properties/stream-properties-provider.c:264: undefined reference to `gtk_alignment_new'
/home/corsac/projets/xfce/apps/parole/src/plugins/properties/stream-properties-provider.c:265: undefined reference to `g_type_check_instance_cast'
/home/corsac/projets/xfce/apps/parole/src/plugins/properties/stream-properties-provider.c:265: undefined reference to `gtk_container_add'
/home/corsac/projets/xfce/apps/parole/src/plugins/properties/stream-properties-provider.c:266: undefined reference to `g_type_check_instance_cast'
/home/corsac/projets/xfce/apps/parole/src/plugins/properties/stream-properties-provider.c:266: undefined reference to `gtk_table_attach'
/home/corsac/projets/xfce/apps/parole/src/plugins/properties/stream-properties-provider.c:275: undefined reference to `gtk_alignment_new'
/home/corsac/projets/xfce/apps/parole/src/plugins/properties/stream-properties-provider.c:277: undefined reference to `g_dgettext'
/home/corsac/projets/xfce/apps/parole/src/plugins/properties/stream-properties-provider.c:277: undefined reference to `gtk_label_new'
/home/corsac/projets/xfce/apps/parole/src/plugins/properties/stream-properties-provider.c:278: undefined reference to `g_type_check_instance_cast'
/home/corsac/projets/xfce/apps/parole/src/plugins/properties/stream-properties-provider.c:278: undefined reference to `gtk_container_add'
/home/corsac/projets/xfce/apps/parole/src/plugins/properties/stream-properties-provider.c:279: undefined reference to `gtk_widget_modify_font'
/home/corsac/projets/xfce/apps/parole/src/plugins/properties/stream-properties-provider.c:281: undefined reference to `g_type_check_instance_cast'
/home/corsac/projets/xfce/apps/parole/src/plugins/properties/stream-properties-provider.c:281: undefined reference to `gtk_table_attach'
.libs/stream_properties_la-stream-properties-provider.o: In function `new_tag_widget':
/home/corsac/projets/xfce/apps/parole/src/plugins/properties/stream-properties-provider.c:132: undefined reference to `gtk_label_new'
.libs/stream_properties_la-stream-properties-provider.o: In function `stream_properties_create_widgets':
/home/corsac/projets/xfce/apps/parole/src/plugins/properties/stream-properties-provider.c:287: undefined reference to `gtk_alignment_new'
/home/corsac/projets/xfce/apps/parole/src/plugins/properties/stream-properties-provider.c:288: undefined reference to `g_type_check_instance_cast'
/home/corsac/projets/xfce/apps/parole/src/plugins/properties/stream-properties-provider.c:288: undefined reference to `gtk_container_add'
/home/corsac/projets/xfce/apps/parole/src/plugins/properties/stream-properties-provider.c:289: undefined reference to `g_type_check_instance_cast'
/home/corsac/projets/xfce/apps/parole/src/plugins/properties/stream-properties-provider.c:289: undefined reference to `gtk_table_attach'
/home/corsac/projets/xfce/apps/parole/src/plugins/properties/stream-properties-provider.c:298: undefined reference to `gtk_alignment_new'
/home/corsac/projets/xfce/apps/parole/src/plugins/properties/stream-properties-provider.c:300: undefined reference to `g_dgettext'
/home/corsac/projets/xfce/apps/parole/src/plugins/properties/stream-properties-provider.c:300: undefined reference to `gtk_label_new'
/home/corsac/projets/xfce/apps/parole/src/plugins/properties/stream-properties-provider.c:301: undefined reference to `g_type_check_instance_cast'
/home/corsac/projets/xfce/apps/parole/src/plugins/properties/stream-properties-provider.c:301: undefined reference to `gtk_container_add'
/home/corsac/projets/xfce/apps/parole/src/plugins/properties/stream-properties-provider.c:302: undefined reference to `gtk_widget_modify_font'
/home/corsac/projets/xfce/apps/parole/src/plugins/properties/stream-properties-provider.c:304: undefined reference to `g_type_check_instance_cast'
/home/corsac/projets/xfce/apps/parole/src/plugins/properties/stream-properties-provider.c:304: undefined reference to `gtk_table_attach'
.libs/stream_properties_la-stream-properties-provider.o: In function `new_tag_widget':
/home/corsac/projets/xfce/apps/parole/src/plugins/properties/stream-properties-provider.c:132: undefined reference to `gtk_label_new'
.libs/stream_properties_la-stream-properties-provider.o: In function `stream_properties_create_widgets':
/home/corsac/projets/xfce/apps/parole/src/plugins/properties/stream-properties-provider.c:310: undefined reference to `gtk_alignment_new'
/home/corsac/projets/xfce/apps/parole/src/plugins/properties/stream-properties-provider.c:311: undefined reference to `g_type_check_instance_cast'
/home/corsac/projets/xfce/apps/parole/src/plugins/properties/stream-properties-provider.c:311: undefined reference to `gtk_container_add'
/home/corsac/projets/xfce/apps/parole/src/plugins/properties/stream-properties-provider.c:312: undefined reference to `g_type_check_instance_cast'
/home/corsac/projets/xfce/apps/parole/src/plugins/properties/stream-properties-provider.c:312: undefined reference to `gtk_table_attach'
/home/corsac/projets/xfce/apps/parole/src/plugins/properties/stream-properties-provider.c:321: undefined reference to `gtk_alignment_new'
/home/corsac/projets/xfce/apps/parole/src/plugins/properties/stream-properties-provider.c:323: undefined reference to `g_dgettext'
/home/corsac/projets/xfce/apps/parole/src/plugins/properties/stream-properties-provider.c:323: undefined reference to `gtk_label_new'
/home/corsac/projets/xfce/apps/parole/src/plugins/properties/stream-properties-provider.c:324: undefined reference to `g_type_check_instance_cast'
/home/corsac/projets/xfce/apps/parole/src/plugins/properties/stream-properties-provider.c:324: undefined reference to `gtk_container_add'
/home/corsac/projets/xfce/apps/parole/src/plugins/properties/stream-properties-provider.c:325: undefined reference to `gtk_widget_modify_font'
/home/corsac/projets/xfce/apps/parole/src/plugins/properties/stream-properties-provider.c:327: undefined reference to `g_type_check_instance_cast'
/home/corsac/projets/xfce/apps/parole/src/plugins/properties/stream-properties-provider.c:327: undefined reference to `gtk_table_attach'
.libs/stream_properties_la-stream-properties-provider.o: In function `new_tag_widget':
/home/corsac/projets/xfce/apps/parole/src/plugins/properties/stream-properties-provider.c:132: undefined reference to `gtk_label_new'
.libs/stream_properties_la-stream-properties-provider.o: In function `stream_properties_create_widgets':
/home/corsac/projets/xfce/apps/parole/src/plugins/properties/stream-properties-provider.c:333: undefined reference to `gtk_alignment_new'
/home/corsac/projets/xfce/apps/parole/src/plugins/properties/stream-properties-provider.c:334: undefined reference to `g_type_check_instance_cast'
/home/corsac/projets/xfce/apps/parole/src/plugins/properties/stream-properties-provider.c:334: undefined reference to `gtk_container_add'
/home/corsac/projets/xfce/apps/parole/src/plugins/properties/stream-properties-provider.c:335: undefined reference to `g_type_check_instance_cast'
/home/corsac/projets/xfce/apps/parole/src/plugins/properties/stream-properties-provider.c:335: undefined reference to `gtk_table_attach'
/home/corsac/projets/xfce/apps/parole/src/plugins/properties/stream-properties-provider.c:341: undefined reference to `g_dgettext'
/home/corsac/projets/xfce/apps/parole/src/plugins/properties/stream-properties-provider.c:341: undefined reference to `gtk_frame_new'
/home/corsac/projets/xfce/apps/parole/src/plugins/properties/stream-properties-provider.c:342: undefined reference to `g_type_check_instance_cast'
/home/corsac/projets/xfce/apps/parole/src/plugins/properties/stream-properties-provider.c:342: undefined reference to `gtk_container_add'
/home/corsac/projets/xfce/apps/parole/src/plugins/properties/stream-properties-provider.c:343: undefined reference to `gtk_box_get_type'
/home/corsac/projets/xfce/apps/parole/src/plugins/properties/stream-properties-provider.c:343: undefined reference to `g_type_check_instance_cast'
/home/corsac/projets/xfce/apps/parole/src/plugins/properties/stream-properties-provider.c:343: undefined reference to `gtk_box_pack_start'
.libs/stream_properties_la-stream-properties-provider.o: In function `stream_properties_set_player':
/home/corsac/projets/xfce/apps/parole/src/plugins/properties/stream-properties-provider.c:524: undefined reference to `g_dgettext'
/home/corsac/projets/xfce/apps/parole/src/plugins/properties/stream-properties-provider.c:524: undefined reference to `parole_provider_player_pack'
/home/corsac/projets/xfce/apps/parole/src/plugins/properties/stream-properties-provider.c:526: undefined reference to `g_signal_connect_data'
.libs/stream_properties_la-stream-properties-provider.o: In function `stream_properties_register_type':
/home/corsac/projets/xfce/apps/parole/src/plugins/properties/stream-properties-provider.c:67: undefined reference to `g_type_module_register_type'
/home/corsac/projets/xfce/apps/parole/src/plugins/properties/stream-properties-provider.c:67: undefined reference to `parole_provider_plugin_get_type'
.libs/stream_properties_la-stream-properties-provider.o: In function `stream_properties_set_player':
/home/corsac/projets/xfce/apps/parole/src/plugins/properties/stream-properties-provider.c:529: undefined reference to `g_signal_connect_data'
.libs/stream_properties_la-stream-properties-provider.o: In function `stream_properties_register_type':
/home/corsac/projets/xfce/apps/parole/src/plugins/properties/stream-properties-provider.c:67: undefined reference to `g_type_module_add_interface'
collect2: error: ld returned 1 exit status
Comment 3 Simon Steinbeiss editbugs 2012-07-23 09:32:34 CEST
From your output it seems that it only affects the stream-properties plugin at the moment, yet the patch seems to only apply to the trayicon plugin..?

I looked at your patch, you add $(X11_LIBS) to parole_LDADD (in src/Makefile.at). We have currently have $(LIBX11_LIBS) there, is that the same or is both needed?

Also in configure.ac (I assume that patch should go against configure.ac.in), you added XDT_CHECK_PACKAGE([X11], [x11]) while we use XDT_CHECK_LIBX11() at the moment.

Maybe my questions are stupid, so I apologize in advance. The sad truth is that I have practically no experience with Makefiles (yet) :/
Comment 4 Yves-Alexis Perez editbugs 2012-07-23 10:27:22 CEST
(In reply to comment #3)
> From your output it seems that it only affects the stream-properties plugin
> at the moment, yet the patch seems to only apply to the trayicon plugin..?

Well, I didn't redo the patch so it's surely completely invalid now :)
Comment 5 Yves-Alexis Perez editbugs 2012-07-23 10:27:47 CEST
Comment on attachment 3635 
link against proper libs

Seems that the patch doesnt make sense anymore for current HEAD.
Comment 6 Lionel Le Folgoc 2012-07-23 11:35:56 CEST
Created attachment 4560 
Proposed patch

I updated your patch, it should build fine (I haven't tried to run parole though).

For parole_icon_load() used in the tray plugin, I replaced it with gtk_icon_theme_load_icon() directly, not sure it's that useful to log a warning when it fails...
Comment 7 Simon Steinbeiss editbugs 2012-07-23 14:57:05 CEST
Thanks Lionel!
But... errrm... why did you not try to run Parole? :)

Anyway, will test the patch now and if everything builds and runs fine I'll push it to master.
Comment 8 Simon Steinbeiss editbugs 2012-07-23 17:33:00 CEST
The fix is now in master.

Bug #7531

Reported by:
Yves-Alexis Perez
Reported on: 2011-04-23
Last modified on: 2012-07-23

People

Assignee:
Simon Steinbeiss
CC List:
2 users

Version

Version:
0.2.0.6

Attachments

link against proper libs (2.32 KB, application/octet-stream)
2011-04-23 20:50 CEST , Yves-Alexis Perez
no flags
Proposed patch (3.42 KB, patch)
2012-07-23 11:35 CEST , Lionel Le Folgoc
no flags

Additional information