Aha, it looks like you should have used "-L" instead of "-I" in LDFLAGS: > setenv LDFLAGS -I/usr/local/netcdf/lib setenv LDFLAGS -L/usr/local/netcdf/lib See if that doesn't fix the problem ... --Russ > Yes sorry, that was a copy/paste error. To be sure, I tried it again and > still the same error. > Attached is the config.log for the failed netcdf fortran run. The netcdf c > library should be 4.3.0, I just installed it today and it said the build > was successful. > > I have gcc and gfortran installed. Here's the entire output but you're > probably looking for the versions? Both are 4.5 > > [new-host:local/netcdf/include] sastelma% gcc -v > Using built-in specs. > COLLECT_GCC=gcc > COLLECT_LTO_WRAPPER=/opt/local/libexec/gcc/x86_64-apple-darwin12/4.5.4/lto-wrapper > Target: x86_64-apple-darwin12 > Configured with: ../gcc-4.5.4/configure --prefix=/opt/local > --build=x86_64-apple-darwin12 > --enable-languages=c,c++,objc,obj-c++,fortran,java > --libdir=/opt/local/lib/gcc45 --includedir=/opt/local/include/gcc45 > --infodir=/opt/local/share/info --mandir=/opt/local/share/man > --datarootdir=/opt/local/share/gcc-4.5 --with-local-prefix=/opt/local > --with-libiconv-prefix=/opt/local --with-system-zlib --disable-nls > --program-suffix=-mp-4.5 > --with-gxx-include-dir=/opt/local/include/gcc45/c++/ --with-gmp=/opt/local > --with-mpfr=/opt/local --with-mpc=/opt/local --with-ppl=/opt/local > --enable-stage1-checking --disable-multilib --with-as=/opt/local/bin/as > --with-ld=/opt/local/bin/ld --with-ar=/opt/local/bin/ar --with-bugurl= > https://trac.macports.org/newticket --enable-lto > --with-pkgversion='MacPorts gcc45 4.5.4_6' > Thread model: posix > gcc version 4.5.4 (MacPorts gcc45 4.5.4_6) > > [new-host:local/netcdf/include] sastelma% gfortran -v > Using built-in specs. > COLLECT_GCC=gfortran > COLLECT_LTO_WRAPPER=/opt/local/libexec/gcc/x86_64-apple-darwin12/4.5.4/lto-wrapper > Target: x86_64-apple-darwin12 > Configured with: ../gcc-4.5.4/configure --prefix=/opt/local > --build=x86_64-apple-darwin12 > --enable-languages=c,c++,objc,obj-c++,fortran,java > --libdir=/opt/local/lib/gcc45 --includedir=/opt/local/include/gcc45 > --infodir=/opt/local/share/info --mandir=/opt/local/share/man > --datarootdir=/opt/local/share/gcc-4.5 --with-local-prefix=/opt/local > --with-libiconv-prefix=/opt/local --with-system-zlib --disable-nls > --program-suffix=-mp-4.5 > --with-gxx-include-dir=/opt/local/include/gcc45/c++/ --with-gmp=/opt/local > --with-mpfr=/opt/local --with-mpc=/opt/local --with-ppl=/opt/local > --enable-stage1-checking --disable-multilib --with-as=/opt/local/bin/as > --with-ld=/opt/local/bin/ld --with-ar=/opt/local/bin/ar --with-bugurl= > https://trac.macports.org/newticket --enable-lto > --with-pkgversion='MacPorts gcc45 4.5.4_6' > Thread model: posix > gcc version 4.5.4 (MacPorts gcc45 4.5.4_6) > > Thank you! > Sigourney Stelma > > > address@hidden> wrote: > > > Sigourney > > > > > That did not work. I got the same exact error as in my previous email. > > > Here's what I'm putting into the terminal: > > > > > > setenv CC gcc > > > setenv CFLAGS -m64 > > > setenv CXX g++ > > > setenv CXXFLAGS -m64 > > > setenv FC gfortran > > > setenv FCFLAGS -m64 > > > setenv FFLAGS -m64 > > > setenv F77 gfortran > > > FC gfortran > > > setenv YLD_LIBRARY_PATH /usr/local/netcdf/lib > > > > Was the above a copy-and-paste error? You should have used > > > > setenv DYLD_LIBRARY_PATH /usr/local/netcdf/lib > > > > > setenv CPPFLAGS -I/usr/local/netcdf/include > > > setenv LDFLAGS -I/usr/local/netcdf/lib > > > ./configure --prefix=/usr/local/netcdf > > > > Please send us your config.log file for the failed Fortran build, > > and also the version of the netCDF C library you installed under > > /usr/local/netcdf. > > > > Also, what is the output from > > > > $ gcc --version > > $ gfortran --version > > > > Another way to get gfortran installed on a Mac OSX platform is > > to use the macports.org package management system, with: > > > > $ port netcdf-fortran > > > > --Russ > > > > > Thanks! > > > Sigourney > > > > > > > > > address@hidden> wrote: > > > > > > > Hi Sigourney, > > > > > > > > > I'm trying to build netcdf fortran with gfortran. I got an error > > during > > > > the > > > > > 'make check' stage of my build and it told me to contact you. Here's > > the > > > > > error: > > > > > > > > > > dyld: Symbol not found: _ncerr > > > > > Referenced from: > > > > > > > > > > > /Users/sastelma/downloads/netcdf-fortran-4.2/fortran/.libs/libnetcdff.5.dylib > > > > > Expected in: flat namespace > > > > > in > > > > > > > > > > > /Users/sastelma/downloads/netcdf-fortran-4.2/fortran/.libs/libnetcdff.5.dylib > > > > > /bin/sh: line 1: 51512 Trace/BPT trap: 5 ${dir}$tst > > > > > FAIL: nf_test > > > > > > > > > > *** Copying file with fill values. > > > > > *** SUCCESS! > > > > > PASS: create_fills.sh > > > > > dyld: Symbol not found: _ncerr > > > > > Referenced from: > > > > > > > > > > > /Users/sastelma/downloads/netcdf-fortran-4.2/fortran/.libs/libnetcdff.5.dylib > > > > > Expected in: flat namespace > > > > > in > > > > > > > > > > > /Users/sastelma/downloads/netcdf-fortran-4.2/fortran/.libs/libnetcdff.5.dylib > > > > > /bin/sh: line 1: 51537 Trace/BPT trap: 5 ${dir}$tst > > > > > FAIL: tst_f90 > > > > > ================================================ > > > > > 2 of 3 tests failed > > > > > Please report to address@hidden > > > > > ================================================ > > > > > > > > > > I'm not sure at all how to fix this issue. > > > > > > > > I assume you're following the build instructions here: > > > > > > > > http://www.unidata.ucar.edu/netcdf/docs/netcdf-fortran-install.html > > > > > > > > and that you're building on a Mac OSX platform, using shared libraries. > > > > > > > > Did you set the environment variable DYLD_LIBRARY_PATH to contain the > > > > library directory where the netCDF C library is installed, as mentioned > > > > in step 3 of the build instructions under "Using shared libraries"? If > > > > not, please try again with that environment variable set and let us > > know > > > > if that doesn't fix the problem. > > > > > > > > --Russ > > > > > > > > > Thank you, > > > > > Sigourney Stelma > > > > > > > > > > > > > > Russ Rew UCAR Unidata Program > > > > address@hidden http://www.unidata.ucar.edu > > > > > > > > > > > > > > > > Ticket Details > > > > =================== > > > > Ticket ID: SDC-125933 > > > > Department: Support netCDF > > > > Priority: Normal > > > > Status: Closed > > > > > > > > > > > > > > > > Russ Rew UCAR Unidata Program > > address@hidden http://www.unidata.ucar.edu > > > > > > > > Ticket Details > > =================== > > Ticket ID: SDC-125933 > > Department: Support netCDF > > Priority: Normal > > Status: Closed > > > > > > Russ Rew UCAR Unidata Program address@hidden http://www.unidata.ucar.edu Ticket Details =================== Ticket ID: SDC-125933 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.