From owner-freebsd-ports@FreeBSD.ORG Mon Jul 21 04:45:41 2003 Return-Path: Delivered-To: freebsd-ports@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id BD90937B401; Mon, 21 Jul 2003 04:45:41 -0700 (PDT) Received: from mailout.informatik.tu-muenchen.de (mailout.informatik.tu-muenchen.de [131.159.0.5]) by mx1.FreeBSD.org (Postfix) with ESMTP id D646A43F3F; Mon, 21 Jul 2003 04:45:40 -0700 (PDT) (envelope-from barner@in.tum.de) Received: by zi025.glhnet.mhn.de (Postfix, from userid 1000) id 22BBE38821; Mon, 21 Jul 2003 13:45:38 +0200 (CEST) Date: Mon, 21 Jul 2003 13:45:38 +0200 From: Simon Barner To: "Sergey A. Osokin" Message-ID: <20030721114538.GA4686@zi025.glhnet.mhn.de> References: <20030718025200.GA36893@rot13.obsecurity.org> <20030719030539.GB467@zi025.glhnet.mhn.de> <20030719190500.GA19808@hellblazer.celabo.org> <20030720224840.GA731@zi025.glhnet.mhn.de> <20030721081342.GP1413@freebsd.org.ru> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="ghzN8eJ9Qlbqn3iT" Content-Disposition: inline In-Reply-To: <20030721081342.GP1413@freebsd.org.ru> User-Agent: Mutt/1.5.4i X-Virus-Scanned: by amavisd-new at informatik.tu-muenchen.de cc: ports@FreeBSD.org Subject: Re: Fixing gcc 3.3 compile failures -- fix for math/freefem X-BeenThere: freebsd-ports@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Porting software to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 21 Jul 2003 11:45:42 -0000 --ghzN8eJ9Qlbqn3iT Content-Type: multipart/mixed; boundary="oC1+HKm2/end4ao3" Content-Disposition: inline --oC1+HKm2/end4ao3 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable > Can't compile freefem-3.5.7 with gcc-2.95.4 under RELENG_4, > any idea? >=20 > source=3D'femParser.cpp' object=3D'femParser.lo' libtool=3Dyes depfile= =3D'.deps/femParser.Plo' tmpdepfile=3D'.deps/femParser.TPlo' depmode=3Dgcc= /bin/sh ../../admin/depcomp /bin/sh ../../libtool --mode=3Dcompile c++ -D= HAVE_CONFIG_H -I. -I. -I../.. -Wall -O -pipe -fforce-mem -fforce-ad= dr -fomit-frame-pointer -I/usr/X11R6/include -c -o femParser.lo `test -f '= femParser.cpp' || echo './'`femParser.cpp > rm -f .libs/femParser.lo > c++ -DHAVE_CONFIG_H -I. -I. -I../.. -Wall -O -pipe -fforce-mem -fforce-ad= dr -fomit-frame-pointer -I/usr/X11R6/include -c femParser.cpp -Wp,-MD,.deps= /femParser.TPlo -fPIC -DPIC -o .libs/femParser.lo > c++ -DHAVE_CONFIG_H -I. -I. -I../.. -Wall -O -pipe -fforce-mem -fforce-ad= dr -fomit-frame-pointer -I/usr/X11R6/include -c femParser.cpp -Wp,-MD,.deps= /femParser.TPlo -o femParser.o >/dev/null 2>&1 > *** Error code 1 > Stop in /usr/home/osa/src/freefem/work/freefem-3.5.7/freefem/fem. > *** Error code 1 Oh no, this port turns out to be a never ending story... There was an internal compiler error in gcc-2.95.4 with femParser.cpp. Since that version of gcc is no longer maintained, I think a workaround for this problem is enough. Fortunately, I was able to fix the problem by introducing a temporary variable (patch attached). Cheers, Simon =20 P.S.: Also tested with gcc 3.3.1! --oC1+HKm2/end4ao3 Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename="patch-freefem::fem::femParser.cpp" Content-Transfer-Encoding: quoted-printable --- freefem/fem/femParser.cpp.orig Thu Oct 25 00:49:36 2001 +++ freefem/fem/femParser.cpp Mon Jul 21 13:32:54 2003 @@ -2913,7 +2913,10 @@ for( k =3D0; k<3*__mesh.getNumberOfCells();k++) (s->name)->= table[k] =3D 0; } else - { (s->name)->table =3D new creal[__mesh.getNumberOfPoints()= ]; + { // This is in order to avoid an internal compiler error + // with gcc 2.95.4 (FreeBSD)=20 + int n =3D __mesh.getNumberOfPoints(); + (s->name)->table =3D new creal[n]; for( k =3D0; k<__mesh.getNumberOfPoints();k++) (s->name)->t= able[k] =3D 0; } } --oC1+HKm2/end4ao3-- --ghzN8eJ9Qlbqn3iT Content-Type: application/pgp-signature; name="signature.asc" Content-Description: Digital signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.2 (FreeBSD) iD8DBQE/G9JiCkn+/eutqCoRAspEAJ4z94IUIoqAWbVGgWbq9RMMtcEEvQCgteYz 7Rj5ZnrMyTOt6/56dX1F3Ro= =JSkE -----END PGP SIGNATURE----- --ghzN8eJ9Qlbqn3iT--