building on OS X 10.0.4

Colin Simmonds colin_simmonds at Mac.lover.org
Mon Aug 6 06:38:22 CEST 2001


On Sunday, August 5, 2001, at 03:57  PM, Josh Gilbert wrote:

> Seems to produce a "-soname" not recognized by ld.
> Any tips?

As a workaround, change the following line in extras/libdvdcss/Makefile:

         $(CC) $(PCFLAGS) -Wl,-soname -Wl,libdvdcss.so.$(LIBDVDCSS_MAJOR) 
-o $@ $^ $(PLCFLAGS)

to

         $(CC) $(PCFLAGS) -o $@ $^ $(PLCFLAGS)

(that is, remove the two arguments starting with -Wl). This is somewhat 
irrelevant to Mac OS X at the moment, since the kernel support for DeCSS 
isn't there yet anyways, so binary compatibility of libdvdcss is a moot 
point.

With the above change, I can build the current CVS vlc. The menu items 
don't seem to do anything (except for About), but running it from the 
command line I was able to play an MPEG movie (just cd into 
vlc.app/Contents/MacOS to find the vlc executable and run it from there).

Obviously Darwin's linker doesn't support the -soname option. Glancing 
at the ld man page, I see there's a similar option called 
-dylib_compatibility_number which can be used to set the library's 
version numbers for binary compatibility.

However, the right fix is probably to use libtool to build and link the 
shared library. Among the other faults of this Makefile is its 
assumption that the library suffix is .so (it's .dylib on Darwin). Using 
libtool should portably handle the intricacies of building shared 
libraries on all sorts of Unixes.

Colin





More information about the vlc mailing list