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 644897 - gnucash-2.4.4 links against system gnucash, instead of the one it's building
gnucash-2.4.4 links against system gnucash, instead of the one it's building
Status: RESOLVED OBSOLETE
Product: GnuCash
Classification: Other
Component: Build system
2.4.x
Other Linux
: Normal normal
: ---
Assigned To: Derek Atkins
Christian Stimming
Depends on:
Blocks:
 
 
Reported: 2011-03-16 09:51 UTC by Pacho Ramos
Modified: 2018-06-29 22:55 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
gnucash-2.4.5-link-system-libs.patch (578 bytes, patch)
2011-04-19 09:11 UTC, Pacho Ramos
committed Details | Review

Description Pacho Ramos 2011-03-16 09:51:50 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
Comment 1 Geert Janssens 2011-03-16 10:31:38 UTC
(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.
Comment 2 Pacho Ramos 2011-03-16 10:38:59 UTC
Will wait for Gilles as he knows much more than me about this ;-)
Comment 3 Pacho Ramos 2011-04-19 09:11:02 UTC
Created attachment 186261 [details] [review]
gnucash-2.4.5-link-system-libs.patch

Patch to fix this by Gilles Dartiguelongue
Comment 4 Christian Stimming 2011-04-19 09:23:04 UTC
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.)
Comment 5 Christian Stimming 2011-04-19 09:38:07 UTC
*** Bug 647302 has been marked as a duplicate of this bug. ***
Comment 6 Gilles Dartiguelongue 2011-04-19 16:03:16 UTC
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).
Comment 7 Derek Atkins 2011-04-19 16:13:36 UTC
Also keep in mind that libtool can (and does) reorder libraries on the link line!
Comment 8 Christian Stimming 2011-04-19 17:40:07 UTC
(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!
Comment 9 Geert Janssens 2011-08-23 09:36:39 UTC
Is there still anything to do to fix this bug ? Or can it be closed now ?
Comment 10 Pacho Ramos 2011-08-27 22:26:10 UTC
We are still suffering this:
https://bugs.gentoo.org/show_bug.cgi?id=371264

but don't have a solution for now :(
Comment 11 Geert Janssens 2011-11-07 15:00:27 UTC
Resetting the target milestone because we didn't make it and don't know when this issue will be fixed.
Comment 12 Frank H. Ellenberger 2013-11-22 21:58:21 UTC
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
Comment 13 Pacho Ramos 2014-02-09 11:10:00 UTC
Looks to be still there for 2.6.1:
https://bugs.gentoo.org/show_bug.cgi?id=496620#c5
Comment 14 John Ralls 2017-09-24 22:16:52 UTC
Reassign version to 2.4.x so that individual 2.4 versions can be retired.
Comment 15 John Ralls 2018-06-29 22:55:02 UTC
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.