[x264-devel] Failing to load shared library libffms2.so.0 [solved]
Markus Doits
markus.doits at googlemail.com
Thu Jan 28 12:44:31 CET 2010
Alright, the problem was between the chair and the display... running
'ldconfig' solved the issue... thanks for your guesses, though :)
On 01/27/2010 08:24 PM, Markus Doits wrote:
> On 01/26/2010 07:24 PM, Sean McGovern wrote:
>> Is it possible the copy in /usr/local/lib is corrupt or the wrong architecture (i386 vs. x86_64)?
>
> Well, I think it's ok (I'm on ubuntu x86_64), is there any way to test
> it for me?
>
> /usr/local/lib$ file libffms2.so.0.0.0
> libffms2.so.0.0.0: ELF 64-bit LSB shared object, x86-64, version 1
> (SYSV), dynamically linked, stripped
>
>
> Now I see it's a linker-problem, because strace shows x264 not even
> searching for ffms2 in /usr/local/lib:
>
> $ strace `which x264` 2>&1 | grep ffms2
> open("/lib/tls/x86_64/libffms2.so.0", O_RDONLY) = -1 ENOENT (No such
> file or directory)
> open("/lib/tls/libffms2.so.0", O_RDONLY) = -1 ENOENT (No such file or
> directory)
> open("/lib/x86_64/libffms2.so.0", O_RDONLY) = -1 ENOENT (No such file or
> directory)
> open("/lib/libffms2.so.0", O_RDONLY) = -1 ENOENT (No such file or
> directory)
> open("/usr/lib/tls/x86_64/libffms2.so.0", O_RDONLY) = -1 ENOENT (No such
> file or directory)
> open("/usr/lib/tls/libffms2.so.0", O_RDONLY) = -1 ENOENT (No such file
> or directory)
> open("/usr/lib/x86_64/libffms2.so.0", O_RDONLY) = -1 ENOENT (No such
> file or directory)
> open("/usr/lib/libffms2.so.0", O_RDONLY) = -1 ENOENT (No such file or
> directory)
> open("/lib/x86_64-linux-gnu/tls/x86_64/libffms2.so.0", O_RDONLY) = -1
> ENOENT (No such file or directory)
> open("/lib/x86_64-linux-gnu/tls/libffms2.so.0", O_RDONLY) = -1 ENOENT
> (No such file or directory)
> open("/lib/x86_64-linux-gnu/x86_64/libffms2.so.0", O_RDONLY) = -1 ENOENT
> (No such file or directory)
> open("/lib/x86_64-linux-gnu/libffms2.so.0", O_RDONLY) = -1 ENOENT (No
> such file or directory)
> open("/usr/lib/x86_64-linux-gnu/tls/x86_64/libffms2.so.0", O_RDONLY) =
> -1 ENOENT (No such file or directory)
> open("/usr/lib/x86_64-linux-gnu/tls/libffms2.so.0", O_RDONLY) = -1
> ENOENT (No such file or directory)
> open("/usr/lib/x86_64-linux-gnu/x86_64/libffms2.so.0", O_RDONLY) = -1
> ENOENT (No such file or directory)
> open("/usr/lib/x86_64-linux-gnu/libffms2.so.0", O_RDONLY) = -1 ENOENT
> (No such file or directory)
> writev(2, [{"/usr/local/bin/x264", 19}, {": ", 2}, {"error while loading
> shared libra"..., 36}, {": ", 2}, {"libffms2.so.0", 13}, {": ", 2},
> {"cannot open shared object file", 30}, {": ", 2}, {"No such file or
> directory", 25}, {"\n", 1}], 10/usr/local/bin/x264: error while loading
> shared libraries: libffms2.so.0: cannot open shared object file: No such
> file or directory
>
>
> I never had such problems with local libs before, x264 is the first
> thing going crazy. I'll ask on ubuntu-forums about the linker, maybe my
> system is the error, not x264...
>
>
>
>> -----Original Message-----
>> From: Markus Doits <markus.doits at googlemail.com>
>> Date: Tue, 26 Jan 2010 18:34:23
>> To: Mailing list for x264 developers<x264-devel at videolan.org>
>> Subject: [x264-devel] Failing to load shared library libffms2.so.0
>>
>> Hello,
>>
>> I'm having problems with x264-linking (again). I just updated
>> ffmpegsource and noticed they changed their libname to lowercase.
>> Allright, so i patched x264 to use it (since it did not recognize it yet):
>>
>> diff --git a/configure b/configure
>> index 9f04a18..9cd1fe8 100755
>> --- a/configure
>> +++ b/configure
>> @@ -444,14 +444,14 @@ fi
>> if [ "$ffms_input" = "auto" ] ; then
>> ffms_input="no"
>> if [ "$lavf_input" = "yes" ] ; then
>> - if cc_check ffms.h -lFFMS2 "FFMS_DestroyVideoSource(0);" ; then
>> + if cc_check ffms.h -lffms2 "FFMS_DestroyVideoSource(0);" ; then
>> ffms_input="yes"
>> echo "#define FFMS_INPUT" >> config.h
>> - LDFLAGSCLI="$LDFLAGSCLI -lFFMS2"
>> - elif cc_check ffms.h "-lFFMS2 $LAVF_LDFLAGS -lstdc++"
>> "FFMS_DestroyVideoSource(0);" ; then
>> + LDFLAGSCLI="$LDFLAGSCLI -lffms2"
>> + elif cc_check ffms.h "-lffms2 $LAVF_LDFLAGS -lstdc++"
>> "FFMS_DestroyVideoSource(0);" ; then
>> ffms_input="yes"
>> echo "#define FFMS_INPUT" >> config.h
>> - LDFLAGSCLI="-lFFMS2 $LDFLAGSCLI -lstdc++"
>> + LDFLAGSCLI="-lffms2 $LDFLAGSCLI -lstdc++"
>> fi
>> fi
>> fi
>>
>>
>>
>> Configuring works well, linking with "-lffms2" too.
>>
>> gcc -o x264 x264.o [...] -lm -lpthread -Wl,-Bsymbolic -s -L. -lavformat
>> -lswscale -lpostproc -lavcodec -lavutil -lm -lz -lbz2 -lpthread -lffms2
>> -lgpac_static
>>
>>
>>
>> but...:
>>
>>
>>
>> $ x264
>> x264: error while loading shared libraries: libffms2.so.0: cannot open
>> shared object file: No such file or directory
>>
>> $ ldd ./x264
>> linux-vdso.so.1 => (0x00007fffb43ff000)
>> libm.so.6 => /lib/libm.so.6 (0x00007ff04ae30000)
>> libpthread.so.0 => /lib/libpthread.so.0 (0x00007ff04ac14000)
>> libavformat.so.52 => /usr/local/lib/libavformat.so.52
>> (0x00007ff04a958000)
>> libswscale.so.0 => /usr/local/lib/libswscale.so.0
>> (0x00007ff04a726000)
>> libpostproc.so.51 => /usr/local/lib/libpostproc.so.51
>> (0x00007ff04a518000)
>> libavcodec.so.52 => /usr/local/lib/libavcodec.so.52
>> (0x00007ff049934000)
>> libavutil.so.50 => /usr/local/lib/libavutil.so.50
>> (0x00007ff049723000)
>> libz.so.1 => /lib/libz.so.1 (0x00007ff04950c000)
>> libbz2.so.1.0 => /lib/libbz2.so.1.0 (0x00007ff0492fb000)
>> libffms2.so.0 => not found
>> libc.so.6 => /lib/libc.so.6 (0x00007ff048f8c000)
>> /lib64/ld-linux-x86-64.so.2 (0x00007ff04b0b4000)
>> libfaac.so.0 => /usr/lib/libfaac.so.0 (0x00007ff048d7a000)
>> libfaad.so.0 => /usr/lib/libfaad.so.0 (0x00007ff048b3a000)
>> libgsm.so.1 => /usr/lib/libgsm.so.1 (0x00007ff04892c000)
>> libmp3lame.so.0 => /usr/lib/libmp3lame.so.0 (0x00007ff0486b4000)
>> libopenjpeg.so.2 => /usr/lib/libopenjpeg.so.2 (0x00007ff048494000)
>> libschroedinger-1.0.so.0 => /usr/lib/libschroedinger-1.0.so.0
>> (0x00007ff048215000)
>> libspeex.so.1 => /usr/lib/libspeex.so.1 (0x00007ff047ffb000)
>> libtheoraenc.so.1 => /usr/lib/libtheoraenc.so.1 (0x00007ff047dc1000)
>> libtheoradec.so.1 => /usr/lib/libtheoradec.so.1 (0x00007ff047ba7000)
>> libvorbisenc.so.2 => /usr/lib/libvorbisenc.so.2 (0x00007ff0477cd000)
>> libvorbis.so.0 => /usr/lib/libvorbis.so.0 (0x00007ff0475a0000)
>> libxvidcore.so.4 => /usr/lib/libxvidcore.so.4 (0x00007ff0472ae000)
>> liboil-0.3.so.0 => /usr/lib/liboil-0.3.so.0 (0x00007ff04701e000)
>> libogg.so.0 => /usr/lib/libogg.so.0 (0x00007ff046e18000)
>> librt.so.1 => /lib/librt.so.1 (0x00007ff046c10000)
>>
>>
>> $ ls -lh /usr/local/lib/libffms2.so.0*
>> lrwxrwxrwx 1 root root 17 2010-01-26 18:05
>> /usr/local/lib/libffms2.so.0 -> libffms2.so.0.0.0
>> -rwxr-xr-x 1 root root 213K 2010-01-26 18:05
>> /usr/local/lib/libffms2.so.0.0.0
>>
>>
>> What am I missing? Note I did not try to compile x264 with the patches
>> starting with 6662db34 and old ffmpegsource, so might be a problem with
>> these changes... (but had it running with old ffmpegsource and before
>> 6662db34)
>>
>> Regards
>> Markus
>> _______________________________________________
>> x264-devel mailing list
>> x264-devel at videolan.org
>> http://mailman.videolan.org/listinfo/x264-devel
>> _______________________________________________
>> x264-devel mailing list
>> x264-devel at videolan.org
>> http://mailman.videolan.org/listinfo/x264-devel
>
More information about the x264-devel
mailing list