[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

20010809: netcdf-3.5.0 configure problem with gcc 3.0



Mike,

We aren't able to duplicate your problem because we don't yet have gcc
3.0 installed on any of our Linux systems.  When it's installed we'll
try your problem.

We did encounter one difficulty in executing the configure script when
using gcc 3.0, however.  It appears absolutely necessary to have the
pathname of the directory that contains the gcc 3.0 runtime libraries in
the LD_LIBRARY_PATH environment variable.  If this isn't done, then the
GNU C++ compiler will fail to pass the configure script's reality-check
(and rightfully so since every gcc 3.0-built program will fail).

We're surprised by the necessity for the "throw()" clause in the
declaration of the C exit() function because C functions can't throw
exceptions (that's a C++ construct) and the "extern C" clause should
have covered that issue. Could it be that your problem is also due to an
incomplete LD_LIBRARY_PATH environment variable? Would you be willing to
test this?

Regards,
Steve Emmerson   <http://www.unidata.ucar.edu>

> From: Mike Romberg <address@hidden>
> Subject: netcdf-3.5.0 build problem
> Organization: NOAA/FSL
> Keywords: 200108092258.f79Mwt111020 netCDF 3.5.0 gcc-3.0
> 
>   I've bumped into a small build problem with netcdf-3.5.0.  I'm
> building on a redhat linux 7.1 machine using gcc-3.0.  In addition to
> the gcc-3.0 C++ related problems other folks have reported, I have
> found that the code which tests the C++ compiler in the configure
> script, will not build with gcc-3.0.  The code in question is this
> bit:
> 
> #line 1230 "configure"
> #include "confdefs.h"
> #ifdef __cplusplus
> extern "C" void exit(int);
> #endif
> 
>                                 #include <iostream.h>
>                                 int main() {
>                                     cout << "";
>                                     return 0;
>                                 }
> 
>   The C++ compiler finds that exit is really defined to throw no
> exceptions.  When I rebuild the configure script using autoconf 2.13
> on my machine, it puts the following code in.  This works with gcc-3.0
> on a redhat 7.1 machine.
> 
> #line 907 "configure"
> #include "confdefs.h"
> #ifdef __cplusplus
> extern "C" void exit(int) throw();
> #endif
> 
>                                 #include <iostream.h>
>                                 int main() {
>                                     cout << "";
>                                     return 0;
>                                 }
> 
>   The funny thing is that it looks like you used autoconf 2.13 to make
> the original configure script.  So... It looks to me like configure
> may be looking at the system header files or something when it adds
> the exit() declaration.  Redhat 7.1 uses glibc 2.2.2 so maybe that is
> the thing which is causing the trouble. Anyway, I thought I'd bring it
> to your attention.
> 
> Mike Romberg (address@hidden)