GNOME Bugzilla – Bug 644897
gnucash-2.4.4 links against system gnucash, instead of the one it's building
Last modified: 2018-06-29 22:55:02 UTC
As reported downstream at: http://bugs.gentoo.org/show_bug.cgi?id=359033 gnucash-2.4.4 fails to compile with: libtool: link: x86_64-pc-linux-gnu-gcc -Wdeclaration-after-statement -march=native -fomit-frame-pointer -pipe -g -Wall -Wunused -Wmissing-prototypes -Wmissing-declarations -Wno-unused -Wl,-O1 -g -o .libs/gnucash gnucash-bin.o -pthread -pthread -Wl,--export-dynamic -pthread -pthread -Wl,--as-needed ../../src/libqof/qof/.libs/libgnc-qof.so ../../src/core-utils/.libs/libgnc-core-utils.so ../../src/engine/.libs/libgncmod-engine.so ../../src/gnome/.libs/libgnc-gnome.so ../../src/gnome-utils/.libs/libgncmod-gnome-utils.so ../../src/app-utils/.libs/libgncmod-app-utils.so ../../src/gnc-module/.libs/libgnc-module.so -L/usr/lib64 /usr/lib64/libguile.so /usr/lib64/libgmp.so -lcrypt /usr/lib64/libltdl.so /usr/lib64/libgnomeui-2.so /usr/lib64/libSM.so /usr/lib64/libICE.so /usr/lib64/libbonoboui-2.so /usr/lib64/libgnomevfs-2.so /usr/lib64/libgnomecanvas-2.so /usr/lib64/libgnome-2.so /usr/lib64/libpopt.so /usr/lib64/libbonobo-2.so /usr/lib64/libbonobo-activation.so /usr/lib64/libORBit-2.so /usr/lib64/libart_lgpl_2.so /usr/lib64/libgconf-2.so /usr/lib64/libgtk-x11-2.0.so /usr/lib64/libgdk-x11-2.0.so /usr/lib64/libatk-1.0.so /usr/lib64/libgio-2.0.so /usr/lib64/libpangoft2-1.0.so /usr/lib64/libpangocairo-1.0.so /usr/lib64/libgdk_pixbuf-2.0.so /usr/lib64/libcairo.so /usr/lib64/libpng14.so /usr/lib64/libpango-1.0.so /usr/lib64/libfreetype.so /usr/lib64/libfontconfig.so /usr/lib64/libgobject-2.0.so /usr/lib64/libgmodule-2.0.so /usr/lib64/libgthread-2.0.so -lrt /usr/lib64/libglib-2.0.so -lm -pthread -Wl,-rpath -Wl,/usr/lib64/gnucash /usr/lib64/gnucash/libgncmod-report-gnome.so: undefined reference to `gnc_html_export' /usr/lib64/gnucash/libgncmod-report-gnome.so: undefined reference to `gnc_html_copy' /usr/lib64/gnucash/libgncmod-report-gnome.so: undefined reference to `gnc_html_new' collect2: ld returned 1 exit status Because it's trying to link against system gnucash instead of the one you are building now. Gilles thinks it's because not all work submitted in bug 644557 was included in 2.4.4: http://bugs.gentoo.org/show_bug.cgi?id=359033#c2 Thanks a lot for your help
(In reply to comment #0) > Because it's trying to link against system gnucash instead of the one you > are building now. > > Gilles thinks it's because not all work submitted in bug 644557 was included in > 2.4.4: > http://bugs.gentoo.org/show_bug.cgi?id=359033#c2 > > Thanks a lot for your help I did apply the complete patch from bug 644557. There was only one conflict that I had to resolve manually. From the gentoo bug you refer to I understand that the patch was originally against 2.4.0. Perhaps between 2.4.0 and 2.4.3+ there were changes in the Makefile.am files that would require additional patching. Unfortunately I have no experience with gentoo and am not too familiar with the dependency details in autotools either so I don't really know where to start. If you can come up with a patch that fixes this problem for you on gentoo, I'd happily apply it though.
Will wait for Gilles as he knows much more than me about this ;-)
Created attachment 186261 [details] [review] gnucash-2.4.5-link-system-libs.patch Patch to fix this by Gilles Dartiguelongue
Comment on attachment 186261 [details] [review] gnucash-2.4.5-link-system-libs.patch r20566, thanks! (In the commit I've also reordered the libraries.)
*** Bug 647302 has been marked as a duplicate of this bug. ***
Beware that reordering libraries might break it again as the linker would try to resolve symbols with what it has when it gets to the line in question. The more I go through these patches, the more it looks to me like gnucash split libraries shouldn't even be installed on the system (except maybe for the guile bindings but maybe that would be handled by introspection someday).
Also keep in mind that libtool can (and does) reorder libraries on the link line!
(In reply to comment #6) > Beware that reordering libraries might break it again Ok, next time I'll commit your patches without further changes. Feel free to report back if this particular reordering already breaks things for you, in which case I'll also use your original patch instead of mine. Thanks!
Is there still anything to do to fix this bug ? Or can it be closed now ?
We are still suffering this: https://bugs.gentoo.org/show_bug.cgi?id=371264 but don't have a solution for now :(
Resetting the target milestone because we didn't make it and don't know when this issue will be fixed.
I ran in a similar issue: OS: Sabayon (Gentoo based) Gnucash version:2.5.8 svn Version 23424M configure --prefix=$HOME/test ... make check fails with /home/frank/workspace/gnucash-trunk/build/src/backend/xml/test/.libs/test-load-xml2: symbol lookup error: /usr/lib64/libgnc-backend-xml-utils.so.0: undefined symbol: safe_strcmp In the case, I forgot some detail see http://lists.gnucash.org/logs/2013/11/2013-11-21.html#T14:20:30 http://lists.gnucash.org/logs/2013/11/2013-11-22.html#T09:00:45 ff
Looks to be still there for 2.6.1: https://bugs.gentoo.org/show_bug.cgi?id=496620#c5
Reassign version to 2.4.x so that individual 2.4 versions can be retired.
GnuCash bug tracking has moved to a new Bugzilla host. The new URL for this bug is https://bugs.gnucash.org/show_bug.cgi?id=644897. Please continue processing the bug there and please update any external references or bookmarks.