Bug 187017

Summary: [patch] multimedia/libxine port fails during configure with clang 3.4
Product: Ports & Packages Reporter: Don Lewis <truckman>
Component: Individual Port(s)Assignee: Juergen Lock <nox>
Status: Closed FIXED    
Severity: Affects Only Me    
Priority: Normal    
Version: Latest   
Hardware: Any   
OS: Any   
Description Flags
libxine-clang34.patch none

Description Don Lewis freebsd_committer 2014-02-25 05:40:00 UTC
The multimedia/libxine port fails during the configure phase:

checking for gcc... cc
checking whether the C compiler works... no
configure: error: in `/usr/ports/multimedia/libxine/work/xine-lib-1.2.4':
configure: error: C compiler cannot create executables
See `config.log' for more details
===>  Script "configure" failed unexpectedly.

The reason for the failure is found in config.log:

configure:4779: checking whether the C compiler works
configure:4801: cc -g -O2 -pipe -march=athlon64 -fno-force-addr -I/usr/local/inc
lude -I/usr/local/include/dvdread -I/usr/local/include/ffmeg -fomit-frame-pointe
sr/local/include -I/usr/local/include/ffmpeg -DLIBICONV_PLUG -g  -L/usr/local/li
b conftest.c  >&5
cc: error: unknown argument: '-fno-force-addr'
configure:4805: $? = 1
configure:4843: result: no

Fix: The build gets further with this Makefile patch:

but then the build phase fails here:

gmake[4]: Entering directory `/usr/ports/multimedia/libxine/work/xine-lib-1.2.4/
Making all in wine
gmake[5]: Entering directory `/usr/ports/multimedia/libxine/work/xine-lib-1.2.4/
  CC       libwine_la-afl.lo
  CC       libwine_la-driver.lo
cc: error: unknown argument: '-fno-rename-registers'
cc: error: unknown argument: '-fno-rename-registers'
gmake[5]: *** [libwine_la-afl.lo] Error 1
gmake[5]: *** Waiting for unfinished jobs....
gmake[5]: *** [libwine_la-driver.lo] Error 1
gmake[5]: Leaving directory `/usr/ports/multimedia/libxine/work/xine-lib-1.2.4/s
Content-Type: text/plain; name="file.diff"
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment; filename="file.diff"

Index: Makefile
--- Makefile	(revision 345674)
+++ Makefile	(working copy)
@@ -51,7 +51,11 @@
 		EXTRA_X_LIBS="-lGL -lGLU -lXext -lX11 -lm"
 CPPFLAGS+=	-I${LOCALBASE}/include -I${LOCALBASE}/include/ffmpeg
-CFLAGS+=	-fno-force-addr -I${LOCALBASE}/include -I${LOCALBASE}/include/dvdread -I${LOCALBASE}/include/ffmeg
+_COMPILER_VERSION!=     ${CC} --version
+.if !${_COMPILER_VERSION:Mclang}
+CFLAGS+=	-fno-force-addr
+CFLAGS+=	-I${LOCALBASE}/include -I${LOCALBASE}/include/dvdread -I${LOCALBASE}/include/ffmeg
 CONFIGURE_ARGS=	--with-w32-path=${LOCALBASE}/lib/win32 \
 		--enable-ipv6 \
 		--with-external-libmad \
Attempt to build multimedia/libxine on a machine with clang version 3.4 as
system compiler.
Comment 1 Edwin Groothuis freebsd_committer 2014-02-25 05:40:08 UTC
Responsible Changed
From-To: freebsd-ports-bugs->nox

Over to maintainer (via the GNATS Auto Assign Tool)
Comment 2 Juergen Lock 2014-02-25 19:23:28 UTC
Can you try the attached patch?  I don't have a head box to test it...

Thanx! :)
Comment 3 Don Lewis freebsd_committer 2014-02-26 05:14:55 UTC
On 25 Feb, Juergen Lock wrote:
> Can you try the attached patch?  I don't have a head box to test it...
> Thanx! :)
> 	Juergen

Thanks.  It builds, but I really can't test if it runs on this machine.
Comment 4 dfilter service freebsd_committer 2014-02-27 20:03:58 UTC
Author: nox
Date: Thu Feb 27 20:03:51 2014
New Revision: 346386
URL: http://svnweb.freebsd.org/changeset/ports/346386
QAT: https://qat.redports.org/buildarchive/r346386/

  Fix build with clang 3.4 .
  PR:		ports/187017
  Submitted by:	truckman


Modified: head/multimedia/libxine/Makefile
--- head/multimedia/libxine/Makefile	Thu Feb 27 20:02:12 2014	(r346385)
+++ head/multimedia/libxine/Makefile	Thu Feb 27 20:03:51 2014	(r346386)
@@ -37,7 +37,7 @@ BUILD_DEPENDS+=	v4l_compat>=1.0.20100321
 LIB_DEPENDS+=	libdvdcss.so.${DVDCSS_LIBVERSION}:${PORTSDIR}/multimedia/libdvdcss
-USES=		gmake iconv pathfix perl5 pkgconfig
+USES=		gmake iconv pathfix perl5 pkgconfig compiler:features
 USE_XZ=		yes
 		EXTRA_X_LIBS="-lGL -lGLU -lXext -lX11 -lm"
 CPPFLAGS+=	-I${LOCALBASE}/include -I${LOCALBASE}/include/ffmpeg
-CFLAGS+=	-fno-force-addr -I${LOCALBASE}/include -I${LOCALBASE}/include/dvdread -I${LOCALBASE}/include/ffmeg
+CFLAGS+=	-I${LOCALBASE}/include -I${LOCALBASE}/include/dvdread -I${LOCALBASE}/include/ffmeg
 CONFIGURE_ARGS=	--with-w32-path=${LOCALBASE}/lib/win32 \
 		--enable-ipv6 \
 		--with-external-libmad \
@@ -79,7 +79,11 @@ DVDCSS_LIBVERSION=	3
 PATCH_DIST_ARGS=	-d ${WRKSRC} -p1 --forward --quiet
-.include <bsd.port.options.mk>
+.include <bsd.port.pre.mk>
+.if ${COMPILER_TYPE} != "clang"
+CFLAGS+= 	-fno-force-addr
 .if ${ARCH} == "i386"
 CFLAGS+=	-fomit-frame-pointer
@@ -222,6 +226,10 @@ CONFIGURE_ARGS+=	--disable-vidix
+.if ${COMPILER_TYPE} == "clang"
+	@${REINPLACE_CMD} -e 's|-fno-rename-registers||' \
+		${WRKSRC}/src/libw32dll/wine/Makefile.in
 	@${REINPLACE_CMD} -e 's|-ldl||' \
@@ -258,4 +266,4 @@ pre-configure:
 		  s|{libdir}/pkgconfig|{prefix}/libdata/pkgconfig|g' \
-.include <bsd.port.mk>
+.include <bsd.port.post.mk>
svn-ports-all@freebsd.org mailing list
To unsubscribe, send any mail to "svn-ports-all-unsubscribe@freebsd.org"
Comment 5 Juergen Lock freebsd_committer 2014-02-27 20:04:28 UTC
State Changed
From-To: open->closed

Committed, with minor changes. Thanks!