[Insight-developers] Once more with feeling: GCC 3, Implicit Template Instantion Issues

Kent Williams norman-k-williams@uiowa.edu
Thu, 13 Mar 2003 16:46:35 -0600


Here's the compiler:
% gcc -dumpmachine
i686-pc-linux-gnu
% gcc --version
gcc (GCC) 3.2.2
Copyright (C) 2002 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is N=
O
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOS=
E.

This is my build of the lastest gcc3, which I need to double check for co=
mpile=20
errors before checkin -- the default on my box is 2.96 ...

During the VXL configure, it says

checking whether the C++ compiler instantiates templates implicitly... no
Warning: turning off implicit template instantiation

Which in turn turns ON some stuff in the vnl template library, that Gcc3=20
doesn't like:

Building object file Templates/vnl_matrix+double-.o...
/home/scratch/kent/work/build/Remote_CVS/Insight/Utilities/vxl/vnl/Templa=
tes/vnl_matrix+double-.cxx:2:=20
non-template
   used as template

The problem is that GCC3 doesn't need explicit instantiation of the templ=
ate=20
functions, yet the configure script test for this fails.

We ran into this on Cygwin around the time of the developer's conference =
in=20
Philadelphia, and until this latest re-configuration of VXL gcc3 wasn't a=
=20
problem.  Have I done something wrong, or did the configuration problems=20
creep back in?