linking with static lib possibly broken
Brought to you by:
gyunaev
There is no information on dependant libs when using the static lib which can result in undefined symbols.
Example: megaglest using static lib of libircclient when libircclient was compiled WITH openssl support can lead to things like this:
/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.3/../../../../lib64/libircclient.a(libircclient.o): In function `ssl_init':
(.text+0x288): undefined reference to `SSL_new'
cause nothing is pulling in "-lssl"
solutions:
1. provide a .pc (pkg-config) file
2. provide a .la file (libtool archive)
Doing both is the best way imo, cause it may works for a wider range of build systems.
The problem I've had with the static lib (.a file) is that it doesn't get installed when
make installis run.using
./configure --prefix=$PWD/install-test && make installI'm on Debian 9, building with gcc-6 as a non-root user.
Also, if I add --libdir=$PWD/install-test/lib to the configure options, I get this output.