Scheduled Downtime
On Tuesday 24 October 2023 @ 5pm MT the forums will be in read only mode in preparation for the downtime. On Wednesday 25 October 2023 @ 5am MT, this website will be down for maintenance and expected to return online later in the morning.
Normal Operations
The forums are back online with normal operations. If you notice any issues or errors related to the forums, please reach out to help@ucar.edu

Compiling SCAM using gcc 3.4.2 on Fedora Core 3

Greetings,

I have successfully compiled SCAM (version 3.0) in the past on a Linux machine running Redhat 9 with the following compilers and versions:

pgf77 and pgf90 version 5.2
gcc version 3.2.2

I recently upgraded to Fedora Core 3 (gcc version 3.4.2, PGI version 5.2) and am now getting an error when I try to compile SCAM (error text attached to the end of this message). The offending file is ncfile.h in the scam/ui/ directory, lines 657, 671, 685, and 699.

Has anyone compiled SCAM using gcc 3.4.2?

Thanks,

--Derek

-------------------------
In file included from model.h:9,
from manager.h:15,
from plot.h:18,
from ChangeAxisScaleDlgImpl.h:5,
from ChangeAxisScaleDlgImpl.moc.cpp:11:
ncfile.h: In member function `void ncfile::NcVariable::operator*=(const T&)':ncfile.h:657: error: `v' undeclared (first use this function)
ncfile.h:657: error: (Each undeclared identifier is reported only once for each function it appears in.)
ncfile.h: In member function `void ncfile::NcVariable::operator/=(const T&)':ncfile.h:671: error: `v' undeclared (first use this function)
ncfile.h: In member function `void ncfile::NcVariable::operator+=(const T&)':ncfile.h:685: error: `v' undeclared (first use this function)
ncfile.h: In member function `void ncfile::NcVariable::operator-=(const T&)':ncfile.h:699: error: `v' undeclared (first use this function)
gmake[1]: *** [ChangeAxisScaleDlgImpl.moc.o] Error 1
gmake[1]: Leaving directory `/home/derek/CAM3/cam1/models/atm/cam/tools/scam/ui'gmake: *** [all] Error 2
----------------------------
 
Since I last posted, I downloaded and compiled the gcc 3.2.2 compiler (along with g77, g++, and associated libraries). After recompiling netcdf and ncar graphics using gcc 3.2.2 and PGI, scam appears to work normally (including all graphic interfaces).

Bottom line: the problem appears to be an incompatibility between the SCAM c-code and the gcc 3.4.2 compiler. If anyone else notices this problem, or has resolved it using the 3.4.2 version of gcc I would appreciate any further information.
 
Top