[Ffmpeg-devel] OS/X - undefined symbols due to strip'd shared libs
Steven M. Schultz
sms
Fri Oct 21 07:16:33 CEST 2005
Hi -
On OS/X the shared libs must be installed with "install -s" which
strips all the global symbols. Linking against a stripped library
gives undefined symbols.
I noticed this when linking against libavutil.dylib where
_ff_log2_tab is supposed to reside. Looking at the symbol table
sms% nm /usr/local/lib/libavutil.dylib
/usr/local/lib/libavutil.dylib(single module):
U _frexp
U _ldexp
U _log
"install -s" removed _everything_ except the 3 undefineds.
The attached patch for ./configure creates an 'installstrip' variable
which can be overriden on a per OS basis. The default is set to be
"-s", then in the Darwin) section installstrip="" is done. Later
on "INSTALLSTRIP=$installstrip" is used.
After the patch 'nm /usr/local/lib/libavutil.dylib | grep ff_log2"
yields:
00002d90 S _ff_log2_tab
Much better :)
Cheers,
Steven Schultz
-------------- next part --------------
--- configure.dist 2005-10-20 21:13:25.000000000 -0700
+++ configure 2005-10-20 22:02:12.000000000 -0700
@@ -229,6 +229,7 @@
SLIBSUF=".so"
EXESUF=""
BUILDSUF=""
+installstrip="-s"
amr_nb="no"
amr_wb="no"
amr_nb_fixed="no"
@@ -333,6 +334,7 @@
extralibs=""
darwin="yes"
strip="strip -x"
+installstrip=""
LDFLAGS="-Wl,-dynamic,-search_paths_first"
SLIBSUF=".dylib"
FFSLDFLAGS=-Wl,-bind_at_load
@@ -1286,7 +1288,7 @@
echo "RANLIB=$ranlib" >> config.mak
if test "$dostrip" = "yes" ; then
echo "STRIP=$strip" >> config.mak
-echo "INSTALLSTRIP=-s" >> config.mak
+echo "INSTALLSTRIP=$installstrip" >> config.mak
else
echo "STRIP=echo ignoring strip" >> config.mak
echo "INSTALLSTRIP=" >> config.mak
More information about the ffmpeg-devel
mailing list