GNOME Bugzilla – Bug 737274
top level Makefile: gcr/gcr-dbus-generated.h target never run; so: no starting _ in gcr_dbus* names
Last modified: 2019-02-22 11:58:05 UTC
hello, I can't find any reference to this neither in bugzilla nor anywhere else, yet it looks to me like a "real" problem Apologies if I am missing some blatant point here Starting with 3.13.91, I get the following undefs at link time when building gcr: undefined reference to `gcr_dbus_prompter_callback_get_type' undefined reference to `gcr_dbus_prompter_callback_skeleton_get_type' undefined reference to `gcr_dbus_prompter_proxy_get_type' undefined reference to `gcr_dbus_prompter_callback_proxy_get_type' undefined reference to `gcr_dbus_prompter_skeleton_get_type' undefined reference to `gcr_dbus_prompter_get_type' Turns out that the problem is in the Makefile: ----8<----8<----8<---- [...] BUILT_SOURCES = $(gck_BUILT_SOURCES) $(gcr_BUILT_SOURCES) \ $(am__append_6) [...] gcr_BUILT_SOURCES = \ gcr/gcr-marshal.c gcr/gcr-marshal.h \ gcr/gcr-enum-types-base.c gcr/gcr-enum-types-base.h \ gcr/gcr-oids.c gcr/gcr-oids.h \ gcr/gcr-dbus-generated.c gcr/gcr-dbus-generated.h [...] all: $(BUILT_SOURCES) config.h $(info BUILT_SOURCES: $(BUILT_SOURCES)) $(MAKE) $(AM_MAKEFLAGS) all-recursive [...] gcr/gcr-dbus-generated.c: $(DBUS_XML_DEFINITIONS) $(AM_V_GEN) $(GDBUS_CODEGEN) --interface-prefix org.gnome.keyring.internal. \ --generate-c-code gcr/gcr-dbus-generated --c-namespace GcrDBus $^ $(AM_V_GEN) sed -e 's/gcr_dbus/_gcr_dbus/g' \ gcr/gcr-dbus-generated.c > gcr/gcr-dbus-generated.c.tmp && \ mv gcr/gcr-dbus-generated.c.tmp gcr/gcr-dbus-generated.c gcr/gcr-dbus-generated.h: gcr/gcr-dbus-generated.c $(AM_V_GEN) sed -e 's/gcr_dbus/_gcr_dbus/g' \ gcr/gcr-dbus-generated.h > gcr/gcr-dbus-generated.h.tmp && \ mv gcr/gcr-dbus-generated.h.tmp gcr/gcr-dbus-generated.h ----8<----8<----8<---- Target "all" depends on gcr/gcr-dbus-generated.h (via BUILT_SOURCES <- gcr_BUILT_SOURCES). gcr/gcr-dbus-generated.h is created in the rule for gcr/gcr-dbus-generated.c, *together* with gcr/gcr-dbus-generated.c. On my system (x86_64 GNU/Linux, more details on request) both gcr/gcr-dbus-generated.h and gcr/gcr-dbus-generated.c end up with the *same creation date*: localhost> lls -l --time-style=full-iso gcr-dbus-generated* -rw-r--r-- 1 balducci balducci 89903 2014-09-24 13:53:14.000000000 +0200 gcr-dbus-generated.c -rw-r--r-- 1 balducci balducci 14809 2014-09-24 13:53:14.000000000 +0200 gcr-dbus-generated.h Since gcr/gcr-dbus-generated.h depends on gcr/gcr-dbus-generated.c and the two have exactly the same age, make thinks that gcr/gcr-dbus-generated.h is up to date and the sed is never run: hence, the above errors (due to names missing the starting _, which is supposed to be added by the sed): make --debug=v: [...] Successfully remade target file 'gcr/gcr-dbus-generated.c'. Considering target file 'gcr/gcr-dbus-generated.h'. Pruning file 'gcr/gcr-dbus-generated.c'. Finished prerequisites of target file 'gcr/gcr-dbus-generated.h'. Prerequisite 'gcr/gcr-dbus-generated.c' is older than target 'gcr/gcr-dbus-generated.h'. No need to remake target 'gcr/gcr-dbus-generated.h'. [...] As a matter of fact, moving the sed for gcr/gcr-dbus-generated.h into the rule for gcr/gcr-dbus-generated.c works around the problem for me: diff -c ./Makefile.in.FIX_GCR_DBUS_GENERATED_H_RULE ./Makefile.in *** ./Makefile.in.FIX_GCR_DBUS_GENERATED_H_RULE Wed Sep 24 14:33:40 2014 --- ./Makefile.in Wed Sep 24 14:33:40 2014 *************** *** 6314,6319 **** --- 6314,6320 ---- $(AM_V_GEN) sed -e 's/gcr_dbus/_gcr_dbus/g' \ gcr/gcr-dbus-generated.c > gcr/gcr-dbus-generated.c.tmp && \ mv gcr/gcr-dbus-generated.c.tmp gcr/gcr-dbus-generated.c + sed -i -e's|gcr_dbus|_gcr_dbus|g' gcr/gcr-dbus-generated.h gcr/gcr-dbus-generated.h: gcr/gcr-dbus-generated.c $(AM_V_GEN) sed -e 's/gcr_dbus/_gcr_dbus/g' \
(In reply to comment #0) > As a matter of fact, moving the sed for gcr/gcr-dbus-generated.h into > the rule for gcr/gcr-dbus-generated.c works around the problem for me: > > diff -c ./Makefile.in.FIX_GCR_DBUS_GENERATED_H_RULE ./Makefile.in > *** ./Makefile.in.FIX_GCR_DBUS_GENERATED_H_RULE Wed Sep 24 14:33:40 2014 > --- ./Makefile.in Wed Sep 24 14:33:40 2014 > *************** > *** 6314,6319 **** > --- 6314,6320 ---- > $(AM_V_GEN) sed -e 's/gcr_dbus/_gcr_dbus/g' \ > gcr/gcr-dbus-generated.c > gcr/gcr-dbus-generated.c.tmp && > \ > mv gcr/gcr-dbus-generated.c.tmp gcr/gcr-dbus-generated.c > + sed -i -e's|gcr_dbus|_gcr_dbus|g' gcr/gcr-dbus-generated.h > > gcr/gcr-dbus-generated.h: gcr/gcr-dbus-generated.c > $(AM_V_GEN) sed -e 's/gcr_dbus/_gcr_dbus/g' \ Sounds good to me. Would you be able to attach a git patch, check it against 'make distcheck' and I'll merge it. Thanks. Seems like this came up because the Makefile is now non-recursive and processed in parallel by make.
errr, apologies: never done that before and being a bit overloaded by other tasks... thanks a lot for the prompt reply and thanks for your work ciao gabriele
Hello! I apparently filed a duplicate to this bug. Please see attached patch in bug#737622 for a suggested solution which has been confirmed as solving the problems we saw on Debian. https://buildd.debian.org/status/package.php?p=gcr&suite=sid
*** This bug has been marked as a duplicate of bug 737622 ***