> Hi Russ, > > I don't have problem installing C library with --disable-netcdf-4. And I > followed instructions at > http://www.unidata.ucar.edu/software/netcdf/docs/netcdf-fortran-install.html > > But still I get error for './configure --prefix=/usr/local' as below: > checking what FC is set to... gfortran > checking for special C compiler options needed for large files... no > checking for _FILE_OFFSET_BITS value needed for large files... no > configure: displaying some results > checking for /Applications/Xcode.app/Contents/Developer/usr/bin/nm... > /Applications/Xcode.app/Contents/Developer/usr/bin/nm > checking nm flags... > checking for C-equivalent to Fortran routine "SUB"... sub_ > checking for Fortran "byte"... yes > checking for Fortran "integer*2"... yes > checking if Fortran "byte" is C "signed char"... configure: error: Could not > link conftestf.o and conftest.o > > Any idea how to fix this? > Thank you! > Yanshi. There's not enough information to tell just looking at the error message above. The error message means a simple Fortran program compiled to conftestf.o can't be linked to a simple C program compiled into conftest.o, so that the Fortran program can call a function defined in the C program. If you look at config.log towards the end of the file, the Fortran and C programs being compiled are shown, when the error occurs. The extra error information in config.log may be helpful in diagnosing the problem. What I see in config.log, using compatible versions of gcc and gfortran, is ouput like this, indicating successful linking: configure:19027: checking if Fortran "byte" is C "signed char" configure:19037: gcc -c -I/usr/local/include -g -O2 conftest.c conftest.c: In function 'sub_': conftest.c:4:3: warning: incompatible implicit declaration of built-in function 'exit' configure:19040: $? = 0 configure:19043: gfortran -g -O0 -fno-inline -c conftestf.f configure:19046: $? = 0 configure:19049: gfortran -o conftest -g -O0 -fno-inline conftestf.o conftest.o configure:19052: $? = 0 configure:19055: ./conftest configure:19058: $? = 0 configure:19060: result: yes ... If you can't figure it out from looking at config.log, send the whole config.log file to us and we'll see if we can help, but it may take several days ... --Russ > On Mar 24, 2013, at 4:22 PM, Unidata netCDF Support > <address@hidden<mailto:address@hidden>> > wrote: > > Hi Yanshi, > > I am trying to install netCDF on my MACOS X 10.8.6. > I have installed the netCDF-184.108.40.206 without error by > > ./configure --disable-netcdf-4 > make > make check > make install > > However, I could not find the the netcdf.mod and typesizes.mod under > /usr/local/ > > The netCDF-220.127.116.11 package only installs the C library. To install the > Fortran netCDF libaries, > which have been in a separate distribution since C version 4.1.3, you need to > download the > Fortran distribution (either the stable release or the beta test) from here: > > http://www.unidata.ucar.edu/downloads/netcdf/netcdf-fortran/ > > and follow these instructions: > > http://www.unidata.ucar.edu/software/netcdf/docs/netcdf-fortran-install.html > > Alternatively, you could use the MacPorts system (see > www.macports.org<http://www.macports.org>) and have the full netCDF-4 > library installed, including netCDF-Fortran, using > > sudo port install netcdf-fortran > > Note, that may take a while, as it may also download and install compatible > versions of gcc and > gfortran ... > > --Russ > > So, I continued to install netCDF-fortran-4.2, and ./configure returns > â... > checking for Fortran "byte"... yes > checking for Fortran "integer*2"... yes > checking if Fortran "byte" is C "signed char"... configure: error: Could not > link conftestf.o and conftest.o > > Any idea how to fix this? > Thank you so much! > Yanshi. > > > Russ Rew UCAR Unidata Program > address@hidden<mailto:address@hidden> > http://www.unidata.ucar.edu > > > > Ticket Details > =================== > Ticket ID: FVK-122895 > Department: Support netCDF > Priority: Normal > Status: Closed > > > > > Russ Rew UCAR Unidata Program address@hidden http://www.unidata.ucar.edu Ticket Details =================== Ticket ID: FVK-122895 Department: Support netCDF Priority: Normal 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.