From owner-freebsd-current@FreeBSD.ORG Fri Dec 13 11:42:03 2013 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 884C5F55; Fri, 13 Dec 2013 11:42:03 +0000 (UTC) Received: from mail-wg0-x22c.google.com (mail-wg0-x22c.google.com [IPv6:2a00:1450:400c:c00::22c]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 991521FC6; Fri, 13 Dec 2013 11:42:02 +0000 (UTC) Received: by mail-wg0-f44.google.com with SMTP id a1so1716642wgh.23 for ; Fri, 13 Dec 2013 03:42:01 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:date:from:to:cc:subject:message-id:references:mime-version :content-type:content-disposition:in-reply-to:user-agent; bh=n2M/86lf/mj1oyoTWdJHoRyqhZo4BEwEWaUU0ps7gWs=; b=Kmwca1znoiUBR8yMLs54RI+rRJsXZrpfNOc/cSpCNXa2zeIYST0V5hNEIbAI+MT0KL NWtq9NrdlkBVBceIk47VR6EHDxda2YXamClHHmM5RjJeB45AVp7IZCpSqGkekfKcRmhX zyD2ecxoyhJZKAVjjdVP7bomIhrhiJ9mgcMXjscKb8cMXPe/pI1JknRs2qJiAIK9Ce2v FnIoW8mjASVOHaQAxcHD7yUFz98evvLfi9RNU5mNU4wk28+DxHfppVkbGHX760zYVYLx EWyfU8pje3PwZlUF9AP5NL9eQORfwYarKWrMX1d5ahOx2dws2ZAhiVcRDfiE03gBv9RU l2/Q== X-Received: by 10.180.10.74 with SMTP id g10mr2138939wib.11.1386934921016; Fri, 13 Dec 2013 03:42:01 -0800 (PST) Received: from ithaqua.etoilebsd.net (ithaqua.etoilebsd.net. [37.59.37.188]) by mx.google.com with ESMTPSA id cx3sm13987793wib.0.2013.12.13.03.41.55 for (version=TLSv1 cipher=RC4-SHA bits=128/128); Fri, 13 Dec 2013 03:41:59 -0800 (PST) Sender: Baptiste Daroussin Date: Fri, 13 Dec 2013 12:41:52 +0100 From: Baptiste Daroussin To: Tijl Coosemans Subject: Re: libc++ vs. libstdc++ usage in the ports tree Message-ID: <20131213114152.GA57153@ithaqua.etoilebsd.net> References: <20131112201922.GA4330@troutmask.apl.washington.edu> <20131113173143.Horde.a-9M7JQ_vHo3tpDIMsGK6g1@webmail.df.eu> <5283CA3C.3080201@FreeBSD.org> <352D9465-9840-43F0-A3A9-327DC12B0967@FreeBSD.org> <20131114144555.GA22093@troutmask.apl.washington.edu> <52963A90.4000201@janh.de> <20131127204556.2974a3f5@kalimero.tijl.coosemans.org> <20131201150640.12ea18c8@kalimero.tijl.coosemans.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="huq684BweRXVnRxX" Content-Disposition: inline In-Reply-To: <20131201150640.12ea18c8@kalimero.tijl.coosemans.org> User-Agent: Mutt/1.5.21 (2010-09-15) Cc: Maho Nakata , Jan Henrik Sylvester , FreeBSD Current , stephen@FreeBSD.org, Steve Kargl X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 13 Dec 2013 11:42:03 -0000 --huq684BweRXVnRxX Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Please commit (Approved by: portmgr(bapt)) if needed regards, Bapt On Sun, Dec 01, 2013 at 03:06:40PM +0100, Tijl Coosemans wrote: > On Wed, 27 Nov 2013 20:45:56 +0100 Tijl Coosemans wrote: > > On Wed, 27 Nov 2013 19:31:44 +0100 Jan Henrik Sylvester wrote: > >> Trying to migrate to 10, I would like to keep octave. Have you found > >> anything new? Having build the port and all dependencies with standard > >> options, octave is segfaulting for me, too. Anyhow, I can run octave w= ith: > >>=20 > >> env LD_PRELOAD=3D/usr/lib/libc++.so.1 octave > >>=20 > >> Some very light testing indicates that it is working. Of course, this = is > >> not ideal. > >>=20 > >> Maybe this gives a clue how to fix the octave port properly. > >=20 > > I have a preliminary patch for math/octave that I wanted to test on > > redports first, but it is down at the moment so here it is. >=20 > The tests were successful: > https://redports.org/buildarchive/20131201105316-94935/ (octave) > https://redports.org/buildarchive/20131201115701-22333/ (octave-forge-bas= e) > The octave logs also contain the results of running the regression-test > target. The output is the same on all FreeBSD versions. >=20 > The problem is that USE_FORTRAN=3Dyes implies USE_GCC=3Dyes. This means > the C++ code in math/octave is compiled with gcc46/libstdc++ which > does not work if dependencies have been built with clang/libc++. >=20 > The patch copies the USE_FORTRAN=3Dyes logic from Mk/bsd.gcc.mk into a > new file Mk/Uses/fortran.mk. It allows ports to use a Fortran compiler > together with the base system C/C++ compiler. > Index: math/octave/Makefile > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D > --- math/octave/Makefile (revision 335379) > +++ math/octave/Makefile (working copy) > @@ -3,7 +3,7 @@ > =20 > PORTNAME=3D octave > PORTVERSION=3D 3.6.4 > -PORTREVISION=3D 6 > +PORTREVISION=3D 7 > CATEGORIES=3D math > MASTER_SITES=3D ftp://ftp.gnu.org/gnu/octave/ \ > ftp://ftp.u-aizu.ac.jp/pub/SciEng/numanal/Octave/bleeding-edge/ > @@ -32,7 +32,7 @@ LIB_DEPENDS=3D GraphicsMagick:${PORTSDIR}/ > umfpack.1:${PORTSDIR}/math/suitesparse \ > glpk:${PORTSDIR}/math/glpk > =20 > -USES=3D charsetfix gmake perl5 pkgconfig > +USES=3D charsetfix fortran gmake perl5 pkgconfig > USE_BZIP2=3D yes > USE_PERL5=3D build > USE_TEX=3D dvipsk:build > @@ -74,8 +74,6 @@ BLAS=3D -lptf77blas > LAPACK=3D -lalapack -lptcblas > .endif > =20 > -USE_FORTRAN=3D yes > - > OCTAVE_VERSION=3D ${PORTVERSION} > GNU_HOST=3D ${ARCH}-portbld-freebsd${OSREL} > PLIST_SUB=3D OCTAVE_VERSION=3D${OCTAVE_VERSION} GNU_HOST=3D${GNU_HOST} > @@ -140,7 +138,8 @@ post-install: > ${ECHO_CMD} @dirrm share/octave >> ${WRKDIR}/PLIST > cd ${WRKDIR} ; ${SED} -i -e "/PLIST/ r PLIST" ${TMPPLIST} > =20 > -check: > +check: regression-test > +regression-test: build > (cd ${WRKSRC}; ${SETENV} ${MAKE_ENV} ${GMAKE} ${MAKE_ARGS} check) > =20 > .include > Index: math/octave/files/patch-configure > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D > --- math/octave/files/patch-configure (revision 0) > +++ math/octave/files/patch-configure (working copy) > @@ -0,0 +1,11 @@ > +--- configure.orig 2013-02-21 21:21:49.000000000 +0100 > ++++ configure 2013-11-22 20:34:49.000000000 +0100 > +@@ -58248,7 +58248,7 @@ > + main () > + { > +=20 > +- std::unordered_map m; > ++ std::unordered_map m; > +=20 > + ; > + return 0; >=20 > Property changes on: math/octave/files/patch-configure > ___________________________________________________________________ > Added: fbsd:nokeywords > ## -0,0 +1 ## > +yes > \ No newline at end of property > Added: svn:eol-style > ## -0,0 +1 ## > +native > \ No newline at end of property > Added: svn:mime-type > ## -0,0 +1 ## > +text/plain > \ No newline at end of property > Index: math/octave/files/patch-libgnu-math.in.h > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D > --- math/octave/files/patch-libgnu-math.in.h (revision 0) > +++ math/octave/files/patch-libgnu-math.in.h (working copy) > @@ -0,0 +1,11 @@ > +--- libgnu/math.in.h.orig 2013-02-21 21:21:17.000000000 +0100 > ++++ libgnu/math.in.h 2013-11-22 12:35:47.000000000 +0100 > +@@ -17,7 +17,7 @@ > + You should have received a copy of the GNU General Public License > + along with this program. If not, see = =2E */ > +=20 > +-#ifndef _@GUARD_PREFIX@_MATH_H > ++#if 1 > +=20 > + #if __GNUC__ >=3D 3 > + @PRAGMA_SYSTEM_HEADER@ >=20 > Property changes on: math/octave/files/patch-libgnu-math.in.h > ___________________________________________________________________ > Added: svn:mime-type > ## -0,0 +1 ## > +text/plain > \ No newline at end of property > Added: fbsd:nokeywords > ## -0,0 +1 ## > +yes > \ No newline at end of property > Added: svn:eol-style > ## -0,0 +1 ## > +native > \ No newline at end of property > Index: math/octave/files/patch-liboctave-eigs-base.cc > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D > --- math/octave/files/patch-liboctave-eigs-base.cc (revision 0) > +++ math/octave/files/patch-liboctave-eigs-base.cc (working copy) > @@ -0,0 +1,11 @@ > +--- liboctave/eigs-base.cc.orig 2013-02-21 21:19:24.000000000 +0100 > ++++ liboctave/eigs-base.cc 2013-11-22 20:19:19.000000000 +0100 > +@@ -3832,7 +3832,7 @@ > + bool cholB =3D 0, int disp =3D 0, int maxi= t =3D 300); > + #endif > +=20 > +-#ifndef _MSC_VER > ++#if !defined(_MSC_VER) && !defined(__clang__) > + template static octave_idx_type > + lusolve (const SparseMatrix&, const SparseMatrix&, Matrix&); > +=20 >=20 > Property changes on: math/octave/files/patch-liboctave-eigs-base.cc > ___________________________________________________________________ > Added: svn:mime-type > ## -0,0 +1 ## > +text/plain > \ No newline at end of property > Added: fbsd:nokeywords > ## -0,0 +1 ## > +yes > \ No newline at end of property > Added: svn:eol-style > ## -0,0 +1 ## > +native > \ No newline at end of property > Index: Mk/Uses/fortran.mk > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D > --- Mk/Uses/fortran.mk (revision 0) > +++ Mk/Uses/fortran.mk (working copy) > @@ -0,0 +1,32 @@ > +# $FreeBSD$ > +# > +# Establish Fortran-capable compiler as a build dependency > +# > +# MAINTAINER: ports@FreeBSD.org > +# > +# Feature: fortran > +# Usage: USES=3Dfortran > +# Valid ARGS: does not require args > + > +.if !defined(_INCLUDE_USES_FORTRAN_MK) > +_INCLUDE_USES_FORTRAN_MK=3D yes > + > +.if defined(fortran_ARGS) > +IGNORE=3D USES=3Dfortran does not require args > +.endif > + > +.if !defined(FC) > +BUILD_DEPENDS+=3D gfortran46:${PORTSDIR}/lang/gcc > +RUN_DEPENDS+=3D gfortran46:${PORTSDIR}/lang/gcc > + > +USE_BINUTILS=3D yes > + > +FC=3D gfortran46 > +FFLAGS+=3D -Wl,-rpath=3D${LOCALBASE}/lib/gcc46 > +LDFLAGS+=3D -Wl,-rpath=3D${LOCALBASE}/lib/gcc46 > +.endif > + > +CONFIGURE_ENV+=3D F77=3D"${FC}" FC=3D"${FC}" FFLAGS=3D"${FFLAGS}" > +MAKE_ENV+=3D F77=3D"${FC}" FC=3D"${FC}" FFLAGS=3D"${FFLAGS}" > + > +.endif >=20 > Property changes on: Mk/Uses/fortran.mk > ___________________________________________________________________ > Added: svn:eol-style > ## -0,0 +1 ## > +native > \ No newline at end of property > Added: svn:mime-type > ## -0,0 +1 ## > +text/plain > \ No newline at end of property > Added: svn:keywords > ## -0,0 +1 ## > +FreeBSD=3D%H > \ No newline at end of property --huq684BweRXVnRxX Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.15 (FreeBSD) iEUEARECAAYFAlKq8oAACgkQ8kTtMUmk6Ey18ACYnduqHLcGi/gUL5/2L49hxjIB +wCfVJEE7/HsoOU1qOIqa67FhZ3sNXQ= =9jOT -----END PGP SIGNATURE----- --huq684BweRXVnRxX--