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

[netCDF #VGO-121371]: Compilation error



No, I was not clear. When I say " build", I mean
do whatever commands you did that failed.


> In your instruction step 2, did you mean to rebuild the netCDF through 
> macport? Thanks.
> Sorry, I have been away from office for these days. I will try it on Monday .
> Yuanfu
> On Sunday, April 1, 2018, 1:32:47 AM GMT+8, Unidata netCDF Support 
> <address@hidden> wrote:
> 
> Have you made any progress on this?
> 
> > Ok, the fact that the 'as --version' failed, indicates
> > that you have a bad version of 'as'. It should have produced
> > something like this.
> > > as --version
> > > GNU assembler (GNU Binutils) 2.29.1.20171006
> > ...
> >
> > So, I think you need to try this.
> > 1. mv /opt/local/bin/../libexec/as/x86_64/as 
> > /opt/local/bin/../libexec/as/x86_64/as.save
> > - this will temporarily hide that particular 'as' program
> > 2. try to rebuild again and see what kind of complaints you get from
> > gcc and/or gfortran.
> > 3. mv /opt/local/bin/../libexec/as/x86_64/as.save 
> > /opt/local/bin/../libexec/as/x86_64/as
> > - restore the as program for now.
> > Note that it might be that the as program is actually called as.exe
> > in which case the mv commands need to use that name
> >
> >
> > > Hello,
> > > Following your instructions, here is the outputs of these commands 
> > > (attached). Please advise what to do next. Can you recommend a version of 
> > > "as" program I can update?
> > > Thank you so much.
> > > Yuanfu
> > > xieyuanfudeiMac:test_ncarg xieyuanfu$ 
> > > /opt/local/bin/../libexec/as/x86_64/as --help
> > >
> > > FATAL:/opt/local/bin/../libexec/as/x86_64/as: I don't understand '-' flag!
> > >
> > > xieyuanfudeiMac:test_ncarg xieyuanfu$ 
> > > /opt/local/bin/../libexec/as/x86_64/as --version
> > >
> > > FATAL:/opt/local/bin/../libexec/as/x86_64/as: I don't understand '-' flag!
> > >
> > > xieyuanfudeiMac:test_ncarg xieyuanfu$ gfortran --version
> > >
> > > GNU Fortran (GCC) 6.3.0
> > >
> > > Copyright (C) 2016 Free Software Foundation, Inc.
> > >
> > > This is free software; see the source for copying conditions.  There is NO
> > >
> > > warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR 
> > > PURPOSE.
> > >
> > > On Tuesday, March 27, 2018, 12:15:18 PM GMT+8, Unidata netCDF Support 
> > > <address@hidden> wrote:
> > >
> > > 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.
> > >
> > >
> > >
> > >
> >
> > =Dennis Heimbigner
> > Unidata
> >
> 
> =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.
> 
> 
> 
> 

=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.