[DVDnav-discuss] [PATCH] libdvdread: `dvdread-config --libs` should include "-ldl"
Yang Zhao
yang at yangman.ca
Wed Oct 29 21:57:02 CET 2008
2008/10/29 Alexis Ballier <aballier at gentoo.org>:
>> Patch adds "-ldl" to the appropriate output strings in
>> dvdread-config.sh and dvdread-config.in
>
> Hmm wait. Shouldn't that be outputted only when linking statically ?
> libdvdread.so should be linked to libdl if needed, what's the problem
> with not having -ldl in --libs ?
I'm currently trying to test compatibility of Gentoo's various
libdvdread-dependent packages with libdvdread-4.1.3. vobcopy is first
on my list, and this is where I'm hitting the problem.
Putting aside the fact that vobcopy's build system isn't exactly
pretty, linking by hand results in the following:
yzhao at awa ~/hacking/vobcopy-1.1.2 $ gcc -o vobcopy vobcopy.o dvd.o -ldvdread
/usr/lib/gcc/i686-pc-linux-gnu/4.1.2/../../../libdvdread.so: undefined
reference to `dlsym'
/usr/lib/gcc/i686-pc-linux-gnu/4.1.2/../../../libdvdread.so: undefined
reference to `dlopen'
/usr/lib/gcc/i686-pc-linux-gnu/4.1.2/../../../libdvdread.so: undefined
reference to `dlclose'
collect2: ld returned 1 exit status
> By the way, as far as I know, libdl isn't a standard thing, see eg.
> [1], freebsd does not have libdl and this patch will probably cause any
> application using dvdread-config to fail on freebsd...
Good point; I wasn't aware of that.
Looking at the code in more detail, ld* functionality is used when
HAVE_DVDCSS_DVDCSS_H is undefined when compiling under certain
platforms. However, neither configure.ac nor configure2 seems to
actually do the checks and set this; libdvdcss is installed on my
machine.
The correct solution, then seems to be updating configure to take
libdvdcss into account, and generate dvdread-config accordingly.
Relatedly, is configure2 still the preferred way, or is it already
considered unmaintained?
--
Yang Zhao
More information about the DVDnav-discuss
mailing list