GNOME Bugzilla – Bug 667908
1.30.1: libregress missing symbols in build if built with -Wl,-zdefs
Last modified: 2015-10-27 23:57:15 UTC
Created attachment 205257 [details] [review] Use GJS_GDBUS_CFLAGS and GJS_GDBUS_LIBS to fix missing symbols. The build for gjs-1.30.1 failed if one uses -Wl,-zdefs as follows: CC libregress_la-regress.lo /usr/share/gobject-introspection-1.0/tests/regress.c: In function 'regress_test_closure_variant': /usr/share/gobject-introspection-1.0/tests/regress.c:232:3: warning: passing argument 2 of 'g_value_set_variant' discards 'const' qualifier from pointer target type [enabled by default] /usr/include/glib-2.0/gobject/gvaluetypes.h:226:13: note: expected 'struct GVariant *' but argument is of type 'const struct GVariant *' /usr/share/gobject-introspection-1.0/tests/regress.c: In function 'regress_test_array_fixed_out_objects': /usr/share/gobject-introspection-1.0/tests/regress.c:2378:31: warning: initialization from incompatible pointer type [enabled by default] CCLD libregress.la .libs/libregress_la-regress.o: In function `regress_test_async_ready_callback': regress.c:(.text+0x283): undefined reference to `g_simple_async_result_new' .libs/libregress_la-regress.o: In function `regress_test_obj_torture_signature_1': regress.c:(.text+0x29a8): undefined reference to `g_io_error_quark' .libs/libregress_la-regress.o: In function `regress_test_torture_signature_1': regress.c:(.text+0x3816): undefined reference to `g_io_error_quark' .libs/libregress_la-regress.o: In function `regress_test_async_ready_callback': regress.c:(.text+0x28f): undefined reference to `g_simple_async_result_complete_in_idle' collect2: ld returned 1 exit status make[1]: *** [libregress.la] Error 1 make[1]: Leaving directory `/builddir/gjs-1.30.1' make: *** [all] Error 2 The attached patch fixes this. Please apply it for the next stable release... thanks.
Not sure if this is still needed, but I pushed a similar patch to master now, as it does not hurt. Attachment 205257 [details] pushed as de8e498 - Use GJS_GDBUS_CFLAGS and GJS_GDBUS_LIBS to fix missing symbols.