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

[netCDF #VGO-121371]: Compilation error



You might try the following commands and report the resulting
output.
1. /opt/local/bin/../libexec/as/x86_64/as --help
2. /opt/local/bin/../libexec/as/x86_64/as --version
3. gfortran --version

When I did this, it looks to me that the -m flags
are actually -mXXXX, where XXX is additional -m information.
My guess is that what is really happening is that
gfortran is invoking 'as' with -mZZZZ and 'as' does not
recognize ZZZZ as a legal -m flag.
I suspect that you need to try and upgrade the 'as' program
to some later version to match the version of gfortran/gcc.

> Dear Ward,
> I used the following commands,
> gfortran -I/opt/local/include cdf_out.f90
> 
> gfortran -I/opt/local/include cdf_out.f90 -L/opt/local/lib -lnetcdf
> 
> gfortran -I/opt/local/include cdf_out.f90 -L/opt/local/lib -lnetcdff
> 
> All of these returns the same message,
> FATAL:/opt/local/bin/../libexec/as/x86_64/as: I don't understand 'm' flag!
> 
> After installing netcdf, my gcc even has the same problem. I guess there must 
> be some environmental variables changed.
> gcc tst.c 
> 
> FATAL:/opt/local/bin/../libexec/as/x86_64/as: I don't understand 'm' flag!
> 
> Here is my simple netcdf program:
> PROGRAM cdf_out
> 
>   
> 
>   USE netcdf
> 
> 
> 
> 
>   IMPLICIT NONE
> 
> 
> 
> 
> END PROGRAM cdf_out
> 
> Thank you so much in advance.
> Yuanfu
> On Wednesday, March 21, 2018, 12:51:40 AM GMT+8, Unidata netCDF Support 
> <address@hidden> wrote:
> 
> Hello,
> 
> My apologies for the delayed response!
> 
> When you use gfortran to link against the program, how exactly are you 
> invoking it?  It seems to be complaining about the 'm' flag, which may be 
> related to how the compiler is being invoked. 
> 
> If you can provide this information, and perhaps even the test program you 
> are using, I will try to duplicate your error and figure out what is causing 
> it.
> 
> Thank you,
> 
> -Ward
> 
> > Dear Colleague,
> >
> > I just installed netcdf on my new computer using MacPort. I have
> > run sudo port install netcdfsudo port install netcdf-fortran
> > After the installation, I tried to compile a simple program just have a
> > single statement of USE netcdf. It showed an error messageFATAL:
> > /opt/local/bin/../libexec/as/x86_64/as: I don't understand 'm' flag!
> >
> > I do not have any idea how to fix. Would you please give me some hint
> > what I can do to fix this? Thank you very much.
> >
> > By the way, I used gfortran compiler.
> >
> > Best regards,
> >
> > Yuanfu
> >
> >
> 
> 
> Ticket Details
> ===================
> Ticket ID: VGO-121371
> Department: Support netCDF
> Priority: High
> Status: Closed
> ===================
> NOTE: All email exchanges with Unidata User Support are recorded in the 
> Unidata inquiry tracking system and then made publicly available through the 
> web.  If you do not want to have your interactions made available in this 
> way, you must let us know in each email you send to us.
> 
> 
> 
> 

=Dennis Heimbigner
  Unidata


Ticket Details
===================
Ticket ID: VGO-121371
Department: Support netCDF
Priority: High
Status: Open
===================
NOTE: All email exchanges with Unidata User Support are recorded in the Unidata 
inquiry tracking system and then made publicly available through the web.  If 
you do not want to have your interactions made available in this way, you must 
let us know in each email you send to us.