Skip site navigation (1)Skip section navigation (2)
Date:      Sun,  1 Nov 2009 17:18:04 +0100 (CET)
From:      Thierry Thomas <thierry@FreeBSD.org>
To:        FreeBSD-gnats-submit@FreeBSD.org
Cc:        Norikatsu Shigemura <nork@FreeBSD.org>
Subject:   ports/140170: net/liveMedia: install shared libraries and thus fix rtsp in multimedia/vlc
Message-ID:  <20091101161804.B889D1145B@graf.pompo.net>
Resent-Message-ID: <200911011620.nA1GK27I019155@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>Number:         140170
>Category:       ports
>Synopsis:       net/liveMedia: install shared libraries and thus fix rtsp in multimedia/vlc
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Sun Nov 01 16:20:01 UTC 2009
>Closed-Date:
>Last-Modified:
>Originator:     Thierry Thomas
>Release:        FreeBSD 8.0-BETA3 i386
>Organization:
Kabbale Eros
>Environment:
System: FreeBSD graf.pompo.net 8.0-BETA3 FreeBSD 8.0-BETA3 #0: Sat Aug 29 18:35:30 CEST 2009 thierry@graf.pompo.net:/usr/obj/usr/src/sys/GRAF090829 i386


	
>Description:
	At the moment, the port net/liveMedia does not install shared
	libraries, but only the static ones, and this breaks RTSP support
	in multimedia/vlc, because it fails to dlopen liveMedia.

>How-To-Repeat:
	When built against static liveMedia libs, vlc chokes on rtsp with
	the following messages:

VLC media player 1.0.1 Goldeneye
[0x34136100] main libvlc warning: cannot load module `/usr/local/lib/vlc/demux/liblive555_plugin.so' (/usr/local/lib/vlc/demux/liblive555_plugin.so: Undefined symbol "_ZTI9HashTable")
[0x34136100] main libvlc warning: cannot load module `/usr/local/lib/vlc/gui/libskins2_plugin.so' (/usr/local/lib/vlc/gui/libskins2_plugin.so: Undefined symbol "_ZN10X11FactoryC1EP13intf_thread_t")
[0x37f50700] main demux warning: no access_demux module matching "file" could be loaded
...
[0x384fc640] access_realrtsp access warning: only real/helix rtsp servers supported for now
[0x384fc640] main access warning: no access module matching "rtsp" could be loaded
[0x39a72010] main input error: open of `rtsp://mafreebox.freebox.fr/fbxtv_pub/stream?namespace=1&service=201&flavour=sd' failed: (null)

>Fix:
	Please apply the hereunder patch (then, you might want to bump
	multimedia/vlc's PORTREVISION).

	Note: there are several ways to build shared libraries; this one
	is not the smarttest, but it avoids several patches in the
	various Makefile.tail.

--- liveMedia.diff begins here ---
diff -urN net/liveMedia.orig/Makefile net/liveMedia/Makefile
--- net/liveMedia.orig/Makefile	2009-10-06 23:23:13.000000000 +0200
+++ net/liveMedia/Makefile	2009-11-01 16:29:04.000000000 +0100
@@ -7,7 +7,7 @@
 
 PORTNAME=	liveMedia
 PORTVERSION=	2009.09.28
-PORTREVISION=	0
+PORTREVISION=	1
 PORTEPOCH=	1
 CATEGORIES=	net devel
 MASTER_SITES=	http://www.live555.com/liveMedia/public/
@@ -28,6 +28,9 @@
 
 CONFIGURE_SCRIPT=	genMakefiles
 CONFIGURE_ARGS=		fixed-${OPSYS:L}
+USE_LDCONFIG=	${PREFIX}/live/BasicUsageEnvironment	\
+		${PREFIX}/live/UsageEnvironment ${PREFIX}/live/groupsock	\
+		${PREFIX}/live/liveMedia
 
 INSTALL_DATADIR=	${INSTALL} -d ${_SHROWNGRP} -m 755
 
@@ -186,20 +189,43 @@
 BROKEN=		Does not compile
 .endif
 
-post-extract:
-	@${SED} -e "s|%%CFLAGS%%|${CFLAGS}|" \
-		${FILESDIR}/config.fixed-${OPSYS:L} > ${WRKSRC}/config.fixed-${OPSYS:L}
+pre-configure:
+.for typconf in fixed shared
+	${SED} -e "s|%%CFLAGS%%|${CFLAGS}|" \
+		${FILESDIR}/config.${typconf}-${OPSYS:L} > ${WRKSRC}/config.${typconf}-${OPSYS:L}
+.endfor
+
+config-shared:
+	@(cd ${CONFIGURE_WRKSRC} && \
+	    ${SET_LATE_CONFIGURE_ARGS} \
+		if ! ${SETENV} CC="${CC}" CXX="${CXX}" \
+	    CFLAGS="${CFLAGS}" CXXFLAGS="${CXXFLAGS}" \
+	    INSTALL="/usr/bin/install -c ${_BINOWNGRP}" \
+	    INSTALL_DATA="${INSTALL_DATA}" \
+	    INSTALL_PROGRAM="${INSTALL_PROGRAM}" \
+	    INSTALL_SCRIPT="${INSTALL_SCRIPT}" \
+	    ${CONFIGURE_ENV} ./${CONFIGURE_SCRIPT} shared-${OPSYS:L}; then \
+			 ${ECHO_MSG} "===>  Script \"${CONFIGURE_SCRIPT}\" failed unexpectedly."; \
+			 (${ECHO_CMD} ${CONFIGURE_FAIL_MESSAGE}) | ${FMT} 75 79 ; \
+			 ${FALSE}; \
+		fi)
+
+build-shared:
+	@(cd ${BUILD_WRKSRC} &&	\
+	${SETENV} ${MAKE_ENV} ${MAKE} ${MAKE_FLAGS} ${MAKEFILE} ${_MAKE_JOBS} ${MAKE_ARGS} ${ALL_TARGET})
 
-post-build:
+post-build: config-shared build-shared
 	@${RM} -f ${PLIST}
 	@${TOUCH} ${PLIST}
 	@${ECHO_CMD} bin/playSIP  >> ${PLIST}
 	@${ECHO_CMD} bin/openRTSP >> ${PLIST}
 	@${ECHO_CMD} bin/sapWatch >> ${PLIST}
-	@${ECHO_CMD} live/BasicUsageEnvironment/libBasicUsageEnvironment.a >> ${PLIST}
-	@${ECHO_CMD} live/UsageEnvironment/libUsageEnvironment.a           >> ${PLIST}
-	@${ECHO_CMD} live/groupsock/libgroupsock.a                         >> ${PLIST}
-	@${ECHO_CMD} live/liveMedia/libliveMedia.a                         >> ${PLIST}
+.for libsfx in .a .so .so.0
+	@${ECHO_CMD} live/BasicUsageEnvironment/libBasicUsageEnvironment${libsfx} >> ${PLIST}
+	@${ECHO_CMD} live/UsageEnvironment/libUsageEnvironment${libsfx}           >> ${PLIST}
+	@${ECHO_CMD} live/groupsock/libgroupsock${libsfx}                         >> ${PLIST}
+	@${ECHO_CMD} live/liveMedia/libliveMedia${libsfx}                         >> ${PLIST}
+.endfor
 .for file in ${BasicUsageEnvironment}
 	@${ECHO_CMD} live/BasicUsageEnvironment/include/${file:T} >> ${PLIST}
 .endfor
@@ -229,10 +255,11 @@
 	@${INSTALL_PROGRAM} ${WRKSRC}/testProgs/playSIP  ${PREFIX}/bin/
 	@${INSTALL_PROGRAM} ${WRKSRC}/testProgs/openRTSP ${PREFIX}/bin/
 	@${INSTALL_PROGRAM} ${WRKSRC}/testProgs/sapWatch ${PREFIX}/bin/
-	@${INSTALL_DATA} ${WRKSRC}/BasicUsageEnvironment/libBasicUsageEnvironment.a ${PREFIX}/live/BasicUsageEnvironment/
-	@${INSTALL_DATA} ${WRKSRC}/UsageEnvironment/libUsageEnvironment.a           ${PREFIX}/live/UsageEnvironment/
-	@${INSTALL_DATA} ${WRKSRC}/groupsock/libgroupsock.a                         ${PREFIX}/live/groupsock/
-	@${INSTALL_DATA} ${WRKSRC}/liveMedia/libliveMedia.a                         ${PREFIX}/live/liveMedia/
+.for file in BasicUsageEnvironment UsageEnvironment groupsock liveMedia
+	${INSTALL_DATA} ${WRKSRC}/${file}/lib${file}.a ${PREFIX}/live/${file}/
+	${INSTALL_PROGRAM} ${WRKSRC}/${file}/lib${file}.so ${PREFIX}/live/${file}/lib${file}.so.0
+	${LN} -sf ${PREFIX}/live/${file}/lib${file}.so.0 ${PREFIX}/live/${file}/lib${file}.so
+.endfor
 .for file in ${BasicUsageEnvironment}
 	@${INSTALL_DATA} ${WRKSRC}/${file} ${PREFIX}/live/BasicUsageEnvironment/include/
 .endfor
diff -urN net/liveMedia.orig/files/config.shared-freebsd net/liveMedia/files/config.shared-freebsd
--- net/liveMedia.orig/files/config.shared-freebsd	1970-01-01 01:00:00.000000000 +0100
+++ net/liveMedia/files/config.shared-freebsd	2009-11-01 15:41:23.000000000 +0100
@@ -0,0 +1,16 @@
+COMPILE_OPTS =		%%CFLAGS%% $(INCLUDES) -I. -DBSD=1 -DSOCKLEN_T=socklen_t -DHAVE_SOCKADDR_LEN=1
+C =			c
+C_COMPILER =		$(CC)
+C_FLAGS =		$(COMPILE_OPTS)
+CPLUSPLUS_COMPILER =	$(CXX)
+CPLUSPLUS_FLAGS =	$(COMPILE_OPTS) -Wall -Wno-deprecated
+OBJ =			o
+LINK =			$(CXX) -o
+LINK_OPTS =		-L.
+CONSOLE_LINK_OPTS =	$(LINK_OPTS)
+LIBRARY_LINK =		$(CC) -o
+LIBRARY_LINK_OPTS =	$(LINK_OPTS) -shared -Wl,-soname,$@
+LIB_SUFFIX =		so
+LIBS_FOR_CONSOLE_APPLICATION =
+LIBS_FOR_GUI_APPLICATION =
+EXE =
--- liveMedia.diff ends here ---

>Release-Note:
>Audit-Trail:
>Unformatted:



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20091101161804.B889D1145B>