libpng doesn't build as shared library: inter-library deps
Posted: Tue Nov 29, 2016 3:37 pm
I pass the --disable-static option when cross-compling libpng for my OS, but regardless, it build only the static library. During linking, libtool prints the following message:
Why does it think inter-library dependencies are not supported? And why is it passing -no-undefined anyway?
Is there any way I can configure it to know that inter-library dependencies work on my OS and therefore it can build the shared library?
EDIT: I have also edited the "configure" script, specifically the part that decides whether a dynamic linker is available (otherwise it complains that one doesn't exist, and decides that building shared libs is impossible), by adding the following rule:
I set "version_type" to linux because a lot of rules for different operating systems had that.
Do I perhaps have to set something here? Or is it elsewhere?
Code: Select all
/bin/bash ./libtool --tag=CC --mode=link x86_64-glidix-gcc -g -O2 -no-undefined -export-dynamic -version-number 16:21:0 -Wl,--version-script=libpng.vers -o libpng16.la -rpath /usr/lib png.lo pngerror.lo pngget.lo pngmem.lo pngpread.lo pngread.lo pngrio.lo pngrtran.lo pngrutil.lo pngset.lo pngtrans.lo pngwio.lo pngwrite.lo pngwtran.lo pngwutil.lo -lz -lm
*** Warning: inter-library dependencies are not known to be supported.
*** All declared inter-library dependencies are being dropped.
*** The inter-library dependencies that have been dropped here will be
*** automatically added whenever a program is linked with this library
*** or is declared to -dlopen it.
*** Since this library must not contain undefined symbols,
*** because either the platform does not support them or
*** it was explicitly requested with -no-undefined,
*** libtool will only create a static version of it.
Is there any way I can configure it to know that inter-library dependencies work on my OS and therefore it can build the shared library?
EDIT: I have also edited the "configure" script, specifically the part that decides whether a dynamic linker is available (otherwise it complains that one doesn't exist, and decides that building shared libs is impossible), by adding the following rule:
Code: Select all
glidix*)
version_type=linux
need_lib_prefix=no
need_version=no
library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix'
finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
dynamic_linker='Glidix dynld'
shlibpath_var=LD_LIBRARY_PATH
shlibpath_overrides_runpath=yes
hardcode_into_libs=yes
;;
Do I perhaps have to set something here? Or is it elsewhere?