From nobody@FreeBSD.org  Sun Feb 10 21:03:56 2008
Return-Path: <nobody@FreeBSD.org>
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 8C9A616A417
	for <freebsd-gnats-submit@FreeBSD.org>; Sun, 10 Feb 2008 21:03:56 +0000 (UTC)
	(envelope-from nobody@FreeBSD.org)
Received: from www.freebsd.org (www.freebsd.org [IPv6:2001:4f8:fff6::21])
	by mx1.freebsd.org (Postfix) with ESMTP id 98EF613C4CC
	for <freebsd-gnats-submit@FreeBSD.org>; Sun, 10 Feb 2008 21:03:56 +0000 (UTC)
	(envelope-from nobody@FreeBSD.org)
Received: from www.freebsd.org (localhost [127.0.0.1])
	by www.freebsd.org (8.14.2/8.14.2) with ESMTP id m1AL1ikD081293
	for <freebsd-gnats-submit@FreeBSD.org>; Sun, 10 Feb 2008 21:01:44 GMT
	(envelope-from nobody@www.freebsd.org)
Received: (from nobody@localhost)
	by www.freebsd.org (8.14.2/8.14.1/Submit) id m1AL1ilS081292;
	Sun, 10 Feb 2008 21:01:44 GMT
	(envelope-from nobody)
Message-Id: <200802102101.m1AL1ilS081292@www.freebsd.org>
Date: Sun, 10 Feb 2008 21:01:44 GMT
From: Wes Morgan <morganw@chemikals.org>
To: freebsd-gnats-submit@FreeBSD.org
Subject: handbrake doesn't build on amd64
X-Send-Pr-Version: www-3.1
X-GNATS-Notify: jaj@hcl-club.lu

>Number:         120510
>Category:       ports
>Synopsis:       multimedia/handbrake doesn't build on amd64
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    rafan
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Sun Feb 10 21:10:03 UTC 2008
>Closed-Date:    Wed Feb 20 01:21:45 UTC 2008
>Last-Modified:  Wed Feb 20 01:21:45 UTC 2008
>Originator:     Wes Morgan
>Release:        7.0
>Organization:
>Environment:
FreeBSD volatile 7.0-PRERELEASE FreeBSD 7.0-PRERELEASE #4: Sun Jan 13 11:48:41 CST 2008     morganw@volatile:/usr/src/sys/amd64/compile/VOLATILE  amd64
>Description:
Port marked as broken on AMD64. Build fails with "R_X86_64_32S" errors.
>How-To-Repeat:
Remove broken flag and build port on amd64.
>Fix:
Compile a52 and mpeg2dec without the -prefer-non-pic flag for libtool.


Patch attached with submission follows:

--- ../../work/HandBrake/contrib/configure	2002-07-27 22:50:42.000000000 -0500
+++ contrib/a52dec/configure	2008-02-10 13:27:23.298399910 -0600
@@ -9640,7 +9640,7 @@
 
 
 
-LIBA52_CFLAGS="$LIBA52_CFLAGS -prefer-non-pic"
+LIBA52_CFLAGS="$LIBA52_CFLAGS"
 
 # Check whether --enable-double or --disable-double was given.
 if test "${enable_double+set}" = set; then
--- ../../work/HandBrake/contrib/liba52/configure.incl	2002-01-27 22:36:48.000000000 -0600
+++ contrib/a52dec/liba52/configure.incl	2008-02-10 13:27:37.130839289 -0600
@@ -2,7 +2,7 @@
 AC_SUBST([LIBA52_LIBS])
 
 dnl avoid -fPIC when possible
-LIBA52_CFLAGS="$LIBA52_CFLAGS -prefer-non-pic"
+LIBA52_CFLAGS="$LIBA52_CFLAGS"
 
 AC_ARG_ENABLE([double],
     [  --enable-double         use double-precision samples])
--- ../../work/HandBrake/contrib/mpeg2dec/configure~	2008-02-10 14:25:13.883591050 -0600
+++ contrib/mpeg2dec/configure	2008-02-10 14:25:13.888591248 -0600
@@ -23964,28 +23964,6 @@
 done
 
 
-
-
-echo "$as_me:$LINENO: checking if libtool supports -prefer-non-pic flag" >&5
-echo $ECHO_N "checking if libtool supports -prefer-non-pic flag... $ECHO_C" >&6
-    mkdir ac_test_libtool; cd ac_test_libtool; ac_cv_libtool_non_pic=no
-    echo "int g (int i); static int h (int i) {return g (i);} int f (int i) {return h (i);}" >f.c
-    echo "int (* hook) (int) = 0; int g (int i) {if (hook) i = hook (i); return i + 1;}" >g.c
-    ../libtool --mode=compile $CC $CFLAGS -prefer-non-pic \
-		-c f.c >/dev/null 2>&1 && \
-	../libtool --mode=compile $CC $CFLAGS -prefer-non-pic \
-		-c g.c >/dev/null 2>&1 && \
-	../libtool --mode=link $CC $CFLAGS -prefer-non-pic -o libfoo.la \
-		-rpath / f.lo g.lo >/dev/null 2>&1 &&
-	ac_cv_libtool_non_pic=yes
-    cd ..; rm -fr ac_test_libtool; echo "$as_me:$LINENO: result: $ac_cv_libtool_non_pic" >&5
-echo "${ECHO_T}$ac_cv_libtool_non_pic" >&6
-    if test x"$ac_cv_libtool_non_pic" = x"yes"; then
-	LIBMPEG2_CFLAGS="$LIBMPEG2_CFLAGS -prefer-non-pic"
-    else
-	:
-    fi
-
 # Check whether --enable-accel-detect or --disable-accel-detect was given.
 if test "${enable_accel_detect+set}" = set; then
   enableval="$enable_accel_detect"


>Release-Note:
>Audit-Trail:
State-Changed-From-To: open->feedback 
State-Changed-By: edwin 
State-Changed-When: Sun Feb 10 21:16:31 UTC 2008 
State-Changed-Why:  
Awaiting maintainers feedback (via the GNATS Auto Assign Tool) 

http://www.freebsd.org/cgi/query-pr.cgi?pr=120510 

From: Jona Joachim <jaj@hcl-club.lu>
To: morganw@chemikals.org
Cc: edwin@freebsd.org, bug-followup@FreeBSD.org, rafan@freebsd.org,
	jaj@hcl-club.lu
Subject: Re: ports/120510: multimedia/handbrake doesn't build on amd64
Date: Tue, 12 Feb 2008 16:34:14 +0000

 Hi!
 Thanks for your patch! Sorry for replying so late, I've been very busy
 lately...
 Does handbrake really compile and work for you on amd64 with this patch
 applied? Unfortunately I can't test it myself as I currently don't have
 an amd64 system running FreeBSD.
 I submitted a patch with a little different approach which should fix
 the build on amd64: ports/119908. It works on RELENG_7 but it doesn't
 seem to work on RELENG_6. However your patch is much more elegant.
 Could you perhaps test if it works on RELENG_6, too?
 
 Best regards,
 Jona

From: Wes Morgan <morganw@chemikals.org>
To: Jona Joachim <jaj@hcl-club.lu>
Cc: edwin@freebsd.org, bug-followup@freebsd.org, rafan@freebsd.org
Subject: Re: ports/120510: multimedia/handbrake doesn't build on amd64
Date: Tue, 12 Feb 2008 18:23:10 -0600 (CST)

 On Tue, 12 Feb 2008, Jona Joachim wrote:
 
 > Hi!
 > Thanks for your patch! Sorry for replying so late, I've been very busy
 > lately...
 > Does handbrake really compile and work for you on amd64 with this patch
 > applied? Unfortunately I can't test it myself as I currently don't have
 > an amd64 system running FreeBSD.
 > I submitted a patch with a little different approach which should fix
 > the build on amd64: ports/119908. It works on RELENG_7 but it doesn't
 > seem to work on RELENG_6. However your patch is much more elegant.
 > Could you perhaps test if it works on RELENG_6, too?
 
 
 Yep, it works fine:
 
 [morganw@volatile:/usr/home/media/dvd$]: handbrake -i A_NEW_HOPE -o 
 star_wars.avi
 HandBrake 0.9.1 (2007100800) - http://handbrake.m0k.org/
 2 CPUs detected
 Opening A_NEW_HOPE...
 Scanning title 1...
 Scanning title 1...
 Scanning title 1...
 Scanning title 1...
 Scanning title 1...
 Scanning title 1...
 Scanning title 1...
 Scanning title 1...
 
 <snip>
 
 [mpeg4 @ 0x886a20]removing common factors from framerate
 No accelerated IMDCT transform found
 Encoding: task 1 of 1, 2.84 % (184.08 fps, avg 191.80 fps, ETA 00h15m09s)
 
 [morganw@volatile:/usr/home/media/dvd$]: uname -a
 FreeBSD volatile 7.0-PRERELEASE FreeBSD 7.0-PRERELEASE #4: Sun Jan 13 
 11:48:41 CST 2008     morganw@volatile:/usr/src/sys/amd64/compile/VOLATILE 
 amd64
 
 It works the same as handbrake on my i386 laptop (Scanning for "forced 
 subs" is broken on both). Unfortunately I don't have a RELENG_6 machine to 
 test it on at the moment. The assembler error messages referenced in your 
 PR look like they are 32-bit specific code that isn't being avoided on 
 amd64.
Responsible-Changed-From-To: freebsd-ports-bugs->rafan 
Responsible-Changed-By: rafan 
Responsible-Changed-When: Tue Feb 19 09:09:34 UTC 2008 
Responsible-Changed-Why:  
I'll take it. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=120510 
State-Changed-From-To: feedback->open 
State-Changed-By: linimon 
State-Changed-When: Tue Feb 19 09:17:53 UTC 2008 
State-Changed-Why:  
Maintainer approved (see Audit-Trail to ports/119008, which he had 
originally filed; he suggested that 119008 be closed of this one). 

http://www.freebsd.org/cgi/query-pr.cgi?pr=120510 

From: dfilter@FreeBSD.ORG (dfilter service)
To: bug-followup@FreeBSD.org
Cc:  
Subject: Re: ports/120510: commit references a PR
Date: Wed, 20 Feb 2008 01:19:24 +0000 (UTC)

 rafan       2008-02-20 01:19:09 UTC
 
   FreeBSD ports repository
 
   Modified files:
     multimedia/handbrake Makefile 
   Added files:
     multimedia/handbrake/files patch-contrib-a52dec-configure 
                                patch-contrib-mpeg2dec-configure 
   Log:
   - Unbreak on amd64 7.x and above
   
   PR:             ports/120510
   Submitted by:   Wes Morgan <morganw at chemikals.org>
   Approved by:    maintainer
   
   Revision  Changes    Path
   1.23      +1 -1      ports/multimedia/handbrake/Makefile
   1.1       +11 -0     ports/multimedia/handbrake/files/patch-contrib-a52dec-configure (new)
   1.1       +11 -0     ports/multimedia/handbrake/files/patch-contrib-mpeg2dec-configure (new)
 _______________________________________________
 cvs-all@freebsd.org mailing list
 http://lists.freebsd.org/mailman/listinfo/cvs-all
 To unsubscribe, send any mail to "cvs-all-unsubscribe@freebsd.org"
 
State-Changed-From-To: open->closed 
State-Changed-By: rafan 
State-Changed-When: Wed Feb 20 01:20:38 UTC 2008 
State-Changed-Why:  
Committed. Thanks! (Note that 6.x amd64 is still broken) 

http://www.freebsd.org/cgi/query-pr.cgi?pr=120510 
>Unformatted:
