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

Re: 20011213: gcc-2.96 assembler error compiling netcdf-3.5.0



>From: "Christopher A. Jeffery" <address@hidden>
>Subject: gcc assembler error
>Organization: LANL
>Keywords: 200112132230.fBDMUpN28079 netCDF gcc-2.96

Hi Chris,

> I'm having trouble compiling netcdf-3.5.0 with
> optimization using gcc-2.96

Where did you get gcc-2.96, and for what platform?  The official list
of GCC releases don't mention any version 2.96:

 http://gcc.gnu.org/releases.html

so we don't have it available for testing.  We can test with
gcc-2.95.3 and gcc-3.0.2.

> With the -O flag I get the following error:
> 
>/usr/bin/g++ -c -O -I../libsrc -I.  -DNDEBUG netcdf.cpp
>/tmp/ccANFxVc.s: Assembler messages:
>/tmp/ccANFxVc.s:1585: Warning: Unrecognized .section attribute: want
>a,w,x
>/tmp/ccANFxVc.s:1585: Warning: Unrecognized .section attribute: want
>a,w,x
>/tmp/ccANFxVc.s:1585: Error: Rest of line ignored. First ignored
>character
>is `,'.
>/tmp/ccANFxVc.s:10016: Warning: Unrecognized .section attribute: want
>a,w,x
>/tmp/ccANFxVc.s:10016: Warning: Unrecognized .section attribute: want
>a,w,x
>/tmp/ccANFxVc.s:10016: Error: Rest of line ignored. First ignored
>character is `,'.
>make[2]: *** [netcdf.o] Error 1
>make[2]: Leaving directory `/nh/toaster/u/cjeffery/netcdf-3.5.0/src/cxx'
>make[1]: *** [subdir_target] Error 1
>make[1]: Leaving directory `/nh/toaster/u/cjeffery/netcdf-3.5.0/src'
>make: *** [cxx/all] Error 2

With gcc-2.95.3 using -O, I get no such error.  This is on a Solaris 8
platform using the following environment settings:

 CC=gcc
 CPPFLAGS='-Df2cFortran -DNDEBUG'
 CFLAGS=-O
 FC=g77
 FFLAGS='-O -w'
 F90=''
 CXX=g++

With these, everything compiles and all the tests succeed.
 
> I get the same error trying to compile c code and not c++ code.
> 
> However, the error dissappears if I turn off optimization:
> 
>Making `all' in directory /n/toaster/u/cjeffery/netcdf-3.5.0/src/cxx
>
>make[2]: Entering directory `/nh/toaster/u/cjeffery/netcdf-3.5.0/src/cxx'
>/usr/bin/g++ -c  -I../libsrc -I.  -DNDEBUG netcdf.cpp
>/usr/bin/g++ -c  -I../libsrc -I.  -DNDEBUG ncvalues.cpp
> 
> Is there a flag I can use to remove this problem?

It looks as if gcc-2.96 may not be ready for production use yet ...
The flags we have successfully built netCDF with for various platforms
and compilers are in:

 http://www.unidata.ucar.edu/packages/netcdf/INSTALL.html

--Russ