GNOME Bugzilla – Bug 775634
gnucash-2.6.14 tries to build using system libs from previous gnucash version when --libdir=/usr/lib64 option is passed
Last modified: 2018-06-29 23:52:29 UTC
We are suffering this build failure when trying to build 2.6.14 on a system with an already installed gnucash-2.6.13 (built against guile-1.8... while I try to build new 2.6.14 against guile-2). The error is: libgncmod-ledger-core.so: undefined reference to `gnc_recn_cell_set_read_only' $ ./configure --libdir=/usr/lib64 --disable-dbi && make [...] Making all in gtkbuilder make[5]: Entering directory '/home/pacho/Descargas/gnucash-2.6.14/src/plugins/bi_import/gtkbuilder' make[5]: Nothing to be done for 'all'. make[5]: Leaving directory '/home/pacho/Descargas/gnucash-2.6.14/src/plugins/bi_import/gtkbuilder' Making all in . make[5]: Entering directory '/home/pacho/Descargas/gnucash-2.6.14/src/plugins/bi_import' /bin/sh ../../../libtool --tag=CC --mode=link gcc -Wdeclaration-after-statement -Wno-pointer-sign -g -O2 -std=gnu99 -Wall -Wunused -Wmissing-prototypes -Wmissing-declarations -Wno-unused -avoid-version -o libgncmod-bi_import.la -rpath /usr/lib64/gnucash gnc-plugin-bi-import.lo gncmod-bi-import.lo dialog-bi-import-gui.lo dialog-bi-import-helper.lo dialog-bi-import.lo ../../../src/business/business-gnome/libgncmod-business-gnome.la ../../../src/gnome-utils/libgncmod-gnome-utils.la ../../../src/app-utils/libgncmod-app-utils.la ../../../src/engine/libgncmod-engine.la ../../../src/core-utils/libgnc-core-utils.la ../../../src/gnc-module/libgnc-module.la ../../../src/libqof/qof/libgnc-qof.la ../../../lib/libc/libc-missing.la ../../../src/libqof/qof/libgnc-qof.la -lgio-2.0 -lgthread-2.0 -pthread -lgobject-2.0 -Wl,--export-dynamic -lgmodule-2.0 -pthread -lglib-2.0 -lm libtool: link: rm -fr .libs/libgncmod-bi_import.la .libs/libgncmod-bi_import.lai .libs/libgncmod-bi_import.so libtool: link: gcc -shared -fPIC -DPIC .libs/gnc-plugin-bi-import.o .libs/gncmod-bi-import.o .libs/dialog-bi-import-gui.o .libs/dialog-bi-import-helper.o .libs/dialog-bi-import.o -Wl,--whole-archive ../../../lib/libc/.libs/libc-missing.a -Wl,--no-whole-archive -Wl,-rpath -Wl,/home/pacho/Descargas/gnucash-2.6.14/src/business/business-gnome/.libs -Wl,-rpath -Wl,/home/pacho/Descargas/gnucash-2.6.14/src/gnome-utils/.libs -Wl,-rpath -Wl,/home/pacho/Descargas/gnucash-2.6.14/src/app-utils/.libs -Wl,-rpath -Wl,/home/pacho/Descargas/gnucash-2.6.14/src/engine/.libs -Wl,-rpath -Wl,/home/pacho/Descargas/gnucash-2.6.14/src/core-utils/.libs -Wl,-rpath -Wl,/home/pacho/Descargas/gnucash-2.6.14/src/gnc-module/.libs -Wl,-rpath -Wl,/home/pacho/Descargas/gnucash-2.6.14/src/libqof/qof/.libs -Wl,-rpath -Wl,/usr/lib64/gnucash ../../../src/business/business-gnome/.libs/libgncmod-business-gnome.so ../../../src/gnome-utils/.libs/libgncmod-gnome-utils.so ../../../src/app-utils/.libs/libgncmod-app-utils.so ../../../src/engine/.libs/libgncmod-engine.so ../../../src/core-utils/.libs/libgnc-core-utils.so ../../../src/gnc-module/.libs/libgnc-module.so -lpthread ../../../src/libqof/qof/.libs/libgnc-qof.so -lgio-2.0 -lgthread-2.0 -lgobject-2.0 -lgmodule-2.0 -lglib-2.0 -lm -O2 -pthread -Wl,--export-dynamic -pthread -pthread -Wl,-soname -Wl,libgncmod-bi_import.so -o .libs/libgncmod-bi_import.so libtool: link: ( cd ".libs" && rm -f "libgncmod-bi_import.la" && ln -s "../libgncmod-bi_import.la" "libgncmod-bi_import.la" ) make[5]: Leaving directory '/home/pacho/Descargas/gnucash-2.6.14/src/plugins/bi_import' make[4]: Leaving directory '/home/pacho/Descargas/gnucash-2.6.14/src/plugins/bi_import' make[4]: Entering directory '/home/pacho/Descargas/gnucash-2.6.14/src/plugins' make[4]: Nothing to be done for 'all-am'. make[4]: Leaving directory '/home/pacho/Descargas/gnucash-2.6.14/src/plugins' make[3]: Leaving directory '/home/pacho/Descargas/gnucash-2.6.14/src/plugins' Making all in bin make[3]: Entering directory '/home/pacho/Descargas/gnucash-2.6.14/src/bin' Making all in . make[4]: Entering directory '/home/pacho/Descargas/gnucash-2.6.14/src/bin' /bin/sh ../../libtool --tag=CC --mode=link gcc -Wdeclaration-after-statement -Wno-pointer-sign -g -O2 -std=gnu99 -Wall -Wunused -Wmissing-prototypes -Wmissing-declarations -Wno-unused -o gnucash gnucash-bin.o ../../src/register/ledger-core/libgncmod-ledger-core.la ../../src/report/report-gnome/libgncmod-report-gnome.la ../../src/gnome/libgnc-gnome.la ../../src/gnome-utils/libgncmod-gnome-utils.la ../../src/app-utils/libgncmod-app-utils.la ../../src/engine/libgncmod-engine.la ../../src/gnc-module/libgnc-module.la ../../src/core-utils/libgnc-core-utils.la ../../src/libqof/qof/libgnc-qof.la ../../src/report/report-system/libgncmod-report-system.la -lguile-2.0 -lgc -lgio-2.0 -lgthread-2.0 -pthread -lgobject-2.0 -Wl,--export-dynamic -lgmodule-2.0 -pthread -lglib-2.0 -lgtk-x11-2.0 -lgdk-x11-2.0 -lpangocairo-1.0 -latk-1.0 -lcairo -lgdk_pixbuf-2.0 -lgio-2.0 -lpangoft2-1.0 -lpango-1.0 -lgobject-2.0 -lglib-2.0 -lfontconfig -lfreetype -lm libtool: link: gcc -Wdeclaration-after-statement -Wno-pointer-sign -g -O2 -std=gnu99 -Wall -Wunused -Wmissing-prototypes -Wmissing-declarations -Wno-unused -o .libs/gnucash gnucash-bin.o -pthread -Wl,--export-dynamic -pthread ../../src/register/ledger-core/.libs/libgncmod-ledger-core.so ../../src/report/report-gnome/.libs/libgncmod-report-gnome.so ../../src/gnome/.libs/libgnc-gnome.so ../../src/gnome-utils/.libs/libgncmod-gnome-utils.so ../../src/app-utils/.libs/libgncmod-app-utils.so ../../src/engine/.libs/libgncmod-engine.so ../../src/gnc-module/.libs/libgnc-module.so ../../src/core-utils/.libs/libgnc-core-utils.so ../../src/libqof/qof/.libs/libgnc-qof.so ../../src/report/report-system/.libs/libgncmod-report-system.so /usr/lib64/libguile-2.0.so -lgc -lgthread-2.0 -lgmodule-2.0 -lgtk-x11-2.0 -lgdk-x11-2.0 -lpangocairo-1.0 -latk-1.0 -lcairo -lgdk_pixbuf-2.0 -lgio-2.0 -lpangoft2-1.0 -lpango-1.0 -lgobject-2.0 -lglib-2.0 -lfontconfig -lfreetype -lm -pthread -Wl,-rpath -Wl,/usr/lib64/gnucash ../../src/register/ledger-core/.libs/libgncmod-ledger-core.so: undefined reference to `gnc_recn_cell_set_read_only' collect2: error: ld returned 1 exit status Makefile:687: recipe for target 'gnucash' failed make[4]: *** [gnucash] Error 1 make[4]: Leaving directory '/home/pacho/Descargas/gnucash-2.6.14/src/bin' Makefile:788: recipe for target 'all-recursive' failed make[3]: *** [all-recursive] Error 1 make[3]: Leaving directory '/home/pacho/Descargas/gnucash-2.6.14/src/bin' Makefile:551: recipe for target 'all-recursive' failed make[2]: *** [all-recursive] Error 1 make[2]: Leaving directory '/home/pacho/Descargas/gnucash-2.6.14/src' Makefile:785: recipe for target 'all-recursive' failed make[1]: *** [all-recursive] Error 1 make[1]: Leaving directory '/home/pacho/Descargas/gnucash-2.6.14' Makefile:638: recipe for target 'all' failed make: *** [all] Error 2 Thanks for your help
Running autoreconf and getting the libtool files regenerated solves this :/
This has always been the case AFAIK. The linker links with the first instance of a library that it finds, and that tends to be the installed one rather than the one in the build directory.
GnuCash bug tracking has moved to a new Bugzilla host. This bug has been copied to https://bugs.gnucash.org/show_bug.cgi?id=775634. Please update any external references or bookmarks.