After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 734507 - Parallel build sometimes fails
Parallel build sometimes fails
Status: RESOLVED FIXED
Product: gnome-maps
Classification: Applications
Component: general
3.13.x
Other Linux
: Normal normal
: ---
Assigned To: gnome-maps-maint
gnome-maps-maint
: 735722 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2014-08-08 22:54 UTC by Pascal Terjan
Modified: 2015-08-15 21:01 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Potential fix (886 bytes, patch)
2014-08-08 22:59 UTC, Pascal Terjan
none Details | Review
Build: fix make rules for parallel build (1.21 KB, patch)
2014-08-24 12:01 UTC, Dominique Leuenberger
committed Details | Review
build: Make sure we generate path/config.js (1.62 KB, patch)
2014-09-08 08:12 UTC, Jonas Danielsson
committed Details | Review

Description Pascal Terjan 2014-08-08 22:54:11 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
Comment 1 Pascal Terjan 2014-08-08 22:55:35 UTC
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.
Comment 2 Pascal Terjan 2014-08-08 22:59:31 UTC
Created attachment 282953 [details] [review]
Potential fix
Comment 3 Pascal Terjan 2014-08-08 23:03:42 UTC
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
Comment 4 Dominique Leuenberger 2014-08-24 11:35:01 UTC
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;
Comment 5 Dominique Leuenberger 2014-08-24 12:01:28 UTC
Created attachment 284335 [details] [review]
Build: fix make rules for parallel build
Comment 6 Dominique Leuenberger 2014-08-24 12:06:21 UTC
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)
Comment 7 Jonas Danielsson 2014-08-29 09:08:10 UTC
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'
Comment 8 Jonas Danielsson 2014-09-03 10:50:03 UTC
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.
Comment 9 Jonas Danielsson 2014-09-03 10:50:56 UTC
*** Bug 735722 has been marked as a duplicate of this bug. ***
Comment 10 Damián Nohales 2014-09-05 17:10:53 UTC
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.
Comment 11 Jonas Danielsson 2014-09-08 08:12:55 UTC
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?
Comment 12 Yosef Or Boczko 2014-09-08 11:23:28 UTC
It works for me, thanks!
Comment 13 Damián Nohales 2014-09-09 16:41:54 UTC
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.
Comment 14 Zeeshan Ali 2014-09-09 17:21:00 UTC
Review of attachment 285636 [details] [review]:

Hard to understand the patch due of lack of any details in the log. :(
Comment 15 Damián Nohales 2014-09-11 15:59:50 UTC
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.
----
Comment 16 Jonas Danielsson 2014-09-11 18:36:33 UTC
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 17 Jonas Danielsson 2014-09-14 13:43:21 UTC
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
Comment 18 Jonas Danielsson 2014-09-16 12:53:24 UTC
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