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 751137 - tests: out-of-source, parallel build failure due to $(top_builddir) / $(top_srcdir) and LDFLAGS / LDADD mixups
tests: out-of-source, parallel build failure due to $(top_builddir) / $(top_s...
Status: RESOLVED FIXED
Product: at-spi
Classification: Platform
Component: at-spi2-atk
2.15.x
Other Linux
: Normal normal
: ---
Assigned To: At-spi maintainer(s)
At-spi maintainer(s)
Depends on:
Blocks:
 
 
Reported: 2015-06-18 04:16 UTC by Alexandre Rostovtsev
Modified: 2015-06-19 01:18 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
proposed patch (2.63 KB, patch)
2015-06-18 04:18 UTC, Alexandre Rostovtsev
committed Details | Review

Description Alexandre Rostovtsev 2015-06-18 04:16:00 UTC
top_builddir is for files generated at build time: config.h, *.la, *.o, *.so etc.

top_srcdir is for disted sources: the *.h and *.c files that are in the source tarball.

foo_LDFLAGS is for random flags that automake should directly pass to the linker, for example -Wl,--as-needed. If you abuse LDFLAGS for libtool dependencies, for example by adding bar.la to foo_LDFLAGS, there is no telling whether bar.la will be scheduled for building before foo in the case of parallel make.

foo_LDADD is for libool linking dependencies. Stick your -lwhatever and whatever.la things here.


The new at-spi2-at tests/Makefile confuses all these concepts, and as a result, when performing an out-of-source, parallel build (e.g. make -j8 in a temp subdirectory of source checkout), errors like the following happen:

Making all in tests
make[2]: Entering directory '/home/tetromino/scm/at-spi2-atk/build/tests'
Making all in dummyatk
make[3]: Entering directory '/home/tetromino/scm/at-spi2-atk/build/tests/dummyatk'
  CC       libdummyatk_la-my-atk-action.lo
  CC       libdummyatk_la-my-atk-component.lo
  CC       libdummyatk_la-my-atk-object.lo
  CCLD     libdummyatk.la
make[3]: Leaving directory '/home/tetromino/scm/at-spi2-atk/build/tests/dummyatk'
make[3]: Entering directory '/home/tetromino/scm/at-spi2-atk/build/tests'
  CC       libxmlloader_la-atk-object-xml-loader.lo
make[3]: *** No rule to make target '../../tests/dummyatk/libdummyatk.la', needed by 'libxmlloader.la'.  Stop.
make[3]: Leaving directory '/home/tetromino/scm/at-spi2-atk/build/tests'
Makefile:889: recipe for target 'all-recursive' failed
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory '/home/tetromino/scm/at-spi2-atk/build/tests'
Makefile:506: recipe for target 'all-recursive' failed
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory '/home/tetromino/scm/at-spi2-atk/build'
Makefile:394: recipe for target 'all' failed
make: *** [all] Error 2

(reported downstream at https://bugs.gentoo.org/show_bug.cgi?id=552346)
Comment 1 Alexandre Rostovtsev 2015-06-18 04:18:00 UTC
Created attachment 305514 [details] [review]
proposed patch
Comment 2 Mike Gorse 2015-06-19 01:17:48 UTC
Comment on attachment 305514 [details] [review]
proposed patch

Okay; looks fine. Thanks for the report and patch.