This archive contains answers to questions sent to Unidata support through mid-2025. Note that the archive is no longer being updated. We provide the archive for reference; many of the answers presented here remain technically correct, even if somewhat outdated. For the most up-to-date information on the use of NSF Unidata software and data services, please consult the Software Documentation first.
Carles, > it worked!! > > only using > > export CFLAGS="-m64" > export CXXFLAGS="-m64" > > Then after installing the libraries I get what follows (below). Also I > did "make check" and all seems correct. Is there something else I > should check to be sure all is correctly installed? That's all you need. I'm glad we helped get it working for you. > Many thanks for your assistance! Your welcome --Russ > Sincerely, > > Carles > > +-------------------------------------------------------------+ > | Congratulations! You have successfully installed netCDF! | > | | > | You can use script "nc-config" to find out the relevant | > | compiler options to build your application. Enter | > | | > | nc-config --help | > | | > | for additional information. | > | | > | CAUTION: | > | | > | If you have not already run "make check", then we strongly | > | recommend you do so. It does not take very long. | > | | > | Before using netCDF to store important data, test your | > | build with "make check". | > | | > | NetCDF is tested nightly on many platforms at Unidata | > | but your platform is probably different in some ways. | > | | > | If any tests fail, please see the netCDF web site: | > | http://www.unidata.ucar.edu/software/netcdf/ | > | | > | NetCDF is developed and maintained at the Unidata Program | > | Center. Unidata provides a broad array of data and software | > | tools for use in geoscience education and research. | > | http://www.unidata.ucar.edu | > +-------------------------------------------------------------+ > > > > > On Jul 22, 2009, at 2:00 PM, Unidata netCDF Support wrote: > > > Carles, > > > >> here is the output > >> > >> file conftest.o conftestf.o > >> > >> conftest.o: Mach-O object i386 > >> conftestf.o: Mach-O 64-bit object x86_64 > >> > >> what do you think? > > > > That shows your C compiler is generating 32-bit objects but your > > Fortran compiler is generating 64-bit objects, and > > these are incompatible for linking together to build a program. > > > > You must either > > > > - provide an argument to your C compiler (and any other compilers > > used, such as the C++ compiler) to specify the > > use of 64-bit objects, such as setting environment variables > > > > export CFLAGS="-m64" > > export CXXFLAGS="-m64" > > > > or > > > > - provide an argument to your Fortran compiler, ifort, to make it > > generate 32-bit objects. I don't know what > > argument ifort uses for this, perhaps "-m32". If that is the > > way to generate 32-bit objects, then you would > > use > > > > export FFLAGS="-m32" > > export FCFLAGS="-m32" > > > > There is no real advantage to generating 64-bit objects unless you > > are trying to link with other libraries that > > are compiled in 64-bit mode. For example, if you had an HDF5 > > library compiled in 64-bit mode that you > > had to link with, you would have to use the first alternative, but > > otherwise the second alternative is probably > > better. > > > > Since this problem indicates that you C compiler, cc, is not > > compatible with your Fortran compiler, ifort, you > > may run into other problems after fixing this one ... > > > > --Russ > > > > > > > >> > >> On Jul 21, 2009, at 9:45 PM, Unidata netCDF Support wrote: > >> > >>> Carles, > >>> > >>>> thanks a lot for prompt reply. The files conftest.o and conftestf.o > >>>> are not found in the installation directory (/Applications/ > >>>> netcdf-4.0.1), there are only the files: > >>>> > >>>> COPYRIGHT README aclocal.m4 config.log cxx f90 libsrc man4 > >>>> nc_test4 ncgen nf_test > >>>> INSTALL RELEASE_NOTES compile config.sub cxx4 fortran libsrc4 > >>>> missing ncdap.m4 ncgen4 win32 > >>>> Makefile.am VERSION config.guess configure depcomp install-sh > >>>> ltmain.sh nc-config.in ncdap_test nctest > >>>> Makefile.in acinclude.m4 config.h.in configure.ac examples > >>>> libncdap3 > >>>> m4 nc_test ncdump netcdf.pc.in > >>>> > >>>> > >>>> I checked they are not in any of the subdirectories, should I look > >>>> for > >>>> these files maybe in other places? > >>> > >>> Oops, sorry, it turns out that the configure script cleans up any > >>> left over files it created when it exits, even if there was an > >>> error. > >>> I've just duplicated that problem here and found a way around it, > >>> but > >>> it's a little tricky. > >>> > >>> You will have to edit the "configure" script and comment out one > >>> line, > >>> to prevent it from deleting the conftest.o and conftestf.o files > >>> when > >>> it cleans things up on exit. > >>> > >>> Use a text editor on the "configure" file, which is very long (over > >>> 34000 lines), and look for the following line, which should occur > >>> around line 2026, if you are using the configure from netCDF version > >>> 3.6.3: > >>> > >>> rm -f -r conftest* confdefs* conf$$* $ac_clean_files && > >>> > >>> Comment out this line by inserting a "#" character at its begiining, > >>> so the resuliting line will look like: > >>> > >>> # rm -f -r conftest* confdefs* conf$$* $ac_clean_files && > >>> > >>> Save the modified file and run it again. It should still stop with > >>> the error message > >>> > >>> configure: error: Could not link conftestf.o and conftest.o > >>> > >>> but now those files will not be removed, so you can run the command > >>> > >>> file conftest.o conftestf.o > >>> > >>> The output from this command should tell us why those two object > >>> files > >>> created by the C compiler and Fortran compiler are not compatible, > >>> so > >>> please send that output. > >>> > >>> --Russ > >>> > >>> Russ Rew UCAR Unidata > >>> Program > >>> address@hidden http:// > >>> www.unidata.ucar.edu > >>> > >>> > >>> > >>> Ticket Details > >>> =================== > >>> Ticket ID: ASW-719077 > >>> Department: Support netCDF > >>> Priority: Normal > >>> Status: Closed > >>> > >> > >> > > > > Russ Rew UCAR Unidata Program > > address@hidden http://www.unidata.ucar.edu > > > > > > > > Ticket Details > > =================== > > Ticket ID: ASW-719077 > > Department: Support netCDF > > Priority: Normal > > Status: Closed > > > > Russ Rew UCAR Unidata Program address@hidden http://www.unidata.ucar.edu Ticket Details =================== Ticket ID: ASW-719077 Department: Support netCDF Priority: Normal Status: Closed