[FFmpeg-user] linking with codec that needs libdl
Aaron Boxer
boxerab at gmail.com
Sun Mar 27 23:59:15 CEST 2016
On Sun, Mar 27, 2016 at 5:46 PM, Aaron Boxer <boxerab at gmail.com> wrote:
>
>
> On Sun, Mar 27, 2016 at 5:18 PM, Carl Eugen Hoyos <cehoyos at ag.or.at>
> wrote:
>
>> Reindl Harald <h.reindl <at> thelounge.net> writes:
>>
>> > post your complete config.log
>>
>> While this is requested and ok, I slightly
>> prefer to only read the tail...
>>
>>
> So, my configure command is:
>
> ./configure --enable-libopenjpeg
> --extra_cflags="-DHAVE_OPEN_OPENJPEG_2_1_OPENJPEG_H"
> --extra-ldflags="-L/usr/local/lib -ldl"
>
> The last 300 lines of my config.log file is attached.
>
> Console output doesn't have any useful info, other than the fact that
> libopenjpeg failed.
>
> In the config.log file, you will see near the end:
>
> gcc -L/usr/local/lib -ldl -Wl,--as-needed -Wl,-z,noexecstack -DOPJ_STATIC
> -o /tmp/ffconf.dmz9AkoL /tmp/ffconf.UopZOMks.o -lopenjp2 -lm -llzma -lz
> -pthread
> /usr/local/lib/libopenjp2.so: undefined reference to `dlopen'
> /usr/local/lib/libopenjp2.so: undefined reference to `dlclose'
> /usr/local/lib/libopenjp2.so: undefined reference to `dlsym'
> collect2: error: ld returned 1 exit status
>
> So, I think the problem is that -ldl should appear *after* the object file,
> along with -lopenjp2,not before the object file.
>
OK, so the solution is to add -ldl to the check_lib line in the configure
file,
after -lopenjp2
Now it configures fine.
Thanks,
Aaron
>
>
>> Carl Eugen
>>
>> _______________________________________________
>> ffmpeg-user mailing list
>> ffmpeg-user at ffmpeg.org
>> http://ffmpeg.org/mailman/listinfo/ffmpeg-user
>>
>
>
More information about the ffmpeg-user
mailing list