Perhaps there is something really basic I don't know, but I'm facing a very weird behaviour: after my libtool shared library was properly built, it is deleted immediately after.
Basically, this Makefile.am:
ACLOCAL_AMFLAGS = -I m4 --install
lib_LTLIBRARIES =
if BUILD_WIRINGPI_STUB
lib_LTLIBRARIES += libwiringPiStub.la
# headers to be installed
include_HEADERS = \
src/wiringPi-stub/wiringPi.h
endif
LIBTOOL_DEPS = @LIBTOOL_DEPS@
# libwiringPiStub.{so,a}
libwiringPiStub_la_LDFLAGS = -rpath '$(libdir)' -version-info $(WIRINGPI_STUB_SOVERSION)
libwiringPiStub_la_SOURCES = src/wiringPi-stub/wiringPi.c
pkgconfigdir = $(libdir)/pkgconfig
pkgconfig_DATA = src/wiringPi-stub/libwiringPiStub.pc
produces this build history, which looks ok:
% make libwiringPiStub.la
depbase=`echo src/wiringPi-stub/wiringPi.lo | sed 's|[^/]*$|.deps/&|;s|\.lo$||'`;\
/bin/sh ./libtool --tag=CC --mode=compile gcc -DHAVE_CONFIG_H -I. -g -O2 -MT src/wiringPi-stub/wiringPi.lo -MD -MP -MF $depbase.Tpo -c -o src/wiringPi-stub/wiringPi.lo src/wiringPi-stub/wiringPi.c &&\
mv -f $depbase.Tpo $depbase.Plo
libtool: compile: gcc -DHAVE_CONFIG_H -I. -g -O2 -MT src/wiringPi-stub/wiringPi.lo -MD -MP -MF src/wiringPi-stub/.deps/wiringPi.Tpo -c src/wiringPi-stub/wiringPi.c -fno-common -DPIC -o src/wiringPi-stub/.libs/wiringPi.o
/bin/sh ./libtool --tag=CC --mode=link gcc -g -O2 -rpath '/usr/local/lib' -version-info 1:0:0 -o libwiringPiStub.la src/wiringPi-stub/wiringPi.lo -lpthread -lm
libtool: link: gcc -dynamiclib -Wl,-undefined -Wl,dynamic_lookup -o .libs/libwiringPiStub.1.dylib src/wiringPi-stub/.libs/wiringPi.o -lpthread -lm -g -O2 -install_name /usr/local/lib/libwiringPiStub.1.dylib -compatibility_version 2 -current_version 2.0 -Wl,-single_module
libtool: link: (cd ".libs" && rm -f "libwiringPiStub.dylib" && ln -s "libwiringPiStub.1.dylib" "libwiringPiStub.dylib")
libtool: link: ( cd ".libs" && rm -f "libwiringPiStub.la" && ln -s "../libwiringPiStub.la" "libwiringPiStub.la" )
In facts, nothing is installed in my $(libdir) with make install, either are the header file in the include dir.
This is the output of the make install execution:
% make install
cd . && /bin/sh ./config.status config.h
config.status: creating config.h
config.status: config.h is unchanged
/usr/local/bin/gmkdir -p '/usr/local/lib/pkgconfig'
/usr/local/bin/ginstall -c -m 644 src/wiringPi-stub/libwiringPiStub.pc '/usr/local/lib/pkgconfig'
In fact, only the .pc file is actually moved in position. What can I try to resolve this?
configurethe project, then the defaults should be/usr/local/liband/usr/local/include, repsectively. - John Bollingermake installcommand complete successfully? Can you present its output? - John Bollingermake install, as @JohnBollinger suggestion was unfortunately not successful - Gabriele BBUILD_WIRINGPI_STUBconditional is evaluating to false when youconfigurethe project. That would not prevent you from building targetlibwiringPiStub.laby explicitly specifying its name tomake, as your example shows, but it and its header would not be included in installs. In that case, you should also see that the library does not get built unless you do specifically name it -- that is, it would not be built by justmakeormake all. - John Bollinger