Error during make install

Christian Stimming christian at
Mon Apr 16 08:22:40 EDT 2012


this build error as reported by Kevin points out a bit confusion in  
the src/engine/test/ configuration:

Zitat von Kevin Hale Boyes <kcboyes at>:
> make[5]: Entering directory `/home/hb/src/gnucash-trunk/src/engine/test'
> ...
> libtool: relink: gcc -shared  -fPIC -DPIC  .libs/utest-Split.o
> .libs/gnc-numeric.o  -Wl,--whole-archive
> ../test-core/.libs/libgncmod-test-engine.a -Wl,--no-whole-archive
> -Wl,-rpath -Wl,/opt/gnucash-trunk/lib -Wl,-rpath
> -Wl,/opt/gnucash-trunk/lib/gnucash
> -L/home/hb/src/gnucash-trunk/src/libqof/qof/.libs
> -L/home/hb/src/gnucash-trunk/src/gnc-module/.libs
> -L/home/hb/src/gnucash-trunk/src/core-utils/.libs
> -L/opt/gnucash-trunk/lib -L/lib -ltest-core
> -L/opt/gnucash-trunk/lib/gnucash -lgncmod-engine -lgnc-module
> -lgnc-core-utils -lguile -lgconf-2 -lgnc-qof -lgobject-2.0
> -lgthread-2.0 -lgmodule-2.0 -lrt -lglib-2.0 -lpthread -lm  -pthread
> -Wl,--export-dynamic   -pthread -Wl,-soname -Wl, -o
> .libs/
> /usr/bin/ld: cannot find -ltest-core
> collect2: ld returned 1 exit status
> libtool: install: error: relink `' with the above
> command before installing it
> make[5]: *** [install-test_engineLTLIBRARIES] Error 1
> make[5]: Leaving directory `/home/hb/src/gnucash-trunk/src/engine/test'

Why should the "" library be installed anyway?  
Automake marks this library for installation becauses its name is  
listed in the test_engine_LIBRARIES variable, where the test_engine  
directory is defined as ${GNC_LIBEXECDIR}/${MODULEPATH}/test. However,  
the object in turn must have its library  
requirements listed (which is what I added yesterday) because  
otherwise windows won't build its DLL.

(Remember, windows DLLs are not allowed to contain unresolved  
references, whereas Linux .so libraries are allowed to have them, so  
that's why you don't see the windows build error on Linux unless you  
additionally set up a mingw cross compilers for creating a windows  
DLL. That's why I had to add the correct library flags here.)

Due to the Makefile rules, libutest-Split should be installed, but it  
probably contains references to, which is not being  
installed (only listed in noinst_LTLIBRARIES). There's a contradiction  
here: Either you accidentally listed libutest-Split for installation  
and should instead list it in noinst_LTLIBRARIES, or you need to have  
libtest-core be installed as well. Which one to choose?



More information about the gnucash-devel mailing list