From rsmith@xs4all.nl  Sat Dec  4 13:54:09 2004
Return-Path: <rsmith@xs4all.nl>
Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125])
	by hub.freebsd.org (Postfix) with ESMTP id 501F116A4CE
	for <FreeBSD-gnats-submit@freebsd.org>; Sat,  4 Dec 2004 13:54:09 +0000 (GMT)
Received: from smtp-vbr11.xs4all.nl (smtp-vbr11.xs4all.nl [194.109.24.31])
	by mx1.FreeBSD.org (Postfix) with ESMTP id AFCAC43D62
	for <FreeBSD-gnats-submit@freebsd.org>; Sat,  4 Dec 2004 13:54:08 +0000 (GMT)
	(envelope-from rsmith@xs4all.nl)
Received: from slackbox.xs4all.nl (slackbox.xs4all.nl [213.84.242.160])
	by smtp-vbr11.xs4all.nl (8.12.11/8.12.11) with ESMTP id iB4Ds7hx024778
	for <FreeBSD-gnats-submit@freebsd.org>; Sat, 4 Dec 2004 14:54:07 +0100 (CET)
	(envelope-from rsmith@xs4all.nl)
Received: by slackbox.xs4all.nl (Postfix, from userid 1001)
	id 75EC1635E; Sat,  4 Dec 2004 14:54:23 +0100 (CET)
Message-Id: <20041204135423.75EC1635E@slackbox.xs4all.nl>
Date: Sat,  4 Dec 2004 14:54:23 +0100 (CET)
From: Roland Smith <rsmith@xs4all.nl>
Reply-To: Roland Smith <rsmith@xs4all.nl>
To: FreeBSD-gnats-submit@freebsd.org
Cc:
Subject: The port math/octave is marked BROKEN on amd64
X-Send-Pr-Version: 3.113
X-GNATS-Notify:

>Number:         74669
>Category:       ports
>Synopsis:       The port math/octave is marked BROKEN on amd64
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-ports-bugs
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Sat Dec 04 14:00:45 GMT 2004
>Closed-Date:    Thu Feb 10 07:47:12 GMT 2005
>Last-Modified:  Thu Feb 10 07:47:12 GMT 2005
>Originator:     Roland Smith
>Release:        FreeBSD 5.3-RELEASE amd64
>Organization:
none
>Environment:
>Description:
The port math/octave is marked BROKEN on amd64. 

>How-To-Repeat:
>Fix:
	This patch works around the breakage by configuring octave with
	--disable-shared. This makes for a large executable, but the
	program works.

--- octave-mak.patch begins here ---
--- Makefile.orig	Fri Dec  3 20:36:40 2004
+++ Makefile	Sat Dec  4 10:43:13 2004
@@ -23,10 +23,6 @@
 
 .include <bsd.port.pre.mk>
 
-.if ${ARCH} == "amd64"
-BROKEN=		"Does not build on amd64 (Shared libraries must be compiled with -fPIC)"
-.endif
-
 .if ${PORTOBJFORMAT} == "elf"
 GNU_HOST=	${ARCH}-portbld-freebsd${OSREL}
 .else
@@ -38,11 +34,16 @@
 BLAS_LIBS=	"-L${LOCALBASE}/lib -lf77blas -lcblas -latlas"
 USE_GMAKE=	yes
 GNU_CONFIGURE=	yes
-USE_REINPLACE=	yes
 
-CONFIGURE_ARGS=	--host=${GNU_HOST} \
-		--with-fftw --with-blas=${BLAS_LIBS} --with-lapack=-lalapack \
-		--enable-shared
+CONIGURE_ARGS=  --host=${GNU_HOST} \
+		--with-fftw --with-blas=${BLAS_LIBS} --with-lapack=-lalapack
+.if ${ARCH} == "amd64"
+CONFIGURE_ARGS+= --disable-shared
+.else
+CONFIGURE_ARGS+= --enable-shared
+USE_REINPLACE=  yes
+.endif
+
 CONFIGURE_ENV=	CFLAGS="${CFLAGS} -I${LOCALBASE}/include" \
 		LDFLAGS="${LDFLAGS} -L${LOCALBASE}/lib" \
 		CPPFLAGS="${CPPFLAGS} -I${LOCALBASE}/include" \
@@ -62,12 +63,14 @@
 	@${RM} -f ${WRKSRC}/doc/interpreter/octave.info*
 	@${RM} -f ${WRKSRC}/doc/liboctave/liboctave.info*
 post-install:
+.if ${ARCH} != "amd64"
 	${RM} ${PREFIX}/bin/octave
 	@${CP} ${FILESDIR}/octave ${WRKDIR}
 	@${REINPLACE_CMD} -e 's,%%PREFIX%%,${PREFIX},g ; \
 			      s,%%OCTAVE_VERSION%%,${OCTAVE_VERSION},g' \
 			      ${WRKDIR}/octave
 	${INSTALL_SCRIPT} ${WRKDIR}/octave ${PREFIX}/bin
+.endif
 	${INSTALL_DATA} ${WRKSRC}/doc/liboctave/liboctave.info ${PREFIX}/info
 	install-info --entry='* Octave: (octave).	Interactive language for numerical computations.' $(PREFIX)/info/octave.info $(PREFIX)/info/dir
 	install-info --entry='* LibOctave: (liboctave).	C++ class library for Octave.' $(PREFIX)/info/liboctave.info $(PREFIX)/info/dir
--- octave-mak.patch ends here ---


>Release-Note:
>Audit-Trail:

From: "Conrad J. Sabatier" <conrads@cox.net>
To: Roland Smith <rsmith@xs4all.nl>
Cc: FreeBSD-gnats-submit@freebsd.org
Subject: Re: amd64/74669: The port math/octave is marked BROKEN on amd64
Date: Sat, 04 Dec 2004 08:27:28 -0600

 On Sat, 2004-12-04 at 14:54 +0100, Roland Smith wrote:
 > >Number:         74669
 > >Category:       amd64
 > >Synopsis:       The port math/octave is marked BROKEN on amd64
 > >Confidential:   no
 > >Severity:       non-critical
 > >Priority:       low
 > >Responsible:    freebsd-amd64
 > >State:          open
 > >Quarter:        
 > >Keywords:       
 > >Date-Required:
 > >Class:          change-request
 > >Submitter-Id:   current-users
 > >Arrival-Date:   Sat Dec 04 14:00:45 GMT 2004
 > >Closed-Date:
 > >Last-Modified:
 > >Originator:     Roland Smith
 > >Release:        FreeBSD 5.3-RELEASE amd64
 > >Organization:
 > none
 > >Environment:
 > >Description:
 > The port math/octave is marked BROKEN on amd64. 
 > 
 > >How-To-Repeat:
 > >Fix:
 > 	This patch works around the breakage by configuring octave with
 > 	--disable-shared. This makes for a large executable, but the
 > 	program works.
 
 A better fix would be to determine exactly where -fPIC is needed and
 apply patches where appropriate, but this is fine for a "quick fix".
 
 > --- octave-mak.patch begins here ---
 > --- Makefile.orig	Fri Dec  3 20:36:40 2004
 > +++ Makefile	Sat Dec  4 10:43:13 2004
 > @@ -23,10 +23,6 @@
 >  
 >  .include <bsd.port.pre.mk>
 >  
 > -.if ${ARCH} == "amd64"
 > -BROKEN=		"Does not build on amd64 (Shared libraries must be compiled with -fPIC)"
 > -.endif
 
 -- 
 Conrad J. Sabatier -- conrads@cox.net -- "In Unix veritas"
 
 

From: Roland Smith <rsmith@xs4all.nl>
To: "Conrad J. Sabatier" <conrads@cox.net>
Cc: FreeBSD-gnats-submit@freebsd.org, freebsd-amd64@freebsd.org
Subject: Re: amd64/74669: The port math/octave is marked BROKEN on amd64
Date: Sat, 4 Dec 2004 18:04:10 +0100

 --TRYliJ5NKNqkz5bu
 Content-Type: multipart/mixed; boundary="+QahgC5+KEYLbs62"
 Content-Disposition: inline
 
 
 --+QahgC5+KEYLbs62
 Content-Type: text/plain; charset=us-ascii
 Content-Disposition: inline
 Content-Transfer-Encoding: quoted-printable
 
 On Sat, Dec 04, 2004 at 08:27:28AM -0600, Conrad J. Sabatier wrote:
 >
 > A better fix would be to determine exactly where -fPIC is needed and
 > apply patches where appropriate, but this is fine for a "quick fix".
 
 Ok, I've looked into it, and the problem seems to be in the libglob that
 is included in octave. When libglob.a is linked into liboctave.so, the
 linking fails because libglob isn't compiled with -fPIC. Included is a
 new patch for blob's Makefile.in, which should go in files. Also
 included is a new patch for the ports Makefile, removing the BROKEN
 state for octave.
 
 Unfortunately I can only test this myself on amd64. Could someone
 confirm that this doesn't hurt on other platforms, especially i386?
 
 Roland
 --=20
 R.F. Smith                           /"\    ASCII Ribbon Campaign
 r s m i t h @ x s 4 a l l . n l      \ /    No HTML/RTF in email
 http://www.xs4all.nl/~rsmith/         X     No Word docs in email
                                      / \    Respect for open standards
 
 --+QahgC5+KEYLbs62
 Content-Type: text/plain; charset=us-ascii
 Content-Disposition: attachment; filename="patch-glob:makefile.in"
 Content-Transfer-Encoding: quoted-printable
 
 --- glob/Makefile.in.orig	Sat Dec  4 16:59:54 2004
 +++ glob/Makefile.in	Sat Dec  4 17:00:04 2004
 @@ -25,7 +25,7 @@
 =20
  CC =3D @CC@
  CPPFLAGS =3D @CPPFLAGS@
 -CFLAGS =3D @CFLAGS@
 +CFLAGS =3D @CFLAGS@ -fPIC
 =20
  # Information determined by configure.
  DEFS =3D @DEFS@
 
 --+QahgC5+KEYLbs62
 Content-Type: text/plain; charset=us-ascii
 Content-Disposition: attachment; filename="octave-makefile.patch"
 Content-Transfer-Encoding: quoted-printable
 
 --- Makefile.orig	Fri Dec  3 20:36:40 2004
 +++ Makefile	Sat Dec  4 16:57:35 2004
 @@ -23,10 +23,6 @@
 =20
  .include <bsd.port.pre.mk>
 =20
 -.if ${ARCH} =3D=3D "amd64"
 -BROKEN=3D		"Does not build on amd64 (Shared libraries must be compiled wit=
 h -fPIC)"
 -.endif
 -
  .if ${PORTOBJFORMAT} =3D=3D "elf"
  GNU_HOST=3D	${ARCH}-portbld-freebsd${OSREL}
  .else
 
 --+QahgC5+KEYLbs62--
 
 --TRYliJ5NKNqkz5bu
 Content-Type: application/pgp-signature
 Content-Disposition: inline
 
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1.2.6 (FreeBSD)
 
 iD8DBQFBse4KEnfvsMMhpyURAuMtAJ0akVnVxG8a/6xngzKy37Z/+wPTVACgnHhW
 MhTpQR5cIWKl6mUY+ejaSk4=
 =qk/E
 -----END PGP SIGNATURE-----
 
 --TRYliJ5NKNqkz5bu--

From: "David O'Brien" <obrien@FreeBSD.org>
To: Roland Smith <rsmith@xs4all.nl>
Cc: FreeBSD-gnats-submit@FreeBSD.org
Subject: Re: amd64/74669: The port math/octave is marked BROKEN on amd64
Date: Sat, 4 Dec 2004 13:59:26 -0800

 On Sat, Dec 04, 2004 at 02:54:23PM +0100, Roland Smith wrote:
 >  post-install:
 > +.if ${ARCH} != "amd64"
 >  	${RM} ${PREFIX}/bin/octave
 >  	@${CP} ${FILESDIR}/octave ${WRKDIR}
 >  	@${REINPLACE_CMD} -e 's,%%PREFIX%%,${PREFIX},g ; \
 >  			      s,%%OCTAVE_VERSION%%,${OCTAVE_VERSION},g' \
 >  			      ${WRKDIR}/octave
 >  	${INSTALL_SCRIPT} ${WRKDIR}/octave ${PREFIX}/bin
 > +.endif
 
 Why does building statically vs. dynamically require this change?
 
 -- 
 -- David  (obrien@FreeBSD.org)
Responsible-Changed-From-To: freebsd-amd64->freebsd-ports-bugs 
Responsible-Changed-By: ceri 
Responsible-Changed-When: Mon Dec 6 13:14:49 GMT 2004 
Responsible-Changed-Why:  
This is a ports PR. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=74669 
State-Changed-From-To: open->feedback 
State-Changed-By: vs 
State-Changed-When: Sun Dec 12 11:10:28 GMT 2004 
State-Changed-Why:  
David is waiting for feedback 

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

From: Roland Smith <rsmith@xs4all.nl>
To: freebsd-gnats-submit@freebsd.org
Cc:  
Subject: Re: amd64/74669: The port math/octave is marked BROKEN on amd64
Date: Sun, 12 Dec 2004 13:31:29 +0100

 --pWyiEgJYm5f9v55/
 Content-Type: text/plain; charset=us-ascii
 Content-Disposition: inline
 Content-Transfer-Encoding: quoted-printable
 
 I sent the following to David, but I forgot to Cc gnats. :-(
 
 ----- Forwarded message from Roland Smith <rsmith@xs4all.nl> -----
 
 Date: Sat, 4 Dec 2004 23:27:51 +0100
 From: Roland Smith <rsmith@xs4all.nl>
 Organization: Me, organized?
 To: David O'Brien <obrien@FreeBSD.org>
 Subject: Re: amd64/74669: The port math/octave is marked BROKEN on amd64
 
 On Sat, Dec 04, 2004 at 01:59:26PM -0800, David O'Brien wrote:
 > On Sat, Dec 04, 2004 at 02:54:23PM +0100, Roland Smith wrote:
 > >  post-install:
 > > +.if ${ARCH} !=3D "amd64"
 > >  	${RM} ${PREFIX}/bin/octave
 > >  	@${CP} ${FILESDIR}/octave ${WRKDIR}
 > >  	@${REINPLACE_CMD} -e 's,%%PREFIX%%,${PREFIX},g ; \
 > >  			      s,%%OCTAVE_VERSION%%,${OCTAVE_VERSION},g' \
 > >  			      ${WRKDIR}/octave
 > >  	${INSTALL_SCRIPT} ${WRKDIR}/octave ${PREFIX}/bin
 > > +.endif
 >=20
 > Why does building statically vs. dynamically require this change?
 
 It is not so much a question of it being required, but this replacement
 of the octave link by a script that defines the shared library location
 isn't necessary when there are no shared libraries to load. :-)
 
 Meanwhile I've traced the compile problem to the libglob that is
 included with octave. See my second mail in the PR audit trail for a
 different and IMHO better fix.
 
 Roland
 --=20
 R.F. Smith                           /"\    ASCII Ribbon Campaign
 r s m i t h @ x s 4 a l l . n l      \ /    No HTML/RTF in email
 http://www.xs4all.nl/~rsmith/         X     No Word docs in email
                                      / \    Respect for open standards
 
 
 
 ----- End forwarded message -----
 
 --=20
 R.F. Smith                           /"\    ASCII Ribbon Campaign
 r s m i t h @ x s 4 a l l . n l      \ /    No HTML/RTF in email
 http://www.xs4all.nl/~rsmith/         X     No Word docs in email
                                      / \    Respect for open standards
 
 --pWyiEgJYm5f9v55/
 Content-Type: application/pgp-signature
 Content-Disposition: inline
 
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1.2.6 (FreeBSD)
 
 iD8DBQFBvDohEnfvsMMhpyURAicJAJwMsgjr4EVNdMOoi6LlImcUID6axgCfXCY+
 pFakCN15MXsbMFHC81qylRY=
 =zxiN
 -----END PGP SIGNATURE-----
 
 --pWyiEgJYm5f9v55/--
State-Changed-From-To: feedback->closed 
State-Changed-By: sem 
State-Changed-When: Thu Feb 10 07:47:00 GMT 2005 
State-Changed-Why:  
Committed, thanks! 

http://www.freebsd.org/cgi/query-pr.cgi?pr=74669 
>Unformatted:
 >System: FreeBSD slackbox.xs4all.nl 5.3-RELEASE FreeBSD 5.3-RELEASE #8: Wed Dec 1 22:24:03 CET 2004 rsmith@slackbox.xs4all.nl:/usr/src/sys/amd64/compile/RFS_1 amd64
 
