GNOME Bugzilla – Bug 644557
gnucash-2.4.3: downstream patches to fix tests linking
Last modified: 2018-06-29 22:54:44 UTC
Created attachment 183208 [details] [review] gnucash-2.4.3-fix-tests-linking.patch We are applying attached patches to fix linking on some tests, please commit them if possible. Thanks
Created attachment 183209 [details] [review] gnucash-2.4.3-fix-tests-linking2.patch
Thanks for these patches. While looking at them, I noticed you have only added the libqof include in two Makefiles.am files. In all other cases you just seem to be moving library includes up and down. I'm trying to learn here: are these line swappings required to get the tests to run (I mean is the include order effectively important) or is this mainly done for consistency ? Both are valid reasons to apply the patches, but in the latter I would have preferred to have one patch for the fixes and one for the cleanups. That would show more clearly why the changes were made to others reviewing the code (now or in the future). Of course, if the tests fail without swapping the lines around, you can disregard this suggestion.
Hi Geert, I'm the original author of those changes applied since we tried to package gnucash 2.4 for gentoo. The line swapping part of the patch is here to solve an insidious problem mainly due to libqof being embedded into gnucash. The problem is that if the order is not right, when you have gnucash-2.2.9 on your system (for example), some la files corresponding to intermediate libraries to rely on internal copy of libqof will actually pull the copy of the old gnucash. This is an old "problem" of libtool that it is able to pick libs from your system even you'd actually would like it to pick the one in your build tree. Changing the order ensures that libtools find the copy in the build tree before trying other paths. This is both important for actual linking so you get the proper symbols (the one that didn't existed in the old gnucash release) and for tests as they would fail due to not being able to find the proper symbols (if they use the new ones obviously). For the added dependencies on libqof, iirc, it was added to targets to included qof headers in their code but didn't have the LDADD corresponding part.
Ok, thank you for this clarification. I have committed your patches r20401. The first patch didn't apply cleanly because one makefile contained newer changes. So I had to correct your patch. Thank you for sending them in!
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. This bug has been copied to https://bugs.gnucash.org/show_bug.cgi?id=644557. Please update any external references or bookmarks.