Re: [netcdfgroup] Sun Studio compiler on GNU/Linux

Thomas Orgis <thomas.orgis@xxxxxx> writes:

> Hi folks...
>
> it's me again with a Sun-compiler-related topic. I want to debug issues I 
> have with the compiler (flatly makes my OpenMP code crash:-( ) on Solaris by 
> building my stuff using Sun Studio 12.1 on a GNU/Linux system, just to see if 
> there is a difference.
> Now, NetCDF does not like this combination of compiler / operating system 
> apparently. The 4.1-beta2 snapshot as well as the 4.0.1 release give me:
>
> "cfortran.h:", line 138: #error: "cfortran.h: Can't find your
> environment among: ..."

This occurs when the netCDF configure script can't figure out what kind
of fortran compiler you are using. The solution is to set CPPFLAGS to
-DpgiFortran, or -Df2cFortran (but not both at the same time) and rerun
configure.

>
> So there is some hardcoding of compiler / system variants in NetCDF
> that is broken by the combination of Sun Studio 12.1 and GNU/Linux I
> have here. I found traces on the net that people managed to build
> NetCDF on such a setup though... but no definitive info on how they
> achieved that.  Is there someone on the list who did this already?
> Perhaps I just miss some env setup?
>

It should work just fine, once you find the magic CPPFLAGS setting for
that compiler.

I don't know which one your compilers want in your circumstances, but
either pgiFortran or f2cFortran should work. Make sure you run make
check afterwards to be sure.

Good luck,

Ed

-- 
Ed Hartnett  -- ed@xxxxxxxxxxxxxxxx



  • 2010 messages navigation, sorted by:
    1. Thread
    2. Subject
    3. Author
    4. Date
    5. ↑ Table Of Contents
  • Search the netcdfgroup archives: