When I am running make distcheck, one library (lib2 in this example) is not being installed because it requires lib1.
Is there any way to mandate the order of library installation?
Makefile.am:
lib_LTLIBRARIES = libTwo.la libOne.la
libOne_la_SOURCES = lib/one/example.cpp \
lib/one/example.h
libTwo_la_SOURCES = lib/two/Example2.cpp \
lib/two/Example2.h
libTwo_la_CPPFLAGS = -I$(srcdir)/lib/one
libTwo_la_LIBADD = libOne.la
I am using:
*Edit: * Here is what I am seeing on the make distcheck output.
/usr/bin/ld: cannot find -lOne
collect2: ld returned 1 exit status
libtool: install: error: relink `libTwo.la' with the above command before installing it
/bin/sh ./libtool --mode=install /usr/bin/install -c 'libOne.la' '/tmp/xx-x-yy-21346 /home/foo/commonlib-1.0/_inst/lib/libOne.la'
Try exchanging:
lib_LTLIBRARIES = libTwo.la libOne.la
for:
lib_LTLIBRARIES = libOne.la libTwo.la
IIRC, the order in lib_LTLIBRARIES matters at install time.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With