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.
Greetings Carl, I think I was barking up the wrong tree on this one. Let's forget about the FCFLAGS and LIB for a moment. Go ahead and do a `make distclean` and run your configure script again, but this time setting the CPPFLAGS variable: CPPFLAGS=-pgiFortran ./configure ... I think we were taking the route of brute force to fix the problems, when maybe all we needed to do it tell the pre-processor a little info. Let me know if this works out. I do not think we have a machine here at Unidata with lf95 installed, or else I could work on it on this end too. Cheers, Sean > I ran make distclean.....re-installed netcdf with the following command ... > FCFLAGS=-no-multibyte-chars LIB=-1fst ./configure --prefix=/usr/local/net_cdf > --disable-dap.....in this line, if I run this with LIBS=-1fst I get the same > error checking if Fortran "byte" is C "signed char"... configure: error: > Could not link conftestf.o and conftest.o, if I run it LIB=-1fst, it run > through the ./configure. After running make install, I get this at the tail > end of the results. > > See any operating system documentation about shared libraries for > more information, such as the ld(1) and ld.so(8) manual pages. > ---------------------------------------------------------------------- > test -z "/usr/local/net_cdf/include" || /bin/mkdir -p > "/usr/local/net_cdf/include" > /usr/bin/install -c -m 644 netcdfcpp.h ncvalues.h netcdf.hh > '/usr/local/net_cdf/include' > make[2]: Leaving directory `/opt/netcdf-4.1.1/cxx' > make[1]: Leaving directory `/opt/netcdf-4.1.1/cxx' > Making install in nc_test > make[1]: Entering directory `/opt/netcdf-4.1.1/nc_test' > make[2]: Entering directory `/opt/netcdf-4.1.1/nc_test' > make[2]: Nothing to be done for `install-exec-am'. > make[2]: Nothing to be done for `install-data-am'. > make[2]: Leaving directory `/opt/netcdf-4.1.1/nc_test' > make[1]: Leaving directory `/opt/netcdf-4.1.1/nc_test' > Making install in man4 > make[1]: Entering directory `/opt/netcdf-4.1.1/man4' > TEXINPUTS=".:$TEXINPUTS" \ > MAKEINFO='/bin/sh /opt/netcdf-4.1.1/missing --run makeinfo -I .' \ > texi2dvi -s --pdf --batch netcdf.texi > /bin/sh: texi2dvi: command not found > make[1]: *** [netcdf.pdf] Error 127 > make[1]: Leaving directory `/opt/netcdf-4.1.1/man4' > make: *** [install-recursive] Error 1 > > > I still get the error when running the script after make install: > > -bash-3.2# ./fvcom.bathy.n.sh.lev > + ulimit -s unlimited > + lf95 ../interp_bathy_topo.f90 -o interp_fill > -L/usr/lib/gcc/i386-redhat-linux/4.1.1 -lgcc -L/usr/X11R6/lib/ -lX11 > -I/usr/local/net_cdf/include -L/usr/local/net_cdf/lib -lnetcdf > Encountered 0 errors, 0 warnings in file ../interp_bathy_topo.f90. > /usr/local/net_cdf/lib/libnetcdf.a(nc.o): In function `NC_begins': > /opt/netcdf-4.1.1/libsrc/nc.c:246: undefined reference to `__divdi3' > /opt/netcdf-4.1.1/libsrc/nc.c:250: undefined reference to `__divdi3' > /opt/netcdf-4.1.1/libsrc/nc.c:253: undefined reference to `__divdi3' > /opt/netcdf-4.1.1/libsrc/nc.c:284: undefined reference to `__divdi3' > /opt/netcdf-4.1.1/libsrc/nc.c:281: undefined reference to `__divdi3' > /usr/local/net_cdf/lib/libnetcdf.a(nc.o):/opt/netcdf-4.1.1/libsrc/nc.c:287: > more undefined references to `__divdi3' follow > /usr/local/net_cdf/lib/libnetcdf.a(posixio.o): In function `px_get': > /opt/netcdf-4.1.1/libsrc/posixio.c:425: undefined reference to `__moddi3' > > > > -----Original Message----- > From: Unidata netCDF Support [mailto:address@hidden] > Sent: Tuesday, July 05, 2011 6:25 PM > To: address@hidden > Cc: address@hidden > Subject: [netCDF #PDX-714093]: netcdf > > Hi Carl, > > Could you add -no-multibyte-chars to your FFLAGS when you run the configure > script? > > FCFLAGS=-no-multibyte-chars LIBS=-lfst ./configure .....(whatever options you > specified) > > Let's see if that helps, > > Sean > > > The configuration stops with this line... checking if Fortran "byte" is C > > "signed char"... configure: error: Could not link conftestf.o and conftest.o > > > > Carl. > > > > LIBS=-lfst ./configure --prefix=/usr/local/net_cdf > > > > -----Original Message----- > > From: Unidata netCDF Support [mailto:address@hidden] > > Sent: Tuesday, July 05, 2011 4:43 PM > > To: address@hidden > > Cc: address@hidden > > Subject: [netCDF #PDX-714093]: netcdf > > > > From what I can gather this is an issue with If95. When you run the > > configure script, try to add the following: > > > > LIBS=-lfst ./configure .....(whatever options you specified) > > > > Some compilers seems to need to load extra libraries to find things like > > __divdi3 (no idea why). > > > > Make sure to to do `make distclean` before you reconfigure and rebuild / > > install netCDF. > > > > Let me know how this turns out, > > > > Sean > > > > > It seems as if the install went well. However, I think the following > > > error maybe related to gcc, would this be correct? > > > > > > -bash-3.2# ./fvcom.bathy.n.sh.lev > > > + ulimit -s unlimited > > > + lf95 ../interp_bathy_topo.f90 -o interp_fill > > > -L/usr/lib/gcc/i386-redhat-linux/4.1.1 -lgcc -L/usr/X11R6/lib/ -lX11 > > > -I/usr/local/net_cdf/include -L/usr/local/net_cdf/lib -lnetcdf > > > Encountered 0 errors, 0 warnings in file ../interp_bathy_topo.f90. > > > /usr/local/net_cdf/lib/libnetcdf.a(nc.o): In function `NC_begins': > > > /opt/netcdf-4.1.1/libsrc/nc.c:246: undefined reference to `__divdi3' > > > /opt/netcdf-4.1.1/libsrc/nc.c:250: undefined reference to `__divdi3' > > > /opt/netcdf-4.1.1/libsrc/nc.c:253: undefined reference to `__divdi3' > > > /opt/netcdf-4.1.1/libsrc/nc.c:284: undefined reference to `__divdi3' > > > /opt/netcdf-4.1.1/libsrc/nc.c:281: undefined reference to `__divdi3' > > > /usr/local/net_cdf/lib/libnetcdf.a(nc.o):/opt/netcdf-4.1.1/libsrc/nc.c:287: > > > more undefined references to `__divdi3' follow > > > /usr/local/net_cdf/lib/libnetcdf.a(posixio.o): In function `px_get': > > > /opt/netcdf-4.1.1/libsrc/posixio.c:425: undefined reference to `__moddi3' > > > > > > > > > -----Original Message----- > > > From: Unidata netCDF Support [mailto:address@hidden] > > > Sent: Tuesday, July 05, 2011 2:52 PM > > > To: address@hidden > > > Cc: address@hidden > > > Subject: [netCDF #PDX-714093]: netcdf > > > > > > Greetings Carl, > > > > > > The way you are setting up your environmental variables is not quite > > > achieving the goal that you want. The output from configure shows that FC > > > is set to '' (the configure scripts picks up ifort as your fortran > > > compiler, which appears to be located at /opt/intel/fc/9.0/bin/ifort - > > > this auto-detection is built in for cases where FC is not defined). I > > > tried to repeat what you listed as having in your bash_profile, and I too > > > come up with a blank FC environmental variable. Essentially you have set > > > the shell variable FC to $f95, which is not defined at the moment you set > > > the variable, and thus FC is set to ''. Once you export the shell > > > variable, it becomes an environmental variable (which was already set to > > > '' when you declared the shell variable). I would suggest two things: > > > > > > 1) Change your bash_profile to export the variables individually and in > > > order: > > > > > > export > > > PATH=$PATH:$HOME/bin:$NCARG_ROOT:$GCC:$FC:/opt/jrel.6.0_21/bin:/usr/local/lib:/usr/lib:/usr/local/lf9562/bin:/opt/intel/fc/9.0/bin: > > > export f95=/usr/local/lf9560/bin > > > export FC=$f95 > > > export NCARG_ROOT=/usr/local > > > export LD_LIBRARY_PATH=/usr/lib > > > > > > (Note: most bash shells on Linux distros can do the export and > > > declaration on the same line - however, some will barf. If this does not > > > work, try setting the variable first, then exporting it on the line > > > immediately following the declaration.) > > > > > > 2) Is the executable for if95 called bin? If not, make sure you use the > > > complete path to the compiler. For example, it could be something like: > > > > > > f95=/usr/local/lf9560/bin/if95 > > > > > > > > > Let me know if rebuilding in the new environment helps. > > > > > > Cheers! > > > > > > Sean > > > > > > > > > > Attached is the output from ./configure > > > > > > > > Carl. > > > > > > > > -----Original Message----- > > > > From: Unidata netCDF Support [mailto:address@hidden] > > > > Sent: Tuesday, July 05, 2011 1:20 PM > > > > To: address@hidden > > > > Cc: address@hidden > > > > Subject: [netCDF #PDX-714093]: netcdf > > > > > > > > Greetings Carl, > > > > > > > > Would you mind sending me a log of the output from configure? > > > > > > > > Thanks! > > > > > > > > Sean > > > > > > > > > Sean, > > > > > > > > > > Here is the information requested... Linux leviathan.ncd-tcn.noaa.gov > > > > > 2.6.18-238.12.1.el5PAE #1 SMP Sat May 7 20:37:06 EDT 2011 i686 athlon > > > > > i386 GNU/Linux > > > > > > > > > > > > > > > The compiler I would like to use is lf95 > > > > > > > > > > PATH=$PATH:$HOME/bin:$NCARG_ROOT:$GCC:$FC:/opt/jrel.6.0_21/bin:/usr/local/lib:/usr/lib:/usr/local/lf9562/bin:/opt/intel/fc/9.0/bin: > > > > > #NETCDF_F90=/disks/NASWORK/NETCDF_Fortran90 > > > > > #GCC=/usr/bin/gcc > > > > > FC=$f95 > > > > > f95=/usr/local/lf9560/bin > > > > > #F90=/opt/intel/Compiler/11.1/072/bin/ia32 > > > > > #f90=/opt/intel/Compiler/11.1/072/bin/ia32 > > > > > NCARG_ROOT=/usr/local > > > > > LD_LIBRARY_PATH=/usr/lib > > > > > #NCARG_ROOT=/disks/NASUSER/NCL_Binaries > > > > > > > > > > export PATH NCARG_ROOT FC F90 GCC LD_LIBRARY_PATH > > > > > unset USERNAME > > > > > > > > > > I reconfigured netcdf-4.1.1 into a different directory and attempted > > > > > to run a script and received the following error: > > > > > > > > > > -bash-3.2# ./fvcom.bathy.n.sh.lev > > > > > + ulimit -s unlimited > > > > > + lf95 ../interp_bathy_topo.f90 -o interp_fill > > > > > -L/usr/lib/gcc/i386-redhat-linux/4.1.1 -lgcc -L/usr/X11R6/lib/ -lX11 > > > > > -I/usr/local/net_cdf/include -L/usr/local/net_cdf/lib -lnetcdf > > > > > 1431-S: "../interp_bathy_topo.f90", line 729: Filename specified in > > > > > INCLUDE line not available. > > > > > 2005-W: "../interp_bathy_topo.f90", line 741: 'NF_NOERR' is used but > > > > > never set. > > > > > 1431-S: "../interp_bathy_topo.f90", line 850: Filename specified in > > > > > INCLUDE line not available. > > > > > 2005-W: "../interp_bathy_topo.f90", line 863: 'NF_NOERR' is used but > > > > > never set. > > > > > 1431-S: "../interp_bathy_topo.f90", line 1044: Filename specified in > > > > > INCLUDE line not available. > > > > > 2005-W: "../interp_bathy_topo.f90", line 1045: 'NF_NOERR' is used but > > > > > never set. > > > > > Encountered 3 errors, 3 warnings in file ../interp_bathy_topo.f90. > > > > > > > > > > > > > > > The include directory does not have netcdf.inc > > > > > > > > > > > > > > > /usr/local/net_cdf/include > > > > > -bash-3.2# ll > > > > > total 68 > > > > > -rw-r--r-- 1 root root 10123 Jul 5 11:44 ncvalues.h > > > > > -rw-r--r-- 1 root root 18918 Jul 5 11:44 netcdfcpp.h > > > > > -rw-r--r-- 1 root root 30285 Jul 5 11:43 netcdf.h > > > > > -rw-r--r-- 1 root root 23 Jul 5 11:44 netcdf.hh > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > -----Original Message----- > > > > > From: Unidata netCDF Support [mailto:address@hidden] > > > > > Sent: Friday, July 01, 2011 1:01 PM > > > > > To: address@hidden > > > > > Cc: address@hidden > > > > > Subject: [netCDF #PDX-714093]: netcdf > > > > > > > > > > Greetings! > > > > > > > > > > The configure script will try to use whatever compiler you have set > > > > > in the environmental variable FC. It looks like you have FC pointed > > > > > to F95. On my system, I have f95, but not F95 (case sensitive). Try > > > > > `which F95` at the command line and see what comes out. If it can't > > > > > be found in your path, then that is likely why configure is failing. > > > > > Also, I see you have a few compilers defined in your profile (gcc, > > > > > intel, f95(?)) - which are you wishing to use as your fortran > > > > > compiler? > > > > > > > > > > If you wouldn't mind, please let me know which OS you are using (the > > > > > output of `uname -a` would be great), and a complete log of the > > > > > output from your configure script. > > > > > > > > > > Thanks! > > > > > > > > > > Sean Arms > > > > > > > > > > > When running the .configure command, I received the following error: > > > > > > configure: error: Fortran could not compile .f90 files > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > -bash-3.2# make check > > > > > > > > > > > > make: *** No rule to make target `check'. Stop. > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > Bash_profile looks as such: > > > > > > > > > > > > > > > > > > > > > > > > GCC=/usr/bin/gcc > > > > > > > > > > > > FC=F95 > > > > > > > > > > > > F95=/opt/lf9560 > > > > > > > > > > > > F90=/opt/intel/Compiler/11.1/072/bin/ia32 > > > > > > > > > > > > #f90=/opt/intel/Compiler/11.1/072/bin/ia32 > > > > > > > > > > > > NCARG_ROOT=/usr/local > > > > > > > > > > > > LD_LIBRARY_PATH=/usr/lib > > > > > > > > > > > > #NCARG_ROOT=/disks/NASUSER/NCL_Binaries > > > > > > > > > > > > > > > > > > > > > > > > export PATH NCARG_ROOT FC F90 GCC LD_LIBRARY_PATH > > > > > > > > > > > > unset USERNAME > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > Ticket Details > > > > > =================== > > > > > Ticket ID: PDX-714093 > > > > > Department: Support netCDF > > > > > Priority: Normal > > > > > Status: Open > > > > > > > > > > > > > > > > > > > > > > > > > > > Ticket Details > > > > =================== > > > > Ticket ID: PDX-714093 > > > > Department: Support netCDF > > > > Priority: Normal > > > > Status: Open > > > > > > > > > > > > > > > > > > > > > Ticket Details > > > =================== > > > Ticket ID: PDX-714093 > > > Department: Support netCDF > > > Priority: Normal > > > Status: Open > > > > > > > > > > > > > > > Ticket Details > > =================== > > Ticket ID: PDX-714093 > > Department: Support netCDF > > Priority: Normal > > Status: Open > > > > > > > > > Ticket Details > =================== > Ticket ID: PDX-714093 > Department: Support netCDF > Priority: Normal > Status: Open > > > Ticket Details =================== Ticket ID: PDX-714093 Department: Support netCDF Priority: Normal Status: Open