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 644896 - gnucash-2.4.4: parallel "make install" fails from time to time
gnucash-2.4.4: parallel "make install" fails from time to time
Status: RESOLVED NOTGNOME
Product: GnuCash
Classification: Other
Component: Build system
2.4.x
Other Linux
: Low normal
: ---
Assigned To: Derek Atkins
gnucash-core-maint
Depends on:
Blocks:
 
 
Reported: 2011-03-16 09:46 UTC by Pacho Ramos
Modified: 2018-06-29 22:55 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
build.log.zip (61.47 KB, application/zip)
2011-03-16 09:47 UTC, Pacho Ramos
Details

Description Pacho Ramos 2011-03-16 09:46:51 UTC
As reported in:
http://bugs.gentoo.org/show_bug.cgi?id=359123

and also experienced by me, from time to time "make install" fails when using MAKEOPTS > -j1 with this error:
libtool: install: (cd /var/tmp/portage/app-office/gnucash-2.4.4/work/gnucash-2.4.4/src/backend/xml; /bin/sh /var/tmp/portage/app-office/gnucash-2.4.4/work/gnucash-2.4.4/libtool  --tag CC --mode=relink x86_64-pc-linux-gnu-gcc -Wdeclaration-after-statement -march=core2 -pipe -g -Wall -Wunused -Wmissing-prototypes -Wmissing-declarations -Wno-unused -Wl,-O1 -Wl,--as-needed -g -o libgnc-backend-xml-utils.la -rpath /usr/lib64 gnc-account-xml-v2.lo gnc-address-xml-v2.lo gnc-bill-term-xml-v2.lo gnc-book-xml-v2.lo gnc-budget-xml-v2.lo gnc-commodity-xml-v2.lo gnc-customer-xml-v2.lo gnc-employee-xml-v2.lo gnc-entry-xml-v2.lo gnc-freqspec-xml-v2.lo gnc-invoice-xml-v2.lo gnc-job-xml-v2.lo gnc-lot-xml-v2.lo gnc-order-xml-v2.lo gnc-owner-xml-v2.lo gnc-pricedb-xml-v2.lo gnc-recurrence-xml-v2.lo gnc-schedxaction-xml-v2.lo gnc-tax-table-xml-v2.lo gnc-transaction-xml-v2.lo gnc-vendor-xml-v2.lo io-example-account.lo io-gncxml-gen.lo io-gncxml-v1.lo io-gncxml-v2.lo io-utils.lo sixtp-dom-generators.lo sixtp-dom-parsers.lo sixtp-stack.lo sixtp-to-dom-parser.lo sixtp-utils.lo sixtp.lo -pthread -Wl,--export-dynamic -lgobject-2.0 -lgthread-2.0 -lgmodule-2.0 -lrt -lglib-2.0 -lgconf-2 -lglib-2.0 -lxml2 -lz ../../../src/engine/libgncmod-engine.la ../../../src/core-utils/libgnc-core-utils.la ../../../src/libqof/qof/libgnc-qof.la -lm -lm -inst-prefix-dir /var/tmp/portage/app-office/gnucash-2.4.4/image/)
libtool: install: (cd /var/tmp/portage/app-office/gnucash-2.4.4/work/gnucash-2.4.4/src/backend/xml; /bin/sh /var/tmp/portage/app-office/gnucash-2.4.4/work/gnucash-2.4.4/libtool  --tag CC --mode=relink x86_64-pc-linux-gnu-gcc -Wdeclaration-after-statement -march=core2 -pipe -g -Wall -Wunused -Wmissing-prototypes -Wmissing-declarations -Wno-unused -module -avoid-version -Wl,-O1 -Wl,--as-needed -g -o libgncmod-backend-xml.la -rpath /usr/lib64/gnucash gnc-backend-xml.lo -pthread -Wl,--export-dynamic -lgobject-2.0 -lgthread-2.0 -lgmodule-2.0 -lrt -lglib-2.0 -lgconf-2 -lglib-2.0 -lxml2 -lz ../../../src/engine/libgncmod-engine.la ../../../src/core-utils/libgnc-core-utils.la libgnc-backend-xml-utils.la ../../../src/libqof/qof/libgnc-qof.la -lm -lm -inst-prefix-dir /var/tmp/portage/app-office/gnucash-2.4.4/image/)
libtool: relink: x86_64-pc-linux-gnu-gcc -shared  .libs/gnc-backend-xml.o   -Wl,-rpath -Wl,/usr/lib64/gnucash -Wl,--as-needed -L/var/tmp/portage/app-office/gnucash-2.4.4/image//usr/lib64 -L/usr/lib64 -lgobject-2.0 -lgthread-2.0 -lgmodule-2.0 -lrt -lgconf-2 -lglib-2.0 -lxml2 -lz -L/var/tmp/portage/app-office/gnucash-2.4.4/image//usr/lib64/gnucash -L/usr/lib64/gnucash -lgncmod-engine -lgnc-core-utils -lgnc-backend-xml-utils -lgnc-qof -lm  -march=core2 -Wl,-O1 -pthread -Wl,--export-dynamic   -pthread -Wl,-soname -Wl,libgncmod-backend-xml.so -o .libs/libgncmod-backend-xml.so
libtool: relink: x86_64-pc-linux-gnu-gcc -shared  .libs/gnc-account-xml-v2.o .libs/gnc-address-xml-v2.o .libs/gnc-bill-term-xml-v2.o .libs/gnc-book-xml-v2.o .libs/gnc-budget-xml-v2.o .libs/gnc-commodity-xml-v2.o .libs/gnc-customer-xml-v2.o .libs/gnc-employee-xml-v2.o .libs/gnc-entry-xml-v2.o .libs/gnc-freqspec-xml-v2.o .libs/gnc-invoice-xml-v2.o .libs/gnc-job-xml-v2.o .libs/gnc-lot-xml-v2.o .libs/gnc-order-xml-v2.o .libs/gnc-owner-xml-v2.o .libs/gnc-pricedb-xml-v2.o .libs/gnc-recurrence-xml-v2.o .libs/gnc-schedxaction-xml-v2.o .libs/gnc-tax-table-xml-v2.o .libs/gnc-transaction-xml-v2.o .libs/gnc-vendor-xml-v2.o .libs/io-example-account.o .libs/io-gncxml-gen.o .libs/io-gncxml-v1.o .libs/io-gncxml-v2.o .libs/io-utils.o .libs/sixtp-dom-generators.o .libs/sixtp-dom-parsers.o .libs/sixtp-stack.o .libs/sixtp-to-dom-parser.o .libs/sixtp-utils.o .libs/sixtp.o   -Wl,-rpath -Wl,/usr/lib64/gnucash -Wl,--as-needed -L/var/tmp/portage/app-office/gnucash-2.4.4/image//usr/lib64 -L/usr/lib64 -lgobject-2.0 -lgthread-2.0 -lgmodule-2.0 -lrt -lgconf-2 -lglib-2.0 -lxml2 -lz -L/var/tmp/portage/app-office/gnucash-2.4.4/image//usr/lib64/gnucash -L/usr/lib64/gnucash -lgncmod-engine -lgnc-core-utils -lgnc-qof -lm  -march=core2 -Wl,-O1 -pthread -Wl,--export-dynamic   -pthread -Wl,-soname -Wl,libgnc-backend-xml-utils.so.0 -o .libs/libgnc-backend-xml-utils.so.0.0.0
/usr/lib/gcc/x86_64-pc-linux-gnu/4.4.4/../../../../x86_64-pc-linux-gnu/bin/ld: cannot find -lgnc-backend-xml-utils
collect2: ld returned 1 exit status
libtool: install: error: relink `libgncmod-backend-xml.la' with the above command before installing it
make[5]: *** [install-pkglibLTLIBRARIES] Error 1
make[5]: *** Waiting for unfinished jobs....
libtool: install: /usr/bin/install -c .libs/libgnc-backend-xml-utils.so.0.0.0T /var/tmp/portage/app-office/gnucash-2.4.4/image//usr/lib64/libgnc-backend-xml-utils.so.0.0.0
libtool: install: (cd /var/tmp/portage/app-office/gnucash-2.4.4/image//usr/lib64 && { ln -s -f libgnc-backend-xml-utils.so.0.0.0 libgnc-backend-xml-utils.so.0 || { rm -f libgnc-backend-xml-utils.so.0 && ln -s libgnc-backend-xml-utils.so.0.0.0 libgnc-backend-xml-utils.so.0; }; })
libtool: install: (cd /var/tmp/portage/app-office/gnucash-2.4.4/image//usr/lib64 && { ln -s -f libgnc-backend-xml-utils.so.0.0.0 libgnc-backend-xml-utils.so || { rm -f libgnc-backend-xml-utils.so && ln -s libgnc-backend-xml-utils.so.0.0.0 libgnc-backend-xml-utils.so; }; })
libtool: install: /usr/bin/install -c .libs/libgnc-backend-xml-utils.lai /var/tmp/portage/app-office/gnucash-2.4.4/image//usr/lib64/libgnc-backend-xml-utils.la
libtool: install: warning: remember to run `libtool --finish /usr/lib64'
make[5]: Leaving directory `/var/tmp/portage/app-office/gnucash-2.4.4/work/gnucash-2.4.4/src/backend/xml'
make[4]: *** [install-am] Error 2
make[4]: Leaving directory `/var/tmp/portage/app-office/gnucash-2.4.4/work/gnucash-2.4.4/src/backend/xml'
make[3]: *** [install-recursive] Error 1
make[3]: Leaving directory `/var/tmp/portage/app-office/gnucash-2.4.4/work/gnucash-2.4.4/src/backend/xml'
make[2]: *** [install-recursive] Error 1
make[2]: Leaving directory `/var/tmp/portage/app-office/gnucash-2.4.4/work/gnucash-2.4.4/src/backend'
make[1]: *** [install-recursive] Error 1
make[1]: Leaving directory `/var/tmp/portage/app-office/gnucash-2.4.4/work/gnucash-2.4.4/src'
make: *** [install-recursive] Error 1

Thanks for your help
Comment 1 Pacho Ramos 2011-03-16 09:47:38 UTC
Created attachment 183503 [details]
build.log.zip
Comment 2 Christian Stimming 2011-03-16 11:04:06 UTC
I would never recommend "make install" with -j larger than one, because I don't know any precautions that ensure to keep the correct inter-dependencies while installing.

Does automake explicitly allow -j with the install target? I doubt it, but feel free to give us some pointers where the necessary dependency rules in the makefiles are explained.
Comment 3 Pacho Ramos 2011-03-18 10:47:05 UTC
I have asked in upstream and looks like it is supported:
http://lists.gnu.org/archive/html/libtool/2011-03/msg00002.html

But, as you suspected, there is a bug in libtool:
http://lists.gnu.org/archive/html/libtool/2011-03/msg00003.html

A workaround is commented here:
http://lists.gnu.org/archive/html/libtool/2011-03/msg00004.html
Comment 4 Christian Stimming 2011-03-21 09:37:30 UTC
The workaround says:
> It seems that make is running install-libLTLIBRARIES and
> install-pkglibLTLIBRARIES in parallel. Each one of these these rules
> installs the libraries serially in a loop. However, if libtool is
> relinking the libraries, it really needs to wait until the
> prerequisite libraries from _other_ rules are installed.
>
> Yes, it's a bug in Automake/Libtool, but the workaround isn't quite
> correct: you'd need something like
> 
> install-pkglibLTLIBRARIES = install-pkglibLTLIBRARIES
> $(install-pkglibLTLIBRARIES): install-libLTLIBRARIES

@Pacho: Should those two lines go into the Makefile.am?
Comment 5 Pacho Ramos 2011-03-21 09:50:41 UTC
As read in:
http://lists.gnu.org/archive/html/libtool/2011-03/msg00008.html

Looks like this should be added to the generated Makefile as the bug looks to be in Makefile generation, the problem is that I don't know how this could be done in a cleaner way :-(
Comment 6 Derek Atkins 2011-03-21 12:01:10 UTC
Well, we could just say "we don't support make -j" and move on.  ;)
Comment 7 Gilles Dartiguelongue 2011-03-21 13:12:28 UTC
You open the doors for hiding more bugs like this. Just say there is a known bug in libtool and close this when it is solved there. At least other distros can find this bug report and know what to do accordingly.
Comment 8 Christian Stimming 2011-03-21 13:17:26 UTC
Just joking. If someone proposes a patch for our Makefile.am (which looks somewhat sane) we will of course apply them over here. No problem. I just don't know what the libtool people expect from our Makefile.am.
Comment 9 Pacho Ramos 2011-03-22 11:26:57 UTC
This is the upstream bug (not sure how to subscribe to it :-( )
http://debbugs.gnu.org/cgi/bugreport.cgi?bug=7328
Comment 10 Pacho Ramos 2011-03-22 21:19:36 UTC
Possible workaround until bug is fixed:
http://www.mail-archive.com/libtool@gnu.org/msg12653.html
Comment 11 Christian Stimming 2011-03-26 09:31:36 UTC
This is the "possible workaround":

> What they can do is split the libgnc-backend-xml-utils.la into it's
> own separate subdirectory so that the make rules don't get mixed up
> with the libgncmod-backend-xml.la ones. Kludgy, but it would work.

I'm afraid we don't feel like re-organizing our directory structure just because of this libtool/automake issue. I guess this qualifies this bug as WONTFIX or NOTGNOME and we simply confirm "-j" is not supported during "make install" for this package. Sorry for that.
Comment 12 Geert Janssens 2014-05-20 09:04:53 UTC
I looked at this for some time but didn't find a way to cleanly insert the workaround mentioned in comment 4 into the generated Makefile. Adding it to Makefile.am causes automake to fail.

I agree with Christian that re-organizing our directory structure at this point is more work than it benefits so I'll close this bug now.
Comment 13 John Ralls 2017-09-24 22:43:09 UTC
Reassign version to 2.4.x so that individual 2.4 versions can be retired.
Comment 14 John Ralls 2018-06-29 22:55:00 UTC
GnuCash bug tracking has moved to a new Bugzilla host. This bug has been copied to https://bugs.gnucash.org/show_bug.cgi?id=644896. Please update any external references or bookmarks.