Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 21 Jul 2003 13:45:38 +0200
From:      Simon Barner <barner@in.tum.de>
To:        "Sergey A. Osokin" <osa@FreeBSD.org>
Cc:        ports@FreeBSD.org
Subject:   Re: Fixing gcc 3.3 compile failures -- fix for math/freefem
Message-ID:  <20030721114538.GA4686@zi025.glhnet.mhn.de>
In-Reply-To: <20030721081342.GP1413@freebsd.org.ru>
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>

next in thread | previous in thread | raw e-mail | index | archive | help

--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--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20030721114538.GA4686>