Hi,

> 2008/10/29 Alexis Ballier <[EMAIL PROTECTED]>:
> >> 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.

The ebuild uses configure2 and allows user ldflags. Are you using
as-needed by any chance ?
If yes, please try the enclosed patch. With the current configure2
build system, if I link with as-needed, libdvdread.so gets its libdl
linkage dropped.

> [EMAIL PROTECTED] ~/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

That just means libdvdread should be linked to libdl :)

> The correct solution, then seems to be updating configure to take
> libdvdcss into account, and generate dvdread-config accordingly.

that would make any dvdread-config consumer wrongly link to libdl :(

> Relatedly, is configure2 still the preferred way, or is it already
> considered unmaintained?

Good question; and by the way, configure2 always links to libdl while
the autofoo seems to have better handling of dlopen stuff. Which means
configure2 will probably fail on freebsd.

Regards,

Alexis.
Index: Makefile
===================================================================
--- Makefile	(revision 1158)
+++ Makefile	(working copy)
@@ -78,7 +78,7 @@
 	cd $(.OBJDIR) && $(RANLIB) $@
 
 ${DVDREAD_SHLIB}: version.h $(DVDREAD_SHOBJS) $(BUILDDEPS)
-	cd $(.OBJDIR) && $(CC) $(SHLDFLAGS) $(LDFLAGS) -ldl -Wl,-soname=$(DVDREAD_SHLIB).$(SHLIB_MAJOR) -o $@ $(DVDREAD_SHOBJS)
+	cd $(.OBJDIR) && $(CC) $(SHLDFLAGS) $(LDFLAGS) -Wl,-soname=$(DVDREAD_SHLIB).$(SHLIB_MAJOR) -o $@ $(DVDREAD_SHOBJS) -ldl
 
 .c.so:	$(BUILDDEPS)
 	cd $(.OBJDIR) && $(CC) -fPIC -DPIC -MD $(CFLAGS) -c -o $@ $<

Attachment: signature.asc
Description: PGP signature

_______________________________________________
DVDnav-discuss mailing list
[email protected]
https://lists.mplayerhq.hu/mailman/listinfo/dvdnav-discuss

Reply via email to