GNOME Bugzilla – Bug 734507
Parallel build sometimes fails
Last modified: 2015-08-15 21:01:10 UTC
Making all in src make[1]: Entering directory '/home/pterjan/rpmbuild/BUILD/gnome-maps-3.13.4/src' ./gnome-maps.js.gresource.xml: Failed to locate 'config.js' in any source directory. ./gnome-maps.js.gresource.xml: Failed to locate 'config.js' in any source directory. ./gnome-maps.js.gresource.xml: Failed to locate 'config.js' in any source directory. make[1]: Leaving directory '/home/pterjan/rpmbuild/BUILD/gnome-maps-3.13.4/src' make[1]: Entering directory '/home/pterjan/rpmbuild/BUILD/gnome-maps-3.13.4/src' GEN config.js make[1]: Leaving directory '/home/pterjan/rpmbuild/BUILD/gnome-maps-3.13.4/src' make[1]: Entering directory '/home/pterjan/rpmbuild/BUILD/gnome-maps-3.13.4/src' GEN gnome-maps-js.c gnome-maps.js.gresource.xml: Failed to locate 'path.js' in any source directory. Makefile:817: recipe for target 'gnome-maps-js.c' failed make[1]: *** [gnome-maps-js.c] Error 1 make[1]: Leaving directory '/home/pterjan/rpmbuild/BUILD/gnome-maps-3.13.4/src' make[1]: *** Waiting for unfinished jobs.... make[1]: Entering directory '/home/pterjan/rpmbuild/BUILD/gnome-maps-3.13.4/src' GEN gnome-maps-js.h gnome-maps.js.gresource.xml: Failed to locate 'path.js' in any source directory. Makefile:809: recipe for target 'gnome-maps-js.h' failed make[1]: *** [gnome-maps-js.h] Error 1 make[1]: Leaving directory '/home/pterjan/rpmbuild/BUILD/gnome-maps-3.13.4/src' make[1]: Entering directory '/home/pterjan/rpmbuild/BUILD/gnome-maps-3.13.4/src' GEN path.js make[1]: Leaving directory '/home/pterjan/rpmbuild/BUILD/gnome-maps-3.13.4/src' make[1]: Entering directory '/home/pterjan/rpmbuild/BUILD/gnome-maps-3.13.4/src' GEN gnome-maps-data.c make[1]: Leaving directory '/home/pterjan/rpmbuild/BUILD/gnome-maps-3.13.4/src' Makefile:421: recipe for target 'all-recursive' failed make: *** [all-recursive] Error 1
I believe that glib-compile-resources --generate-dependencies displays "Failed to locate 'path.js' in any source directory." for the generated .js and doesn't include them in the dependencies.
Created attachment 282953 [details] [review] Potential fix
Fix is actually working but quite wrong, glib-compile-resources --generate-dependencies just fails and doesn't list any dependency so there is no point calling it. [pterjan@chopin-cauldron-64 src]$ glib-compile-resources --sourcedir=. --generate-dependencies ./gnome-maps.js.gresource.xml ./gnome-maps.js.gresource.xml: Failed to locate 'config.js' in any source directory. [pterjan@chopin-cauldron-64 src]$ make ./gnome-maps.js.gresource.xml: Failed to locate 'config.js' in any source directory. ./gnome-maps.js.gresource.xml: Failed to locate 'config.js' in any source directory. ./gnome-maps.js.gresource.xml: Failed to locate 'config.js' in any source directory. GEN path.js GEN config.js GEN gnome-maps-js.c GEN gnome-maps-js.h GEN gnome-maps-data.c GEN gnome-maps-data.h make all-am make[1]: Entering directory '/ssd/co/cauldron/gnome-maps/BUILD/gnome-maps-3.13.4/src' CC gnome_maps-main.o CC gnome_maps-gnome-maps-data.o CC gnome_maps-gnome-maps-js.o CCLD gnome-maps GEN org.gnome.Maps.service make[1]: Leaving directory '/ssd/co/cauldron/gnome-maps/BUILD/gnome-maps-3.13.4/src' $ glib-compile-resources --sourcedir=. --generate-dependencies ./gnome-maps.js.gresource.xml ./sidebar.js ./userLocation.js ./routeQuery.js ./searchPopup.js ./placeEntry.js ./mapLocation.js ./http.js ./notificationManager.js ./utils.js ./geocodeService.js ./routeService.js ./zoomControl.js ./config.js ./route.js ./mainWindow.js ./main.js ./contextMenu.js ./layersPopover.js ./settings.js ./epaf.js ./mapView.js ./path.js ./notification.js ./geoclue.js ./application.js ./placeStore.js
If I understand the code right, then we use makefile to replace @xxx@ ac variables with their actual values; whats the reason not to do that as part of configure.ac directly, in the config file section? That would mean path.js and config.js are always ready before make is even started. (the current code lives in Makefile-js.am;
Created attachment 284335 [details] [review] Build: fix make rules for parallel build
If building out of tree is a requirement, then this additional diff would be needed: diff --git a/src/Makefile-js.am b/src/Makefile-js.am index bfe5e30..a11a057 100644 --- a/src/Makefile-js.am +++ b/src/Makefile-js.am @@ -1,5 +1,6 @@ js_files = $(shell $(GLIB_COMPILE_RESOURCES) \ --sourcedir=$(srcdir) \ + --sourcedir=$(builddir) \ --generate-dependencies $(srcdir)/gnome-maps.js.gresource.xml) gnome-maps-js.h: gnome-maps.js.gresource.xml $(js_files)
Review of attachment 284335 [details] [review]: I seem to get the following with a make distcheck: make[3]: Entering directory `/home/jonasdn/jhbuild/checkout/gnome-maps/gnome-maps-3.13.4/_build/src' make[3]: *** No rule to make target `..src/sidebar.js', needed by `distdir'. Stop. make[3]: Leaving directory `/home/jonasdn/jhbuild/checkout/gnome-maps/gnome-maps-3.13.4/_build/src'
Had to revert the fix because it broke stuff. We still need a fix for this and make sure that make distcheck succeed with the solution.
*** Bug 735722 has been marked as a duplicate of this bug. ***
Review of attachment 284335 [details] [review]: ::: configure.ac @@ +56,3 @@ po/Makefile.in + src/config.js + src/path.js Maybe the failure that Jonas mentioned is due to path.js is not properly generated, but I'm not sure... path.js is a runtime file. It seems that @localedir@ and @pkgdatadir@ variables are not expanded in this step.
Created attachment 285636 [details] [review] build: Make sure we generate path/config.js This is might be a temp work-around until we rewamp the build. Could someone test it? To see if it fixes the issue? Yosef?
It works for me, thanks!
Review of attachment 285636 [details] [review]: I think it looks like a solid hack xD, to not check dependencies with JS files and always force GEN of gnome-maps.js.gresource.xml sources should not be a big problem to us since we need to regenerate it 95% of the builds during development anyway.
Review of attachment 285636 [details] [review]: Hard to understand the patch due of lack of any details in the log. :(
Maybe something like: ---- build: Make sure we generate path/config.js This tries to fix parallel builds fails making GResource generated files for JS files depends on path.js and config.js, so we ensure that these files are properly generated before generate the GResource source files. Note that this break the dependency of GResource source files with JS files, so GResources source files are unconditionally regenerated instead of watch for JS files changes. ----
Seems ok for me. One of the first things we should do in 3.15 is make the build system do that package.js thing that we are supposed to do.
Comment on attachment 285636 [details] [review] build: Make sure we generate path/config.js Attachment 285636 [details] pushed as 1924062 - build: Make sure we generate path/config.js
Does anyone still see this in 3.13.92? https://download.gnome.org/sources/gnome-maps/3.13/gnome-maps-3.13.92.tar.xz