[FFmpeg-user] ffmpeg built static, yet "libopenjp2.so.7: cannot open shared object file"
Reindl Harald
h.reindl at thelounge.net
Mon Aug 14 18:19:36 EEST 2017
Am 14.08.2017 um 16:56 schrieb Carl Eugen Hoyos:
> 2017-08-14 16:49 GMT+02:00 Reindl Harald <h.reindl at thelounge.net>:
>>
>>
>> Am 14.08.2017 um 16:41 schrieb Carl Eugen Hoyos:
>>>
>>> 2017-08-14 13:51 GMT+02:00 Carl Eugen Hoyos <ceffmpeg at gmail.com>:
>>>>
>>>> 2017-08-14 11:04 GMT+02:00 Reindl Harald <h.reindl at thelounge.net>:
>>>>>
>>>>> frankly without -ffat-lto-objects libx264 and/or the comibnation of
>>>>> static
>>>>> libx264 and static ffmpeg just don't build
>>>>
>>>> The option should not be needed if your toolchain correctly supports
>>>> lto (and it is not needed here). Is it possible that you have to add it
>>>> because your build is not really an lto build (since something in your
>>>> toolchain - like ar - destroys the lto information but thanks to this
>>>> option,
>>>> compilation succeeds)?
>>>
>>> I can confirm that the reason you "need" -ffat-lto-objects is that you
>>> are not actually building with lto.
>>>
>>> The sad thing is that the optimized h264 cabac reader cannot be
>>> compiled with (static) lto. I don't remember the details atm but I
>>> suspect you have to disable this optimization in the source code to
>>> use lto, it may be better performance-wise to not use lto at all
>>> (depending on your exact needs).
>>>
>>> This bug cannot be worked around with -ffat-lto-objects (you would
>>> see the same issue I do if you would actually compile with lto)
>>
>> well, then i still guess other parts off mpeg can be still lto-optimized
>> and only x264 isn't
>
> Nothing above was related to x264 but to the hevc and the h264 decoder.
>
> The work-around for the cabac issue is using --enable-pic, I am not
> sure if this has negative effects (speed-wise), a performance test
> would be necessary
as you can see in the rpm spec (relevant part quoted again below) this
is alreayd enabled and that's in fact part of the hardening stuff
%build
mkdir generic
pushd generic
../configure \
--prefix=%{_prefix}/local \
--bindir=%{_prefix}/local/bin \
--mandir=%{_prefix}/local/man \
--extra-cflags="-I%{_prefix}/local/x264 %{optflags} -Ofast -ffast-math
-funsafe-math-optimizations -Wno-pointer-sign -minline-all-stringops
-fno-strict-aliasing -flto -fno-fat-lto-objects -fuse-ld=gold
-fuse-linker-plugin -Wa,--noexecstack" \
--extra-ldflags="-I%{_prefix}/local/x264 -L%{_prefix}/local/x264 -ldl
-Wl,--as-needed -Wl,-z,now -Wl,-z,relro -Wl,-z,noexecstack %{optflags}
-Ofast -ffast-math -funsafe-math-optimizations -Wno-pointer-sign
-minline-all-stringops -fno-strict-aliasing -flto -fno-fat-lto-objects
-pie -fPIE -fuse-ld=gold -fuse-linker-plugin -Wa,--noexecstack" \
--enable-lto \
--ar=gcc-ar \
--ranlib=true \
--enable-nonfree \
--enable-gpl \
--enable-pic \
--enable-version3 \
--enable-libmp3lame \
--enable-libtheora \
--enable-libx264 \
--enable-libx265 \
--enable-libvpx \
--enable-openssl \
--enable-static \
--enable-runtime-cpudetect \
--disable-amd3dnow \
--disable-amd3dnowext \
--disable-avdevice \
--disable-debug \
--disable-devices \
--disable-ffplay \
--disable-ffprobe \
--disable-ffserver \
--disable-htmlpages \
--disable-hwaccels \
--disable-iconv \
--disable-libdc1394 \
--disable-libfreetype \
--disable-libgsm \
--disable-libopencore-amrnb \
--disable-libopencore-amrwb \
--disable-libopencv \
--disable-libopenjpeg \
--disable-libopus \
--disable-librtmp \
--disable-libschroedinger \
--disable-libspeex \
--disable-libvorbis \
--disable-libxvid \
--disable-podpages \
--disable-postproc \
--disable-protocol=gopher \
--disable-shared \
--disable-txtpages
More information about the ffmpeg-user
mailing list