Compilation error for build_roms.sh

Discussion on computers, ROMS installation and compiling

Moderators: arango, robertson

Post Reply
Message
Author
osean
Posts: 47
Joined: Sat Jan 23, 2021 3:46 pm
Location: MIT-WHOI

Compilation error for build_roms.sh

#1 Unread post by osean »

I am at the step of building ROMS using build_roms.sh, with the new bash file that was updated on svn recently. But I encounter the following issue (see the end of quote)

(base) XXX-MBP:Upwelling XXX$ ./build_roms.sh

::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
Using customized library paths from: /Users/XXX/Documents/ROMS/trunk/Compilers/my_build_paths.sh
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::

rm -f -r core *.ipo /Users/XXX/Documents/ROMS/Projects/Upwelling/Build_roms /Users/XXX/make_macros.mk
/bin/sh: --: invalid option
Usage: /bin/sh [GNU long option] [option] ...
/bin/sh [GNU long option] [option] script-file ...
GNU long options:
--debug
--debugger
--dump-po-strings
--dump-strings
--help
--init-file
--login
--noediting
--noprofile
--norc
--posix
--protected
--rcfile
--restricted
--verbose
--version
--wordexp
Shell options:
-irsD or -c command or -O shopt_option (invocation only)
-abefhkmnptuvxBCHP or -o option
cp -f /usr/local/include/netcdf.mod /Users/XXX/Documents/ROMS/Projects/Upwelling/Build_roms
cp -f /usr/local/include/typesizes.mod /Users/XXX/Documents/ROMS/Projects/Upwelling/Build_roms
cp -p /Users/XXX/make_macros.mk /Users/XXX/Documents/ROMS/Projects/Upwelling/Build_roms
/bin/sh: --: invalid option
Usage: /bin/sh [GNU long option] [option] ...
/bin/sh [GNU long option] [option] script-file ...
GNU long options:
--debug
--debugger
--dump-po-strings
--dump-strings
--help
--init-file
--login
--noediting
--noprofile
--norc
--posix
--protected
--rcfile
--restricted
--verbose
--version
--wordexp
Shell options:
-irsD or -c command or -O shopt_option (invocation only)
-abefhkmnptuvxBCHP or -o option
/usr/bin/cpp -P -traditional -w -DMPI -DDARWIN -DX86_64 -DGFORTRAN -D'ROOT_DIR="/Users/XXX/Documents/ROMS/trunk"' -DUPWELLING -D'HEADER="upwelling.h"' -D'ROMS_HEADER="/Users/XXX
/Documents/ROMS/Projects/Upwelling/upwelling.h"' -DNestedGrids= -D'ANALYTICAL_DIR="/Users/XXX/Documents/ROMS/Projects/Upwelling"' -D'MY_ANALYTICAL="on"' -D'SVN_URL="https://www.myroms.org/svn/src/trunk"' -D'SVN_REV="1053"' -IROMS/Include -I/Users/XXX/Documents/ROMS/Projects/Upwelling -IROMS/Nonlinear -IROMS/Nonlinear/Biology -IROMS/Nonlinear/Sediment -IROMS/Utility -IROMS/Drivers -IROMS/Functionals -I/Users/XXX/Documents/ROMS/Projects/Upwelling -IMaster -ICompilers -D'HEADER_DIR="/Users/XXX/Documents/ROMS/Projects/Upwelling"' ROMS/Nonlinear/bbl.F > /Users/XXX/Documents/ROMS/Projects/Upwelling/Build_roms/bbl.f90
ROMS/Bin/cpp_clean /Users/XXX/Documents/ROMS/Projects/Upwelling/Build_roms/bbl.f90
/usr/bin/cpp -P -traditional -w -DMPI -DDARWIN -DX86_64 -DGFORTRAN -D'ROOT_DIR="/Users/XXX/Documents/ROMS/trunk"' -DUPWELLING -D'HEADER="upwelling.h"' -D'ROMS_HEADER="/Users/XXX/Documents/ROMS/Projects/Upwelling/upwelling.h"' -DNestedGrids= -D'ANALYTICAL_DIR="/Users/XXX/Documents/ROMS/Projects/Upwelling"' -D'MY_ANALYTICAL="on"' -D'SVN_URL="https://www.myroms.org/svn/src/trunk"' -D'SVN_REV="1053"' -IROMS/Include -I/Users/XXX/Documents/ROMS/Projects/Upwelling -IROMS/Nonlinear -IROMS/Nonlinear/Biology -IROMS/Nonlinear/Sediment -IROMS/Utility -IROMS/Drivers -IROMS/Functionals -I/Users/XXX/Documents/ROMS/Projects/Upwelling -IMaster -ICompilers -D'HEADER_DIR="/Users/XXX/Documents/ROMS/Projects/Upwelling"' ROMS/Nonlinear/bc_2d.F > /Users/XXX/Documents/ROMS/Projects/Upwelling/Build_roms/bc_2d.f90
ROMS/Bin/cpp_clean /Users/XXX/Documents/ROMS/Projects/Upwelling/Build_roms/bc_2d.f90
/usr/bin/cpp -P -traditional -w -DMPI -DDARWIN -DX86_64 -DGFORTRAN -D'ROOT_DIR="/Users/XXX/Documents/ROMS/trunk"' -DUPWELLING -D'HEADER="upwelling.h"' -D'ROMS_HEADER="/Users/XXX/Documents/ROMS/Projects/Upwelling/upwelling.h"' -DNestedGrids= -D'ANALYTICAL_DIR="/Users/XXX/Documents/ROMS/Projects/Upwelling"' -D'MY_ANALYTICAL="on"' -D'SVN_URL="https://www.myroms.org/svn/src/trunk"' -D'SVN_REV="1053"' -IROMS/Include -I/Users/XXX/Documents/ROMS/Projects/Upwelling -IROMS/Nonlinear -IROMS/Nonlinear/Biology -IROMS/Nonlinear/Sediment -IROMS/Utility -IROMS/Drivers -IROMS/Functionals -I/Users/XXX/Documents/ROMS/Projects/Upwelling -IMaster -ICompilers -D'HEADER_DIR="/Users/XXX/Documents/ROMS/Projects/Upwelling"' ROMS/Nonlinear/exchange_2d.F > /Users/XXX/Documents/ROMS/Projects/Upwelling/Build_roms/exchange_2d.f90
ROMS/Bin/cpp_clean /Users/XXX/Documents/ROMS/Projects/Upwelling/Build_roms/exchange_2d.f90
cd /Users/XXX/Documents/ROMS/Projects/Upwelling/Build_roms; -c -frepack-arrays -O3 -ffast-math mod_kinds.f90

/bin/sh: -c: command not found
make: *** [/Users/XXX/Documents/ROMS/Projects/Upwelling/Build_roms/mod_kinds.o] Error 127
At the end I have this:

/bin/sh: -c: command not found
make: *** [/Users/XXX/Documents/ROMS/Projects/Upwelling/Build_roms/mod_kinds.o] Error 127

And the program was halted. Can anyone please explain to me what error 127 here is saying? Tried several ways but no way of moving forward. Thanks!

User avatar
neelbasak08
Posts: 99
Joined: Wed Dec 09, 2020 3:58 pm
Location: Thapar Institute of Engineering and Technology, Patiala, PN, India

Re: Compilation error for build_roms.sh

#2 Unread post by neelbasak08 »

Even I had a similar issue a few months back.

For me what worked was checking my netcdf file, it's location where it's installed and passing on the same as exact location in the netcdf portion in makefile and buildfile. Then try to recompile it.

FYI I was working on UBUNTU WSL for windows .

robertson
Site Admin
Posts: 227
Joined: Wed Feb 26, 2003 3:12 pm
Location: IMCS, Rutgers University

Re: Compilation error for build_roms.sh

#3 Unread post by robertson »

Typically /bin/sh errors are due to the build script not being able to find an executable. Most often it is the compiler but can also be nf-config or others. My first guess would be the build script is unable to find your compiler. Check that whatever compiler you're asking it to find (and mpif90 if you're building with MPI) are in your path.

osean
Posts: 47
Joined: Sat Jan 23, 2021 3:46 pm
Location: MIT-WHOI

Re: Compilation error for build_roms.sh

#4 Unread post by osean »

neelbasak08 wrote: Mon Jan 25, 2021 12:38 pm Even I had a similar issue a few months back.

For me what worked was checking my netcdf file, it's location where it's installed and passing on the same as exact location in the netcdf portion in makefile and buildfile. Then try to recompile it.

FYI I was working on UBUNTU WSL for windows .
robertson wrote: Mon Jan 25, 2021 2:39 pm Typically /bin/sh errors are due to the build script not being able to find an executable. Most often it is the compiler but can also be nf-config or others. My first guess would be the build script is unable to find your compiler. Check that whatever compiler you're asking it to find (and mpif90 if you're building with MPI) are in your path.

Thank you both.

It was indeed looking for MPI - which was not installed on my Mac. The problem was solved by having USE_MPI=on and USE_MPIF90=on disabled, i.e. with just

Code: Select all

export           USE_MPI=              # distributed-memory parallelism
export        USE_MPIF90=              # compile with mpif90 script
The compilation was relatively smooth, until what I suspect the very end, with NetCDF issues here:
-L/usr/local/lib -lnetcdf
Undefined symbols for architecture x86_64:
"___netcdf_MOD_nf90_close", referenced from:
___mod_netcdf_MOD_netcdf_close in libMODS.a(mod_netcdf.o)
"___netcdf_MOD_nf90_create", referenced from:
___mod_netcdf_MOD_netcdf_create in libMODS.a(mod_netcdf.o)
"___netcdf_MOD_nf90_def_dim", referenced from:
_def_dim_ in libUTIL.a(def_dim.o)
"___netcdf_MOD_nf90_def_var_manydims", referenced from:
___def_var_mod_MOD_def_var in libUTIL.a(def_var.o)
"___netcdf_MOD_nf90_def_var_scalar", referenced from:
___def_var_mod_MOD_def_var in libUTIL.a(def_var.o)
"___netcdf_MOD_nf90_enddef", referenced from:
___mod_netcdf_MOD_netcdf_enddef in libMODS.a(mod_netcdf.o)
"___netcdf_MOD_nf90_get_att_one_eightbytereal", referenced from:
___mod_netcdf_MOD_netcdf_get_fatt in libMODS.a(mod_netcdf.o)
___mod_netcdf_MOD_netcdf_inq_var in libMODS.a(mod_netcdf.o)
"___netcdf_MOD_nf90_get_att_one_fourbyteint", referenced from:
___mod_netcdf_MOD_netcdf_inq_var in libMODS.a(mod_netcdf.o)
"___netcdf_MOD_nf90_get_att_text", referenced from:
___mod_netcdf_MOD_netcdf_close in libMODS.a(mod_netcdf.o)
___mod_netcdf_MOD_netcdf_get_satt in libMODS.a(mod_netcdf.o)
___mod_netcdf_MOD_netcdf_inq_var in libMODS.a(mod_netcdf.o)
_lbc_getatt_ in libUTIL.a(lbc.o)
"___netcdf_MOD_nf90_get_var_1d_eightbytereal", referenced from:
___mod_netcdf_MOD_netcdf_get_fvar_0d in libMODS.a(mod_netcdf.o)
___mod_netcdf_MOD_netcdf_get_time_1d in libMODS.a(mod_netcdf.o)
___mod_netcdf_MOD_netcdf_get_time_0d in libMODS.a(mod_netcdf.o)
___mod_netcdf_MOD_netcdf_get_fvar_1d in libMODS.a(mod_netcdf.o)
___nf_fread2d_mod_MOD_nf_fread2d in libUTIL.a(nf_fread2d.o)
___nf_fread3d_mod_MOD_nf_fread3d in libUTIL.a(nf_fread3d.o)
"___netcdf_MOD_nf90_get_var_1d_fourbyteint", referenced from:
___mod_netcdf_MOD_netcdf_get_ivar_1d in libMODS.a(mod_netcdf.o)
___mod_netcdf_MOD_netcdf_get_ivar_0d in libMODS.a(mod_netcdf.o)
___mod_netcdf_MOD_netcdf_get_lvar_1d in libMODS.a(mod_netcdf.o)
___mod_netcdf_MOD_netcdf_get_lvar_0d in libMODS.a(mod_netcdf.o)
"___netcdf_MOD_nf90_get_var_1d_text", referenced from:
___mod_netcdf_MOD_netcdf_get_svar_1d in libMODS.a(mod_netcdf.o)
___mod_netcdf_MOD_netcdf_get_lvar_1d in libMODS.a(mod_netcdf.o)
"___netcdf_MOD_nf90_get_var_2d_eightbytereal", referenced from:
___mod_netcdf_MOD_netcdf_get_fvar_2d in libMODS.a(mod_netcdf.o)
"___netcdf_MOD_nf90_get_var_2d_fourbyteint", referenced from:
___mod_netcdf_MOD_netcdf_get_ivar_2d in libMODS.a(mod_netcdf.o)
"___netcdf_MOD_nf90_get_var_2d_text", referenced from:
___mod_netcdf_MOD_netcdf_get_svar_2d in libMODS.a(mod_netcdf.o)
"___netcdf_MOD_nf90_get_var_3d_eightbytereal", referenced from:
___mod_netcdf_MOD_netcdf_get_fvar_3d in libMODS.a(mod_netcdf.o)
"___netcdf_MOD_nf90_get_var_3d_text", referenced from:
___mod_netcdf_MOD_netcdf_get_svar_3d in libMODS.a(mod_netcdf.o)
"___netcdf_MOD_nf90_get_var_4d_eightbytereal", referenced from:
___mod_netcdf_MOD_netcdf_get_fvar_4d in libMODS.a(mod_netcdf.o)
"___netcdf_MOD_nf90_get_var_eightbytereal", referenced from:
___mod_netcdf_MOD_netcdf_get_fvar_0d in libMODS.a(mod_netcdf.o)
___mod_netcdf_MOD_netcdf_get_time_0d in libMODS.a(mod_netcdf.o)
"___netcdf_MOD_nf90_get_var_fourbyteint", referenced from:
___mod_netcdf_MOD_netcdf_get_ivar_0d in libMODS.a(mod_netcdf.o)
___mod_netcdf_MOD_netcdf_get_lvar_0d in libMODS.a(mod_netcdf.o)
"___netcdf_MOD_nf90_get_var_text", referenced from:
___mod_netcdf_MOD_netcdf_get_svar_0d in libMODS.a(mod_netcdf.o)
___mod_netcdf_MOD_netcdf_get_lvar_0d in libMODS.a(mod_netcdf.o)
"___netcdf_MOD_nf90_inq_attname", referenced from:
___mod_netcdf_MOD_netcdf_get_satt in libMODS.a(mod_netcdf.o)
___mod_netcdf_MOD_netcdf_get_fatt in libMODS.a(mod_netcdf.o)
___mod_netcdf_MOD_netcdf_inq_var in libMODS.a(mod_netcdf.o)
"___netcdf_MOD_nf90_inq_varid", referenced from:
___mod_netcdf_MOD_netcdf_put_svar_3d in libMODS.a(mod_netcdf.o)
___mod_netcdf_MOD_netcdf_put_svar_2d in libMODS.a(mod_netcdf.o)
___mod_netcdf_MOD_netcdf_put_svar_1d in libMODS.a(mod_netcdf.o)
___mod_netcdf_MOD_netcdf_put_svar_0d in libMODS.a(mod_netcdf.o)
___mod_netcdf_MOD_netcdf_put_lvar_2d in libMODS.a(mod_netcdf.o)
___mod_netcdf_MOD_netcdf_put_lvar_1d in libMODS.a(mod_netcdf.o)
___mod_netcdf_MOD_netcdf_put_lvar_0d in libMODS.a(mod_netcdf.o)
...
"___netcdf_MOD_nf90_inquire", referenced from:
___mod_netcdf_MOD_netcdf_get_satt in libMODS.a(mod_netcdf.o)
___mod_netcdf_MOD_netcdf_get_fatt in libMODS.a(mod_netcdf.o)
___mod_netcdf_MOD_netcdf_inq_var in libMODS.a(mod_netcdf.o)
___mod_netcdf_MOD_netcdf_get_dim in libMODS.a(mod_netcdf.o)
"___netcdf_MOD_nf90_inquire_attribute", referenced from:
___mod_netcdf_MOD_netcdf_inq_var in libMODS.a(mod_netcdf.o)
"___netcdf_MOD_nf90_inquire_dimension", referenced from:
___mod_netcdf_MOD_netcdf_inq_var in libMODS.a(mod_netcdf.o)
___mod_netcdf_MOD_netcdf_get_dim in libMODS.a(mod_netcdf.o)
"___netcdf_MOD_nf90_inquire_variable", referenced from:
___mod_netcdf_MOD_netcdf_get_lvar_1d in libMODS.a(mod_netcdf.o)
___mod_netcdf_MOD_netcdf_get_lvar_0d in libMODS.a(mod_netcdf.o)
___mod_netcdf_MOD_netcdf_get_satt in libMODS.a(mod_netcdf.o)
___mod_netcdf_MOD_netcdf_get_fatt in libMODS.a(mod_netcdf.o)
___mod_netcdf_MOD_netcdf_inq_var in libMODS.a(mod_netcdf.o)
"___netcdf_MOD_nf90_open", referenced from:
___mod_netcdf_MOD_netcdf_open.part.0 in libMODS.a(mod_netcdf.o)
"___netcdf_MOD_nf90_put_att_eightbytereal", referenced from:
___def_var_mod_MOD_def_var in libUTIL.a(def_var.o)
"___netcdf_MOD_nf90_put_att_fourbyteint", referenced from:
___def_var_mod_MOD_def_var in libUTIL.a(def_var.o)
"___netcdf_MOD_nf90_put_att_fourbytereal", referenced from:
___def_var_mod_MOD_def_var in libUTIL.a(def_var.o)
"___netcdf_MOD_nf90_put_att_one_eightbytereal", referenced from:
___def_var_mod_MOD_def_var in libUTIL.a(def_var.o)
"___netcdf_MOD_nf90_put_att_one_fourbyteint", referenced from:
___def_var_mod_MOD_def_var in libUTIL.a(def_var.o)
"___netcdf_MOD_nf90_put_att_one_fourbytereal", referenced from:
___def_var_mod_MOD_def_var in libUTIL.a(def_var.o)
"___netcdf_MOD_nf90_put_att_text", referenced from:
_lbc_putatt_ in libUTIL.a(lbc.o)
_tadv_putatt_ in libUTIL.a(tadv.o)
___def_var_mod_MOD_def_var in libUTIL.a(def_var.o)
_def_info_ in libUTIL.a(def_info.o)
"___netcdf_MOD_nf90_put_var_1d_eightbytereal", referenced from:
___mod_netcdf_MOD_netcdf_put_fvar_1d in libMODS.a(mod_netcdf.o)
___mod_netcdf_MOD_netcdf_put_fvar_0d in libMODS.a(mod_netcdf.o)
___nf_fwrite2d_mod_MOD_nf_fwrite2d in libUTIL.a(nf_fwrite2d.o)
___nf_fwrite3d_mod_MOD_nf_fwrite3d in libUTIL.a(nf_fwrite3d.o)
"___netcdf_MOD_nf90_put_var_1d_fourbyteint", referenced from:
___mod_netcdf_MOD_netcdf_put_lvar_1d in libMODS.a(mod_netcdf.o)
___mod_netcdf_MOD_netcdf_put_lvar_0d in libMODS.a(mod_netcdf.o)
___mod_netcdf_MOD_netcdf_put_ivar_1d in libMODS.a(mod_netcdf.o)
___mod_netcdf_MOD_netcdf_put_ivar_0d in libMODS.a(mod_netcdf.o)
"___netcdf_MOD_nf90_put_var_1d_text", referenced from:
___mod_netcdf_MOD_netcdf_put_svar_1d in libMODS.a(mod_netcdf.o)
"___netcdf_MOD_nf90_put_var_2d_eightbytereal", referenced from:
___mod_netcdf_MOD_netcdf_put_fvar_2d in libMODS.a(mod_netcdf.o)
"___netcdf_MOD_nf90_put_var_2d_fourbyteint", referenced from:
___mod_netcdf_MOD_netcdf_put_lvar_2d in libMODS.a(mod_netcdf.o)
___mod_netcdf_MOD_netcdf_put_ivar_2d in libMODS.a(mod_netcdf.o)
"___netcdf_MOD_nf90_put_var_2d_text", referenced from:
___mod_netcdf_MOD_netcdf_put_svar_2d in libMODS.a(mod_netcdf.o)
"___netcdf_MOD_nf90_put_var_3d_eightbytereal", referenced from:
___mod_netcdf_MOD_netcdf_put_fvar_3d in libMODS.a(mod_netcdf.o)
"___netcdf_MOD_nf90_put_var_3d_text", referenced from:
___mod_netcdf_MOD_netcdf_put_svar_3d in libMODS.a(mod_netcdf.o)
"___netcdf_MOD_nf90_put_var_4d_eightbytereal", referenced from:
___mod_netcdf_MOD_netcdf_put_fvar_4d in libMODS.a(mod_netcdf.o)
"___netcdf_MOD_nf90_put_var_eightbytereal", referenced from:
___mod_netcdf_MOD_netcdf_put_fvar_0d in libMODS.a(mod_netcdf.o)
"___netcdf_MOD_nf90_put_var_fourbyteint", referenced from:
___mod_netcdf_MOD_netcdf_put_lvar_0d in libMODS.a(mod_netcdf.o)
___mod_netcdf_MOD_netcdf_put_ivar_0d in libMODS.a(mod_netcdf.o)
"___netcdf_MOD_nf90_put_var_text", referenced from:
___mod_netcdf_MOD_netcdf_put_svar_0d in libMODS.a(mod_netcdf.o)
"___netcdf_MOD_nf90_redef", referenced from:
___mod_netcdf_MOD_netcdf_redef in libMODS.a(mod_netcdf.o)
"___netcdf_MOD_nf90_set_fill", referenced from:
___mod_netcdf_MOD_netcdf_create in libMODS.a(mod_netcdf.o)
"___netcdf_MOD_nf90_strerror", referenced from:
_close_out_ in libUTIL.a(close_io.o)
___mod_netcdf_MOD_netcdf_open.part.0 in libMODS.a(mod_netcdf.o)
___mod_netcdf_MOD_netcdf_sync in libMODS.a(mod_netcdf.o)
___mod_netcdf_MOD_netcdf_redef in libMODS.a(mod_netcdf.o)
___mod_netcdf_MOD_netcdf_enddef in libMODS.a(mod_netcdf.o)
___mod_netcdf_MOD_netcdf_create in libMODS.a(mod_netcdf.o)
___mod_netcdf_MOD_netcdf_close in libMODS.a(mod_netcdf.o)
...
"___netcdf_MOD_nf90_sync", referenced from:
___mod_netcdf_MOD_netcdf_sync in libMODS.a(mod_netcdf.o)
ld: symbol(s) not found for architecture x86_64
collect2: error: ld returned 1 exit status
make: *** [/Users/XXX/Documents/ROMS/Projects/Upwelling/romsS] Error 1
At the end, something looks wrong with the NetCDF. The netCDF and nf_config had been set up properly, but I am not exactly sure what the error is telling me here - what does "ld: symbol(s) not found for architecture x86_64" mean here?

Any idea what is going on?

robertson
Site Admin
Posts: 227
Joined: Wed Feb 26, 2003 3:12 pm
Location: IMCS, Rutgers University

Re: Compilation error for build_roms.sh

#5 Unread post by robertson »

In your build script enable "USE_NETCDF4". This will allow the build system to get the proper library locations and names to link your executable.

osean
Posts: 47
Joined: Sat Jan 23, 2021 3:46 pm
Location: MIT-WHOI

Re: Compilation error for build_roms.sh

#6 Unread post by osean »

robertson wrote: Tue Jan 26, 2021 5:32 pm In your build script enable "USE_NETCDF4". This will allow the build system to get the proper library locations and names to link your executable.
I did turn on USE_NETCDF4. But somehow the problem still persists. I have attached below my my_build_paths.sh code for the gfortran section- I don't know if something is wrong there, so that no matter if USE_NETCDF4 is on or not, the outcome is the same, although the -L/usr/... line is different. I am not using MPI so the first section can be skipped. Perhaps it is the {SINGULARITY_COMMAND} that has issues?

gfortran )
export ESMF_COMPILER=gfortran
if [ -n "${USE_DEBUG:+1}" ]; then
export ESMF_BOPT=g
else
export ESMF_BOPT=O
fi
export ESMF_ABI=64
export ESMF_COMM=${which_MPI}
export ESMF_SITE=default

#export ARPACK_LIBDIR=/opt/gfortransoft/serial/ARPACK
export ARPACK_LIBDIR=/Users/sean/Documents/ROMS/trunk/Lib/ARPACK
if [ -n "${USE_MPI:+1}" ]; then
if [ "${which_MPI}" = "mpich2" ]; then
#export MPI_SOFT=/opt/gfortransoft/mpich2
export MPI_SOFT=/usr/local
elif [ "${which_MPI}" = "openmpi" ]; then
#export MPI_SOFT=/opt/gfortransoft/openmpi
export MPI_SOFT=/usr/local
elif [ "${which_MPI}" = "mvapich2" ]; then
#export MPI_SOFT=/opt/gfortransoft/mvapich2
export MPI_SOFT=/usr/local
fi
#export MCT_INCDIR=${MPI_SOFT}/mct/include
#export MCT_LIBDIR=${MPI_SOFT}/mct/lib
#export PARPACK_LIBDIR=${MPI_SOFT}/PARPACK
export MCT_INCDIR=${MPI_SOFT}/include
export MCT_LIBDIR=${MPI_SOFT}/lib
export PARPACK_LIBDIR=/Users/sean/Documents/ROMS/trunk/Lib/ARPACK/PARPACK

fi

if [ ! -n "${SINGULARITY_COMMAND:+1}" ]; then
if [ -n "${USE_NETCDF4:+1}" ]; then
if [ -n "${USE_PARALLEL_IO:+1}" ] && [ -n "${USE_MPI:+1}" ]; then
export ESMF_DIR=${MPI_SOFT}/esmf_nc4
# export NETCDF=${MPI_SOFT}/netcdf4
export NETCDF=/usr/local[/b]
# export NF_CONFIG=${NETCDF}/bin/nf-config
export NF_CONFIG=${NETCDF}/bin/
export NETCDF_INCDIR=${NETCDF}/include
export NETCDF4=1
else
export ESMF_DIR=${MPI_SOFT}/esmf_nc4
# export NETCDF=/opt/gfortransoft/serial/netcdf4
export NETCDF=/usr/local
# export NF_CONFIG=${NETCDF}/bin/nf-config
export NF_CONFIG=${NETCDF}/bin/
export NETCDF_INCDIR=${NETCDF}/include
export NETCDF4=1
fi
else
export ESMF_DIR=${MPI_SOFT}/esmf_nc3
# export NETCDF=/opt/gfortransoft/serial/netcdf3
export NETCDF=/usr/local
export NETCDF_INCDIR=${NETCDF}/include
export NETCDF_LIBDIR=${NETCDF}/lib
export NETCDF_classic=1
fi
fi

if [ -n "${USE_PNETCDF:+1}" ]; then
# export PNETCDF=${MPI_SOFT}/pnetcdf
export PNETCDF=${MPI_SOFT}
export PNETCDF_LIBDIR=${PNETCDF}/lib
export PNETCDF_INCDIR=${PNETCDF}/include
fi

if [ -n "${USE_PIO:+1}" ]; then
# export PIO=${MPI_SOFT}/scorpio
export PIO=${MPI_SOFT}
export PIO_LIBDIR=${PIO}/lib
export PIO_INCDIR=${PIO}/include
fi

if [ -n "${USE_HDF5:+1}" ]; then
if [ -n "${USE_PARALLEL_IO:+1}" ] && [ -n "${USE_MPI:+1}" ]; then
#export HDF5=${MPI_SOFT}/hdf5
export HDF5=${MPI_SOFT}
export HDF5_LIBDIR=${HDF5}/lib
export HDF5_INCDIR=${HDF5}/include
else
#export HDF5=/opt/gfortransoft/serial/hdf5
export HDF5=${MPI_SOFT}
export HDF5_LIBDIR=${HDF5}/lib
export HDF5_INCDIR=${HDF5}/include
fi
fi
;;

The error now looks like:
/usr/local/bin/gfortran -frepack-arrays -O3 -ffast-math -frepack-arrays -O3 -ffast-math /Users/sean/Documents/ROMS/Projects/Upwelling/Build_roms/coupler.o /Users/sean/Documents/ROMS/Projects/Upwelling/Build_roms/esmf_roms.o /Users/sean/Documents/ROMS/Projects/Upwelling/Build_roms/master.o /Users/sean/Documents/ROMS/Projects/Upwelling/Build_roms/ocean_control.o /Users/sean/Documents/ROMS/Projects/Upwelling/Build_roms/propagator.o /Users/sean/Documents/ROMS/Projects/Upwelling/Build_roms/roms_export.o /Users/sean/Documents/ROMS/Projects/Upwelling/Build_roms/roms_import.o -o /Users/sean/Documents/ROMS/Projects/Upwelling/romsS /Users/sean/Documents/ROMS/Projects/Upwelling/Build_roms/libNLM.a /Users/sean/Documents/ROMS/Projects/Upwelling/Build_roms/libDRIVER.a /Users/sean/Documents/ROMS/Projects/Upwelling/Build_roms/libUTIL.a /Users/sean/Documents/ROMS/Projects/Upwelling/Build_roms/libNLM.a /Users/sean/Documents/ROMS/Projects/Upwelling/Build_roms/libNLM_bio.a /Users/sean/Documents/ROMS/Projects/Upwelling/Build_roms/libNLM_sed.a /Users/sean/Documents/ROMS/Projects/Upwelling/Build_roms/libANA.a /Users/sean/Documents/ROMS/Projects/Upwelling/Build_roms/libUTIL.a /Users/sean/Documents/ROMS/Projects/Upwelling/Build_roms/libDRIVER.a /Users/sean/Documents/ROMS/Projects/Upwelling/Build_roms/libMODS.a /Users/sean/Documents/ROMS/Projects/Upwelling/Build_roms/libNLM.a
Undefined symbols for architecture x86_64:
"___netcdf_MOD_nf90_close", referenced from:
___mod_netcdf_MOD_netcdf_close in libMODS.a(mod_netcdf.o)
"___netcdf_MOD_nf90_create", referenced from:
___mod_netcdf_MOD_netcdf_create in libMODS.a(mod_netcdf.o)
"___netcdf_MOD_nf90_def_dim", referenced from:
_def_dim_ in libUTIL.a(def_dim.o)
"___netcdf_MOD_nf90_def_var_manydims", referenced from:
___def_var_mod_MOD_def_var in libUTIL.a(def_var.o)
"___netcdf_MOD_nf90_def_var_scalar", referenced from:
___def_var_mod_MOD_def_var in libUTIL.a(def_var.o)
"___netcdf_MOD_nf90_enddef", referenced from:
___mod_netcdf_MOD_netcdf_enddef in libMODS.a(mod_netcdf.o)
"___netcdf_MOD_nf90_get_att_one_eightbytereal", referenced from:
___mod_netcdf_MOD_netcdf_get_fatt in libMODS.a(mod_netcdf.o)
___mod_netcdf_MOD_netcdf_inq_var in libMODS.a(mod_netcdf.o)
"___netcdf_MOD_nf90_get_att_one_fourbyteint", referenced from:
___mod_netcdf_MOD_netcdf_inq_var in libMODS.a(mod_netcdf.o)
"___netcdf_MOD_nf90_get_att_text", referenced from:
___mod_netcdf_MOD_netcdf_close in libMODS.a(mod_netcdf.o)
___mod_netcdf_MOD_netcdf_get_satt in libMODS.a(mod_netcdf.o)
___mod_netcdf_MOD_netcdf_inq_var in libMODS.a(mod_netcdf.o)
_lbc_getatt_ in libUTIL.a(lbc.o)
"___netcdf_MOD_nf90_get_var_1d_eightbytereal", referenced from:
___mod_netcdf_MOD_netcdf_get_fvar_0d in libMODS.a(mod_netcdf.o)
___mod_netcdf_MOD_netcdf_get_time_1d in libMODS.a(mod_netcdf.o)
___mod_netcdf_MOD_netcdf_get_time_0d in libMODS.a(mod_netcdf.o)
___mod_netcdf_MOD_netcdf_get_fvar_1d in libMODS.a(mod_netcdf.o)
___nf_fread2d_mod_MOD_nf_fread2d in libUTIL.a(nf_fread2d.o)
___nf_fread3d_mod_MOD_nf_fread3d in libUTIL.a(nf_fread3d.o)
"___netcdf_MOD_nf90_get_var_1d_fourbyteint", referenced from:
___mod_netcdf_MOD_netcdf_get_ivar_1d in libMODS.a(mod_netcdf.o)
___mod_netcdf_MOD_netcdf_get_ivar_0d in libMODS.a(mod_netcdf.o)
___mod_netcdf_MOD_netcdf_get_lvar_1d in libMODS.a(mod_netcdf.o)
___mod_netcdf_MOD_netcdf_get_lvar_0d in libMODS.a(mod_netcdf.o)
"___netcdf_MOD_nf90_get_var_1d_text", referenced from:
___mod_netcdf_MOD_netcdf_get_svar_1d in libMODS.a(mod_netcdf.o)
___mod_netcdf_MOD_netcdf_get_lvar_1d in libMODS.a(mod_netcdf.o)
"___netcdf_MOD_nf90_get_var_2d_eightbytereal", referenced from:
___mod_netcdf_MOD_netcdf_get_fvar_2d in libMODS.a(mod_netcdf.o)
"___netcdf_MOD_nf90_get_var_2d_fourbyteint", referenced from:
___mod_netcdf_MOD_netcdf_get_ivar_2d in libMODS.a(mod_netcdf.o)
"___netcdf_MOD_nf90_get_var_2d_text", referenced from:
___mod_netcdf_MOD_netcdf_get_svar_2d in libMODS.a(mod_netcdf.o)
"___netcdf_MOD_nf90_get_var_3d_eightbytereal", referenced from:
___mod_netcdf_MOD_netcdf_get_fvar_3d in libMODS.a(mod_netcdf.o)
"___netcdf_MOD_nf90_get_var_3d_text", referenced from:
___mod_netcdf_MOD_netcdf_get_svar_3d in libMODS.a(mod_netcdf.o)
"___netcdf_MOD_nf90_get_var_4d_eightbytereal", referenced from:
___mod_netcdf_MOD_netcdf_get_fvar_4d in libMODS.a(mod_netcdf.o)
"___netcdf_MOD_nf90_get_var_eightbytereal", referenced from:
___mod_netcdf_MOD_netcdf_get_fvar_0d in libMODS.a(mod_netcdf.o)
___mod_netcdf_MOD_netcdf_get_time_0d in libMODS.a(mod_netcdf.o)
"___netcdf_MOD_nf90_get_var_fourbyteint", referenced from:
___mod_netcdf_MOD_netcdf_get_ivar_0d in libMODS.a(mod_netcdf.o)
___mod_netcdf_MOD_netcdf_get_lvar_0d in libMODS.a(mod_netcdf.o)
"___netcdf_MOD_nf90_get_var_text", referenced from:
___mod_netcdf_MOD_netcdf_get_svar_0d in libMODS.a(mod_netcdf.o)
___mod_netcdf_MOD_netcdf_get_lvar_0d in libMODS.a(mod_netcdf.o)
"___netcdf_MOD_nf90_inq_attname", referenced from:
___mod_netcdf_MOD_netcdf_get_satt in libMODS.a(mod_netcdf.o)
___mod_netcdf_MOD_netcdf_get_fatt in libMODS.a(mod_netcdf.o)
___mod_netcdf_MOD_netcdf_inq_var in libMODS.a(mod_netcdf.o)
"___netcdf_MOD_nf90_inq_varid", referenced from:
___mod_netcdf_MOD_netcdf_put_svar_3d in libMODS.a(mod_netcdf.o)
___mod_netcdf_MOD_netcdf_put_svar_2d in libMODS.a(mod_netcdf.o)
___mod_netcdf_MOD_netcdf_put_svar_1d in libMODS.a(mod_netcdf.o)
___mod_netcdf_MOD_netcdf_put_svar_0d in libMODS.a(mod_netcdf.o)
___mod_netcdf_MOD_netcdf_put_lvar_2d in libMODS.a(mod_netcdf.o)
___mod_netcdf_MOD_netcdf_put_lvar_1d in libMODS.a(mod_netcdf.o)
___mod_netcdf_MOD_netcdf_put_lvar_0d in libMODS.a(mod_netcdf.o)
...
"___netcdf_MOD_nf90_inquire", referenced from:
___mod_netcdf_MOD_netcdf_get_satt in libMODS.a(mod_netcdf.o)
___mod_netcdf_MOD_netcdf_get_fatt in libMODS.a(mod_netcdf.o)
___mod_netcdf_MOD_netcdf_inq_var in libMODS.a(mod_netcdf.o)
___mod_netcdf_MOD_netcdf_get_dim in libMODS.a(mod_netcdf.o)
"___netcdf_MOD_nf90_inquire_attribute", referenced from:
___mod_netcdf_MOD_netcdf_inq_var in libMODS.a(mod_netcdf.o)
"___netcdf_MOD_nf90_inquire_dimension", referenced from:
___mod_netcdf_MOD_netcdf_inq_var in libMODS.a(mod_netcdf.o)
___mod_netcdf_MOD_netcdf_get_dim in libMODS.a(mod_netcdf.o)
"___netcdf_MOD_nf90_inquire_variable", referenced from:
___mod_netcdf_MOD_netcdf_get_lvar_1d in libMODS.a(mod_netcdf.o)
___mod_netcdf_MOD_netcdf_get_lvar_0d in libMODS.a(mod_netcdf.o)
___mod_netcdf_MOD_netcdf_get_satt in libMODS.a(mod_netcdf.o)
___mod_netcdf_MOD_netcdf_get_fatt in libMODS.a(mod_netcdf.o)
___mod_netcdf_MOD_netcdf_inq_var in libMODS.a(mod_netcdf.o)
"___netcdf_MOD_nf90_open", referenced from:
___mod_netcdf_MOD_netcdf_open.part.0 in libMODS.a(mod_netcdf.o)
"___netcdf_MOD_nf90_put_att_eightbytereal", referenced from:
___def_var_mod_MOD_def_var in libUTIL.a(def_var.o)
"___netcdf_MOD_nf90_put_att_fourbyteint", referenced from:
___def_var_mod_MOD_def_var in libUTIL.a(def_var.o)
"___netcdf_MOD_nf90_put_att_fourbytereal", referenced from:
___def_var_mod_MOD_def_var in libUTIL.a(def_var.o)
"___netcdf_MOD_nf90_put_att_one_eightbytereal", referenced from:
___def_var_mod_MOD_def_var in libUTIL.a(def_var.o)
"___netcdf_MOD_nf90_put_att_one_fourbyteint", referenced from:
___def_var_mod_MOD_def_var in libUTIL.a(def_var.o)
"___netcdf_MOD_nf90_put_att_one_fourbytereal", referenced from:
___def_var_mod_MOD_def_var in libUTIL.a(def_var.o)
"___netcdf_MOD_nf90_put_att_text", referenced from:
_lbc_putatt_ in libUTIL.a(lbc.o)
_tadv_putatt_ in libUTIL.a(tadv.o)
___def_var_mod_MOD_def_var in libUTIL.a(def_var.o)
_def_info_ in libUTIL.a(def_info.o)
"___netcdf_MOD_nf90_put_var_1d_eightbytereal", referenced from:
___mod_netcdf_MOD_netcdf_put_fvar_1d in libMODS.a(mod_netcdf.o)
___mod_netcdf_MOD_netcdf_put_fvar_0d in libMODS.a(mod_netcdf.o)
___nf_fwrite2d_mod_MOD_nf_fwrite2d in libUTIL.a(nf_fwrite2d.o)
___nf_fwrite3d_mod_MOD_nf_fwrite3d in libUTIL.a(nf_fwrite3d.o)
"___netcdf_MOD_nf90_put_var_1d_fourbyteint", referenced from:
___mod_netcdf_MOD_netcdf_put_lvar_1d in libMODS.a(mod_netcdf.o)
___mod_netcdf_MOD_netcdf_put_lvar_0d in libMODS.a(mod_netcdf.o)
___mod_netcdf_MOD_netcdf_put_ivar_1d in libMODS.a(mod_netcdf.o)
___mod_netcdf_MOD_netcdf_put_ivar_0d in libMODS.a(mod_netcdf.o)
"___netcdf_MOD_nf90_put_var_1d_text", referenced from:
___mod_netcdf_MOD_netcdf_put_svar_1d in libMODS.a(mod_netcdf.o)
"___netcdf_MOD_nf90_put_var_2d_eightbytereal", referenced from:
___mod_netcdf_MOD_netcdf_put_fvar_2d in libMODS.a(mod_netcdf.o)
"___netcdf_MOD_nf90_put_var_2d_fourbyteint", referenced from:
___mod_netcdf_MOD_netcdf_put_lvar_2d in libMODS.a(mod_netcdf.o)
___mod_netcdf_MOD_netcdf_put_ivar_2d in libMODS.a(mod_netcdf.o)
"___netcdf_MOD_nf90_put_var_2d_text", referenced from:
___mod_netcdf_MOD_netcdf_put_svar_2d in libMODS.a(mod_netcdf.o)
"___netcdf_MOD_nf90_put_var_3d_eightbytereal", referenced from:
___mod_netcdf_MOD_netcdf_put_fvar_3d in libMODS.a(mod_netcdf.o)
"___netcdf_MOD_nf90_put_var_3d_text", referenced from:
___mod_netcdf_MOD_netcdf_put_svar_3d in libMODS.a(mod_netcdf.o)
"___netcdf_MOD_nf90_put_var_4d_eightbytereal", referenced from:
___mod_netcdf_MOD_netcdf_put_fvar_4d in libMODS.a(mod_netcdf.o)
"___netcdf_MOD_nf90_put_var_eightbytereal", referenced from:
___mod_netcdf_MOD_netcdf_put_fvar_0d in libMODS.a(mod_netcdf.o)
"___netcdf_MOD_nf90_put_var_fourbyteint", referenced from:
___mod_netcdf_MOD_netcdf_put_lvar_0d in libMODS.a(mod_netcdf.o)
___mod_netcdf_MOD_netcdf_put_ivar_0d in libMODS.a(mod_netcdf.o)
"___netcdf_MOD_nf90_put_var_text", referenced from:
___mod_netcdf_MOD_netcdf_put_svar_0d in libMODS.a(mod_netcdf.o)
"___netcdf_MOD_nf90_redef", referenced from:
___mod_netcdf_MOD_netcdf_redef in libMODS.a(mod_netcdf.o)
"___netcdf_MOD_nf90_set_fill", referenced from:
___mod_netcdf_MOD_netcdf_create in libMODS.a(mod_netcdf.o)
"___netcdf_MOD_nf90_strerror", referenced from:
_close_out_ in libUTIL.a(close_io.o)
___mod_netcdf_MOD_netcdf_open.part.0 in libMODS.a(mod_netcdf.o)
___mod_netcdf_MOD_netcdf_sync in libMODS.a(mod_netcdf.o)
___mod_netcdf_MOD_netcdf_redef in libMODS.a(mod_netcdf.o)
___mod_netcdf_MOD_netcdf_enddef in libMODS.a(mod_netcdf.o)
___mod_netcdf_MOD_netcdf_create in libMODS.a(mod_netcdf.o)
___mod_netcdf_MOD_netcdf_close in libMODS.a(mod_netcdf.o)
...
"___netcdf_MOD_nf90_sync", referenced from:
___mod_netcdf_MOD_netcdf_sync in libMODS.a(mod_netcdf.o)
ld: symbol(s) not found for architecture x86_64
collect2: error: ld returned 1 exit status
make: *** [/Users/sean/Documents/ROMS/Projects/Upwelling/romsS] Error 1

robertson
Site Admin
Posts: 227
Joined: Wed Feb 26, 2003 3:12 pm
Location: IMCS, Rutgers University

Re: Compilation error for build_roms.sh

#7 Unread post by robertson »

At the start of your output from the build script, which 'my_build_paths.sh' does it say it's loading and does it match the path to the one you have updated. From your latest post of the ROMS link line it looks like there aren't any NetCDF libraries linking at all now. What is returned when you type '/usr/local/bin/nf-config --flibs' at the command line?

osean
Posts: 47
Joined: Sat Jan 23, 2021 3:46 pm
Location: MIT-WHOI

Re: Compilation error for build_roms.sh

#8 Unread post by osean »

robertson wrote: Wed Jan 27, 2021 6:31 am At the start of your output from the build script, which 'my_build_paths.sh' does it say it's loading and does it match the path to the one you have updated. From your latest post of the ROMS link line it looks like there aren't any NetCDF libraries linking at all now. What is returned when you type '/usr/local/bin/nf-config --flibs' at the command line?
Interesting... to me it seems quite opaque whether the NetCDF and hdf5 libraries are linked... mostly trying by trial and error

From typing '/usr/local/bin/nf-config --flibs' into command line I get the following:

Code: Select all

-L/usr/local/Cellar/netcdf/4.7.4_2/lib
Is this the path I should put in the path file instead?

Thank you

osean
Posts: 47
Joined: Sat Jan 23, 2021 3:46 pm
Location: MIT-WHOI

Re: Compilation error for build_roms.sh

#9 Unread post by osean »

robertson wrote: Wed Jan 27, 2021 6:31 am At the start of your output from the build script, which 'my_build_paths.sh' does it say it's loading and does it match the path to the one you have updated. From your latest post of the ROMS link line it looks like there aren't any NetCDF libraries linking at all now. What is returned when you type '/usr/local/bin/nf-config --flibs' at the command line?
After typing in and getting the output I posted above, I tried to modify the path of NetCDF and hdf5 directory paths, assuming those outputs are telling me the paths.

Code: Select all

gfortran )
    export      ESMF_COMPILER=gfortran
    if [ -n "${USE_DEBUG:+1}" ]; then
      export        ESMF_BOPT=g
    else
      export        ESMF_BOPT=O
    fi
    export           ESMF_ABI=64
    export          ESMF_COMM=${which_MPI}
    export          ESMF_SITE=default

    #export      ARPACK_LIBDIR=/opt/gfortransoft/serial/ARPACK
    export      ARPACK_LIBDIR=/Users/sean/Documents/ROMS/trunk/Lib/ARPACK
    if [ -n "${USE_MPI:+1}" ]; then
      if [ "${which_MPI}" = "mpich2" ]; then
        #export       MPI_SOFT=/opt/gfortransoft/mpich2
	export       MPI_SOFT=/usr/local
      elif [ "${which_MPI}" = "openmpi" ]; then
        #export       MPI_SOFT=/opt/gfortransoft/openmpi
	export       MPI_SOFT=/usr/local
      elif [ "${which_MPI}" = "mvapich2" ]; then
        #export       MPI_SOFT=/opt/gfortransoft/mvapich2
	export       MPI_SOFT=/usr/local
      fi
      #export       MCT_INCDIR=${MPI_SOFT}/mct/include
      #export       MCT_LIBDIR=${MPI_SOFT}/mct/lib
      #export   PARPACK_LIBDIR=${MPI_SOFT}/PARPACK
      export       MCT_INCDIR=${MPI_SOFT}/include
      export       MCT_LIBDIR=${MPI_SOFT}/lib
      export   PARPACK_LIBDIR=/Users/sean/Documents/ROMS/trunk/Lib/ARPACK/PARPACK

    fi

    if [ ! -n "${SINGULARITY_COMMAND:+1}" ]; then
      if [ -n "${USE_NETCDF4:+1}" ]; then
        if [ -n "${USE_PARALLEL_IO:+1}" ] && [ -n "${USE_MPI:+1}" ]; then
          export       ESMF_DIR=${MPI_SOFT}/esmf_nc4
        # export         NETCDF=${MPI_SOFT}/netcdf4
         export         NETCDF=/usr/local/Cellar/netcdf/4.7.4_2
	  export      NF_CONFIG=${NETCDF}/bin/nf-config
          export  NETCDF_INCDIR=${NETCDF}/include
          export        NETCDF4=1
        else
          export       ESMF_DIR=${MPI_SOFT}/esmf_nc4
        # export         NETCDF=/opt/gfortransoft/serial/netcdf4
         export         NETCDF=/usr/local/Cellar/netcdf/4.7.4_2
	  export      NF_CONFIG=${NETCDF}/bin/nf-config
          export  NETCDF_INCDIR=${NETCDF}/include
          export        NETCDF4=1
        fi
      else
        export         ESMF_DIR=${MPI_SOFT}/esmf_nc3
      # export           NETCDF=/opt/gfortransoft/serial/netcdf3
	export           NETCDF=/usr/local/Cellar/netcdf/4.7.4_2
        export    NETCDF_INCDIR=${NETCDF}/include
        export    NETCDF_LIBDIR=${NETCDF}/lib
        export   NETCDF_classic=1
      fi
    fi

    if [ -n "${USE_PNETCDF:+1}" ]; then
      # export          PNETCDF=${MPI_SOFT}/pnetcdf
      export          PNETCDF=${MPI_SOFT}
      export   PNETCDF_LIBDIR=${PNETCDF}/lib
      export   PNETCDF_INCDIR=${PNETCDF}/include
    fi

    if [ -n "${USE_PIO:+1}" ]; then
     # export             PIO=${MPI_SOFT}/scorpio
      export              PIO=${MPI_SOFT}
      export       PIO_LIBDIR=${PIO}/lib
      export       PIO_INCDIR=${PIO}/include
    fi

    if [ -n "${USE_HDF5:+1}" ]; then
      if [ -n "${USE_PARALLEL_IO:+1}" ] && [ -n "${USE_MPI:+1}" ]; then
        #export           HDF5=${MPI_SOFT}/hdf5
	#export           HDF5=${MPI_SOFT}
	export            HDF5=/usr/local/Cellar/hdf5/1.12.0_1
        export    HDF5_LIBDIR=${HDF5}/lib
        export    HDF5_INCDIR=${HDF5}/include
      else
        #export           HDF5=/opt/gfortransoft/serial/hdf5
	#export           HDF5=${MPI_SOFT}
	export            HDF5=/usr/local/Cellar/hdf5/1.12.0_1
        export    HDF5_LIBDIR=${HDF5}/lib
        export    HDF5_INCDIR=${HDF5}/include
      fi
    fi
    ;;

The same problem, but with slightly different outputs (see the topic line):
-L/usr/local/Cellar/netcdf/4.7.4_2/lib -L/usr/local/Cellar/hdf5/1.12.0_1/lib -lhdf5_fortran -lhdf5hl_fortran -lhdf5 -lz
Undefined symbols for architecture x86_64:
"___netcdf_MOD_nf90_close", referenced from:
___mod_netcdf_MOD_netcdf_close in libMODS.a(mod_netcdf.o)
"___netcdf_MOD_nf90_create", referenced from:
___mod_netcdf_MOD_netcdf_create in libMODS.a(mod_netcdf.o)
"___netcdf_MOD_nf90_def_dim", referenced from:
_def_dim_ in libUTIL.a(def_dim.o)
"___netcdf_MOD_nf90_def_var_manydims", referenced from:
___def_var_mod_MOD_def_var in libUTIL.a(def_var.o)
"___netcdf_MOD_nf90_def_var_scalar", referenced from:
___def_var_mod_MOD_def_var in libUTIL.a(def_var.o)
"___netcdf_MOD_nf90_enddef", referenced from:
___mod_netcdf_MOD_netcdf_enddef in libMODS.a(mod_netcdf.o)
"___netcdf_MOD_nf90_get_att_one_eightbytereal", referenced from:
___mod_netcdf_MOD_netcdf_get_fatt in libMODS.a(mod_netcdf.o)
___mod_netcdf_MOD_netcdf_inq_var in libMODS.a(mod_netcdf.o)
"___netcdf_MOD_nf90_get_att_one_fourbyteint", referenced from:
___mod_netcdf_MOD_netcdf_inq_var in libMODS.a(mod_netcdf.o)
"___netcdf_MOD_nf90_get_att_text", referenced from:
___mod_netcdf_MOD_netcdf_close in libMODS.a(mod_netcdf.o)
___mod_netcdf_MOD_netcdf_get_satt in libMODS.a(mod_netcdf.o)
___mod_netcdf_MOD_netcdf_inq_var in libMODS.a(mod_netcdf.o)
_lbc_getatt_ in libUTIL.a(lbc.o)
"___netcdf_MOD_nf90_get_var_1d_eightbytereal", referenced from:
___mod_netcdf_MOD_netcdf_get_time_1d in libMODS.a(mod_netcdf.o)
___mod_netcdf_MOD_netcdf_get_time_0d in libMODS.a(mod_netcdf.o)
___mod_netcdf_MOD_netcdf_get_fvar_1d in libMODS.a(mod_netcdf.o)
___mod_netcdf_MOD_netcdf_get_fvar_0d in libMODS.a(mod_netcdf.o)
___nf_fread2d_mod_MOD_nf_fread2d in libUTIL.a(nf_fread2d.o)
___nf_fread3d_mod_MOD_nf_fread3d in libUTIL.a(nf_fread3d.o)
___nf_fread4d_mod_MOD_nf_fread4d in libUTIL.a(nf_fread4d.o)
...
"___netcdf_MOD_nf90_get_var_1d_fourbyteint", referenced from:
___mod_netcdf_MOD_netcdf_get_ivar_1d in libMODS.a(mod_netcdf.o)
___mod_netcdf_MOD_netcdf_get_ivar_0d in libMODS.a(mod_netcdf.o)
___mod_netcdf_MOD_netcdf_get_lvar_1d in libMODS.a(mod_netcdf.o)
___mod_netcdf_MOD_netcdf_get_lvar_0d in libMODS.a(mod_netcdf.o)
"___netcdf_MOD_nf90_get_var_1d_text", referenced from:
___mod_netcdf_MOD_netcdf_get_svar_1d in libMODS.a(mod_netcdf.o)
___mod_netcdf_MOD_netcdf_get_lvar_1d in libMODS.a(mod_netcdf.o)
"___netcdf_MOD_nf90_get_var_2d_eightbytereal", referenced from:
___mod_netcdf_MOD_netcdf_get_fvar_2d in libMODS.a(mod_netcdf.o)
"___netcdf_MOD_nf90_get_var_2d_fourbyteint", referenced from:
___mod_netcdf_MOD_netcdf_get_ivar_2d in libMODS.a(mod_netcdf.o)
"___netcdf_MOD_nf90_get_var_2d_text", referenced from:
___mod_netcdf_MOD_netcdf_get_svar_2d in libMODS.a(mod_netcdf.o)
"___netcdf_MOD_nf90_get_var_3d_eightbytereal", referenced from:
___mod_netcdf_MOD_netcdf_get_fvar_3d in libMODS.a(mod_netcdf.o)
"___netcdf_MOD_nf90_get_var_3d_text", referenced from:
___mod_netcdf_MOD_netcdf_get_svar_3d in libMODS.a(mod_netcdf.o)
"___netcdf_MOD_nf90_get_var_4d_eightbytereal", referenced from:
___mod_netcdf_MOD_netcdf_get_fvar_4d in libMODS.a(mod_netcdf.o)
"___netcdf_MOD_nf90_get_var_eightbytereal", referenced from:
___mod_netcdf_MOD_netcdf_get_time_0d in libMODS.a(mod_netcdf.o)
___mod_netcdf_MOD_netcdf_get_fvar_0d in libMODS.a(mod_netcdf.o)
"___netcdf_MOD_nf90_get_var_fourbyteint", referenced from:
___mod_netcdf_MOD_netcdf_get_ivar_0d in libMODS.a(mod_netcdf.o)
___mod_netcdf_MOD_netcdf_get_lvar_0d in libMODS.a(mod_netcdf.o)
"___netcdf_MOD_nf90_get_var_text", referenced from:
___mod_netcdf_MOD_netcdf_get_svar_0d in libMODS.a(mod_netcdf.o)
___mod_netcdf_MOD_netcdf_get_lvar_0d in libMODS.a(mod_netcdf.o)
"___netcdf_MOD_nf90_inq_attname", referenced from:
___mod_netcdf_MOD_netcdf_get_satt in libMODS.a(mod_netcdf.o)
___mod_netcdf_MOD_netcdf_get_fatt in libMODS.a(mod_netcdf.o)
___mod_netcdf_MOD_netcdf_inq_var in libMODS.a(mod_netcdf.o)
"___netcdf_MOD_nf90_inq_varid", referenced from:
___mod_netcdf_MOD_netcdf_put_svar_3d in libMODS.a(mod_netcdf.o)
___mod_netcdf_MOD_netcdf_put_svar_2d in libMODS.a(mod_netcdf.o)
___mod_netcdf_MOD_netcdf_put_svar_1d in libMODS.a(mod_netcdf.o)
___mod_netcdf_MOD_netcdf_put_svar_0d in libMODS.a(mod_netcdf.o)
___mod_netcdf_MOD_netcdf_put_lvar_2d in libMODS.a(mod_netcdf.o)
___mod_netcdf_MOD_netcdf_put_lvar_1d in libMODS.a(mod_netcdf.o)
___mod_netcdf_MOD_netcdf_put_lvar_0d in libMODS.a(mod_netcdf.o)
...
"___netcdf_MOD_nf90_inquire", referenced from:
___mod_netcdf_MOD_netcdf_get_satt in libMODS.a(mod_netcdf.o)
___mod_netcdf_MOD_netcdf_get_fatt in libMODS.a(mod_netcdf.o)
___mod_netcdf_MOD_netcdf_inq_var in libMODS.a(mod_netcdf.o)
___mod_netcdf_MOD_netcdf_get_dim in libMODS.a(mod_netcdf.o)
"___netcdf_MOD_nf90_inquire_attribute", referenced from:
___mod_netcdf_MOD_netcdf_inq_var in libMODS.a(mod_netcdf.o)
"___netcdf_MOD_nf90_inquire_dimension", referenced from:
___mod_netcdf_MOD_netcdf_inq_var in libMODS.a(mod_netcdf.o)
___mod_netcdf_MOD_netcdf_get_dim in libMODS.a(mod_netcdf.o)
"___netcdf_MOD_nf90_inquire_variable", referenced from:
___mod_netcdf_MOD_netcdf_get_lvar_1d in libMODS.a(mod_netcdf.o)
___mod_netcdf_MOD_netcdf_get_lvar_0d in libMODS.a(mod_netcdf.o)
___mod_netcdf_MOD_netcdf_get_satt in libMODS.a(mod_netcdf.o)
___mod_netcdf_MOD_netcdf_get_fatt in libMODS.a(mod_netcdf.o)
___mod_netcdf_MOD_netcdf_inq_var in libMODS.a(mod_netcdf.o)
"___netcdf_MOD_nf90_open", referenced from:
___mod_netcdf_MOD_netcdf_open in libMODS.a(mod_netcdf.o)
"___netcdf_MOD_nf90_put_att_eightbytereal", referenced from:
___def_var_mod_MOD_def_var in libUTIL.a(def_var.o)
"___netcdf_MOD_nf90_put_att_fourbyteint", referenced from:
___def_var_mod_MOD_def_var in libUTIL.a(def_var.o)
"___netcdf_MOD_nf90_put_att_fourbytereal", referenced from:
___def_var_mod_MOD_def_var in libUTIL.a(def_var.o)
"___netcdf_MOD_nf90_put_att_one_eightbytereal", referenced from:
___def_var_mod_MOD_def_var in libUTIL.a(def_var.o)
"___netcdf_MOD_nf90_put_att_one_fourbyteint", referenced from:
___def_var_mod_MOD_def_var in libUTIL.a(def_var.o)
"___netcdf_MOD_nf90_put_att_one_fourbytereal", referenced from:
___def_var_mod_MOD_def_var in libUTIL.a(def_var.o)
"___netcdf_MOD_nf90_put_att_text", referenced from:
_lbc_putatt_ in libUTIL.a(lbc.o)
_tadv_putatt_ in libUTIL.a(tadv.o)
___def_var_mod_MOD_def_var in libUTIL.a(def_var.o)
_def_info_ in libUTIL.a(def_info.o)
"___netcdf_MOD_nf90_put_var_1d_eightbytereal", referenced from:
___mod_netcdf_MOD_netcdf_put_fvar_1d in libMODS.a(mod_netcdf.o)
___mod_netcdf_MOD_netcdf_put_fvar_0d in libMODS.a(mod_netcdf.o)
___nf_fwrite2d_mod_MOD_nf_fwrite2d in libUTIL.a(nf_fwrite2d.o)
___nf_fwrite3d_mod_MOD_nf_fwrite3d in libUTIL.a(nf_fwrite3d.o)
"___netcdf_MOD_nf90_put_var_1d_fourbyteint", referenced from:
___mod_netcdf_MOD_netcdf_put_lvar_1d in libMODS.a(mod_netcdf.o)
___mod_netcdf_MOD_netcdf_put_lvar_0d in libMODS.a(mod_netcdf.o)
___mod_netcdf_MOD_netcdf_put_ivar_1d in libMODS.a(mod_netcdf.o)
___mod_netcdf_MOD_netcdf_put_ivar_0d in libMODS.a(mod_netcdf.o)
"___netcdf_MOD_nf90_put_var_1d_text", referenced from:
___mod_netcdf_MOD_netcdf_put_svar_1d in libMODS.a(mod_netcdf.o)
"___netcdf_MOD_nf90_put_var_2d_eightbytereal", referenced from:
___mod_netcdf_MOD_netcdf_put_fvar_2d in libMODS.a(mod_netcdf.o)
"___netcdf_MOD_nf90_put_var_2d_fourbyteint", referenced from:
___mod_netcdf_MOD_netcdf_put_lvar_2d in libMODS.a(mod_netcdf.o)
___mod_netcdf_MOD_netcdf_put_ivar_2d in libMODS.a(mod_netcdf.o)
"___netcdf_MOD_nf90_put_var_2d_text", referenced from:
___mod_netcdf_MOD_netcdf_put_svar_2d in libMODS.a(mod_netcdf.o)
"___netcdf_MOD_nf90_put_var_3d_eightbytereal", referenced from:
___mod_netcdf_MOD_netcdf_put_fvar_3d in libMODS.a(mod_netcdf.o)
"___netcdf_MOD_nf90_put_var_3d_text", referenced from:
___mod_netcdf_MOD_netcdf_put_svar_3d in libMODS.a(mod_netcdf.o)
"___netcdf_MOD_nf90_put_var_4d_eightbytereal", referenced from:
___mod_netcdf_MOD_netcdf_put_fvar_4d in libMODS.a(mod_netcdf.o)
"___netcdf_MOD_nf90_put_var_eightbytereal", referenced from:
___mod_netcdf_MOD_netcdf_put_fvar_0d in libMODS.a(mod_netcdf.o)
"___netcdf_MOD_nf90_put_var_fourbyteint", referenced from:
___mod_netcdf_MOD_netcdf_put_lvar_0d in libMODS.a(mod_netcdf.o)
___mod_netcdf_MOD_netcdf_put_ivar_0d in libMODS.a(mod_netcdf.o)
"___netcdf_MOD_nf90_put_var_text", referenced from:
___mod_netcdf_MOD_netcdf_put_svar_0d in libMODS.a(mod_netcdf.o)
"___netcdf_MOD_nf90_redef", referenced from:
___mod_netcdf_MOD_netcdf_redef in libMODS.a(mod_netcdf.o)
"___netcdf_MOD_nf90_set_fill", referenced from:
___mod_netcdf_MOD_netcdf_create in libMODS.a(mod_netcdf.o)
"___netcdf_MOD_nf90_strerror", referenced from:
_close_out_ in libUTIL.a(close_io.o)
___mod_netcdf_MOD_netcdf_sync in libMODS.a(mod_netcdf.o)
___mod_netcdf_MOD_netcdf_redef in libMODS.a(mod_netcdf.o)
___mod_netcdf_MOD_netcdf_open in libMODS.a(mod_netcdf.o)
___mod_netcdf_MOD_netcdf_enddef in libMODS.a(mod_netcdf.o)
___mod_netcdf_MOD_netcdf_create in libMODS.a(mod_netcdf.o)
___mod_netcdf_MOD_netcdf_close in libMODS.a(mod_netcdf.o)
...
"___netcdf_MOD_nf90_sync", referenced from:
___mod_netcdf_MOD_netcdf_sync in libMODS.a(mod_netcdf.o)
ld: symbol(s) not found for architecture x86_64
collect2: error: ld returned 1 exit status
make: *** [/Users/sean/Documents/ROMS/Projects/Upwelling/romsG] Error 1
Truly confused. Any idea how to move forward would be greatly appreciated. Thanks

osean
Posts: 47
Joined: Sat Jan 23, 2021 3:46 pm
Location: MIT-WHOI

Re: Compilation error for build_roms.sh

#10 Unread post by osean »

Having taken a more thorough look, it looks like the problem started after producing all the .f90 and .o files; the longer, more comprehensive version below, from the point where I think shows errors:
ar: creating archive /Users/sean/Documents/ROMS/Projects/Upwelling/Build_roms/libUTIL.a
/Library/Developer/CommandLineTools/usr/bin/ranlib: file: /Users/sean/Documents/ROMS/Projects/Upwelling/Build_roms/libUTIL.a(ADfromTL.o) has no symbols
/Library/Developer/CommandLineTools/usr/bin/ranlib: file: /Users/sean/Documents/ROMS/Projects/Upwelling/Build_roms/libUTIL.a(array_modes.o) has no symbols
/Library/Developer/CommandLineTools/usr/bin/ranlib: file: /Users/sean/Documents/ROMS/Projects/Upwelling/Build_roms/libUTIL.a(back_cost.o) has no symbols
/Library/Developer/CommandLineTools/usr/bin/ranlib: file: /Users/sean/Documents/ROMS/Projects/Upwelling/Build_roms/libUTIL.a(cgradient.o) has no symbols
/Library/Developer/CommandLineTools/usr/bin/ranlib: file: /Users/sean/Documents/ROMS/Projects/Upwelling/Build_roms/libUTIL.a(comp_Jb0.o) has no symbols
/Library/Developer/CommandLineTools/usr/bin/ranlib: file: /Users/sean/Documents/ROMS/Projects/Upwelling/Build_roms/libUTIL.a(congrad.o) has no symbols
/Library/Developer/CommandLineTools/usr/bin/ranlib: file: /Users/sean/Documents/ROMS/Projects/Upwelling/Build_roms/libUTIL.a(convolve.o) has no symbols
/Library/Developer/CommandLineTools/usr/bin/ranlib: file: /Users/sean/Documents/ROMS/Projects/Upwelling/Build_roms/libUTIL.a(cost_grad.o) has no symbols
/Library/Developer/CommandLineTools/usr/bin/ranlib: file: /Users/sean/Documents/ROMS/Projects/Upwelling/Build_roms/libUTIL.a(distribute.o) has no symbols
/Library/Developer/CommandLineTools/usr/bin/ranlib: file: /Users/sean/Documents/ROMS/Projects/Upwelling/Build_roms/libUTIL.a(dotproduct.o) has no symbols
/Library/Developer/CommandLineTools/usr/bin/ranlib: file: /Users/sean/Documents/ROMS/Projects/Upwelling/Build_roms/libUTIL.a(extract_obs.o) has no symbols
/Library/Developer/CommandLineTools/usr/bin/ranlib: file: /Users/sean/Documents/ROMS/Projects/Upwelling/Build_roms/libUTIL.a(frc_weak.o) has no symbols
/Library/Developer/CommandLineTools/usr/bin/ranlib: file: /Users/sean/Documents/ROMS/Projects/Upwelling/Build_roms/libUTIL.a(ini_adjust.o) has no symbols
/Library/Developer/CommandLineTools/usr/bin/ranlib: file: /Users/sean/Documents/ROMS/Projects/Upwelling/Build_roms/libUTIL.a(ini_lanczos.o) has no symbols
/Library/Developer/CommandLineTools/usr/bin/ranlib: file: /Users/sean/Documents/ROMS/Projects/Upwelling/Build_roms/libUTIL.a(inner2state.o) has no symbols
/Library/Developer/CommandLineTools/usr/bin/ranlib: file: /Users/sean/Documents/ROMS/Projects/Upwelling/Build_roms/libUTIL.a(lanc_resid.o) has no symbols
/Library/Developer/CommandLineTools/usr/bin/ranlib: file: /Users/sean/Documents/ROMS/Projects/Upwelling/Build_roms/libUTIL.a(mp_exchange.o) has no symbols
/Library/Developer/CommandLineTools/usr/bin/ranlib: file: /Users/sean/Documents/ROMS/Projects/Upwelling/Build_roms/libUTIL.a(normalization.o) has no symbols
/Library/Developer/CommandLineTools/usr/bin/ranlib: file: /Users/sean/Documents/ROMS/Projects/Upwelling/Build_roms/libUTIL.a(packing.o) has no symbols
/Library/Developer/CommandLineTools/usr/bin/ranlib: file: /Users/sean/Documents/ROMS/Projects/Upwelling/Build_roms/libUTIL.a(posterior.o) has no symbols
/Library/Developer/CommandLineTools/usr/bin/ranlib: file: /Users/sean/Documents/ROMS/Projects/Upwelling/Build_roms/libUTIL.a(posterior_var.o) has no symbols
/Library/Developer/CommandLineTools/usr/bin/ranlib: file: /Users/sean/Documents/ROMS/Projects/Upwelling/Build_roms/libUTIL.a(random_ic.o) has no symbols
/Library/Developer/CommandLineTools/usr/bin/ranlib: file: /Users/sean/Documents/ROMS/Projects/Upwelling/Build_roms/libUTIL.a(rpcg_lanczos.o) has no symbols
/Library/Developer/CommandLineTools/usr/bin/ranlib: file: /Users/sean/Documents/ROMS/Projects/Upwelling/Build_roms/libUTIL.a(set_2dfldr.o) has no symbols
/Library/Developer/CommandLineTools/usr/bin/ranlib: file: /Users/sean/Documents/ROMS/Projects/Upwelling/Build_roms/libUTIL.a(set_3dfldr.o) has no symbols
/Library/Developer/CommandLineTools/usr/bin/ranlib: file: /Users/sean/Documents/ROMS/Projects/Upwelling/Build_roms/libUTIL.a(set_masks.o) has no symbols
/Library/Developer/CommandLineTools/usr/bin/ranlib: file: /Users/sean/Documents/ROMS/Projects/Upwelling/Build_roms/libUTIL.a(sum_grad.o) has no symbols
/Library/Developer/CommandLineTools/usr/bin/ranlib: file: /Users/sean/Documents/ROMS/Projects/Upwelling/Build_roms/libUTIL.a(sum_imp.o) has no symbols
/Library/Developer/CommandLineTools/usr/bin/ranlib: file: /Users/sean/Documents/ROMS/Projects/Upwelling/Build_roms/libUTIL.a(wpoints.o) has no symbols
/Library/Developer/CommandLineTools/usr/bin/ranlib: file: /Users/sean/Documents/ROMS/Projects/Upwelling/Build_roms/libUTIL.a(wrt_ini.o) has no symbols
/Library/Developer/CommandLineTools/usr/bin/ranlib: file: /Users/sean/Documents/ROMS/Projects/Upwelling/Build_roms/libUTIL.a(zeta_balance.o) has no symbols
ranlib /Users/sean/Documents/ROMS/Projects/Upwelling/Build_roms/libUTIL.a
/Library/Developer/CommandLineTools/usr/bin/ranlib: file: /Users/sean/Documents/ROMS/Projects/Upwelling/Build_roms/libUTIL.a(ADfromTL.o) has no symbols
/Library/Developer/CommandLineTools/usr/bin/ranlib: file: /Users/sean/Documents/ROMS/Projects/Upwelling/Build_roms/libUTIL.a(array_modes.o) has no symbols
/Library/Developer/CommandLineTools/usr/bin/ranlib: file: /Users/sean/Documents/ROMS/Projects/Upwelling/Build_roms/libUTIL.a(back_cost.o) has no symbols
/Library/Developer/CommandLineTools/usr/bin/ranlib: file: /Users/sean/Documents/ROMS/Projects/Upwelling/Build_roms/libUTIL.a(cgradient.o) has no symbols
/Library/Developer/CommandLineTools/usr/bin/ranlib: file: /Users/sean/Documents/ROMS/Projects/Upwelling/Build_roms/libUTIL.a(comp_Jb0.o) has no symbols
/Library/Developer/CommandLineTools/usr/bin/ranlib: file: /Users/sean/Documents/ROMS/Projects/Upwelling/Build_roms/libUTIL.a(congrad.o) has no symbols
/Library/Developer/CommandLineTools/usr/bin/ranlib: file: /Users/sean/Documents/ROMS/Projects/Upwelling/Build_roms/libUTIL.a(convolve.o) has no symbols
/Library/Developer/CommandLineTools/usr/bin/ranlib: file: /Users/sean/Documents/ROMS/Projects/Upwelling/Build_roms/libUTIL.a(cost_grad.o) has no symbols
/Library/Developer/CommandLineTools/usr/bin/ranlib: file: /Users/sean/Documents/ROMS/Projects/Upwelling/Build_roms/libUTIL.a(distribute.o) has no symbols
/Library/Developer/CommandLineTools/usr/bin/ranlib: file: /Users/sean/Documents/ROMS/Projects/Upwelling/Build_roms/libUTIL.a(dotproduct.o) has no symbols
/Library/Developer/CommandLineTools/usr/bin/ranlib: file: /Users/sean/Documents/ROMS/Projects/Upwelling/Build_roms/libUTIL.a(extract_obs.o) has no symbols
/Library/Developer/CommandLineTools/usr/bin/ranlib: file: /Users/sean/Documents/ROMS/Projects/Upwelling/Build_roms/libUTIL.a(frc_weak.o) has no symbols
/Library/Developer/CommandLineTools/usr/bin/ranlib: file: /Users/sean/Documents/ROMS/Projects/Upwelling/Build_roms/libUTIL.a(ini_adjust.o) has no symbols
/Library/Developer/CommandLineTools/usr/bin/ranlib: file: /Users/sean/Documents/ROMS/Projects/Upwelling/Build_roms/libUTIL.a(ini_lanczos.o) has no symbols
/Library/Developer/CommandLineTools/usr/bin/ranlib: file: /Users/sean/Documents/ROMS/Projects/Upwelling/Build_roms/libUTIL.a(inner2state.o) has no symbols
/Library/Developer/CommandLineTools/usr/bin/ranlib: file: /Users/sean/Documents/ROMS/Projects/Upwelling/Build_roms/libUTIL.a(lanc_resid.o) has no symbols
/Library/Developer/CommandLineTools/usr/bin/ranlib: file: /Users/sean/Documents/ROMS/Projects/Upwelling/Build_roms/libUTIL.a(mp_exchange.o) has no symbols
/Library/Developer/CommandLineTools/usr/bin/ranlib: file: /Users/sean/Documents/ROMS/Projects/Upwelling/Build_roms/libUTIL.a(normalization.o) has no symbols
/Library/Developer/CommandLineTools/usr/bin/ranlib: file: /Users/sean/Documents/ROMS/Projects/Upwelling/Build_roms/libUTIL.a(packing.o) has no symbols
/Library/Developer/CommandLineTools/usr/bin/ranlib: file: /Users/sean/Documents/ROMS/Projects/Upwelling/Build_roms/libUTIL.a(posterior.o) has no symbols
/Library/Developer/CommandLineTools/usr/bin/ranlib: file: /Users/sean/Documents/ROMS/Projects/Upwelling/Build_roms/libUTIL.a(posterior_var.o) has no symbols
/Library/Developer/CommandLineTools/usr/bin/ranlib: file: /Users/sean/Documents/ROMS/Projects/Upwelling/Build_roms/libUTIL.a(random_ic.o) has no symbols
/Library/Developer/CommandLineTools/usr/bin/ranlib: file: /Users/sean/Documents/ROMS/Projects/Upwelling/Build_roms/libUTIL.a(rpcg_lanczos.o) has no symbols
/Library/Developer/CommandLineTools/usr/bin/ranlib: file: /Users/sean/Documents/ROMS/Projects/Upwelling/Build_roms/libUTIL.a(set_2dfldr.o) has no symbols
/Library/Developer/CommandLineTools/usr/bin/ranlib: file: /Users/sean/Documents/ROMS/Projects/Upwelling/Build_roms/libUTIL.a(set_3dfldr.o) has no symbols
/Library/Developer/CommandLineTools/usr/bin/ranlib: file: /Users/sean/Documents/ROMS/Projects/Upwelling/Build_roms/libUTIL.a(set_masks.o) has no symbols
/Library/Developer/CommandLineTools/usr/bin/ranlib: file: /Users/sean/Documents/ROMS/Projects/Upwelling/Build_roms/libUTIL.a(sum_grad.o) has no symbols
/Library/Developer/CommandLineTools/usr/bin/ranlib: file: /Users/sean/Documents/ROMS/Projects/Upwelling/Build_roms/libUTIL.a(sum_imp.o) has no symbols
/Library/Developer/CommandLineTools/usr/bin/ranlib: file: /Users/sean/Documents/ROMS/Projects/Upwelling/Build_roms/libUTIL.a(wpoints.o) has no symbols
/Library/Developer/CommandLineTools/usr/bin/ranlib: file: /Users/sean/Documents/ROMS/Projects/Upwelling/Build_roms/libUTIL.a(wrt_ini.o) has no symbols
/Library/Developer/CommandLineTools/usr/bin/ranlib: file: /Users/sean/Documents/ROMS/Projects/Upwelling/Build_roms/libUTIL.a(zeta_balance.o) has no symbols
ar -r /Users/sean/Documents/ROMS/Projects/Upwelling/Build_roms/libNLM_bio.a /Users/sean/Documents/ROMS/Projects/Upwelling/Build_roms/biology.o /Users/sean/Documents/ROMS/Projects/Upwelling/Build_roms/biology_floats.o
ar: creating archive /Users/sean/Documents/ROMS/Projects/Upwelling/Build_roms/libNLM_bio.a
/Library/Developer/CommandLineTools/usr/bin/ranlib: file: /Users/sean/Documents/ROMS/Projects/Upwelling/Build_roms/libNLM_bio.a(biology.o) has no symbols
/Library/Developer/CommandLineTools/usr/bin/ranlib: file: /Users/sean/Documents/ROMS/Projects/Upwelling/Build_roms/libNLM_bio.a(biology_floats.o) has no symbols
ranlib /Users/sean/Documents/ROMS/Projects/Upwelling/Build_roms/libNLM_bio.a
/Library/Developer/CommandLineTools/usr/bin/ranlib: file: /Users/sean/Documents/ROMS/Projects/Upwelling/Build_roms/libNLM_bio.a(biology.o) has no symbols
/Library/Developer/CommandLineTools/usr/bin/ranlib: file: /Users/sean/Documents/ROMS/Projects/Upwelling/Build_roms/libNLM_bio.a(biology_floats.o) has no symbols
warning: /Library/Developer/CommandLineTools/usr/bin/ranlib: archive library: /Users/sean/Documents/ROMS/Projects/Upwelling/Build_roms/libNLM_bio.a the table of contents is empty (no object file members in the library define global symbols)
ar -r /Users/sean/Documents/ROMS/Projects/Upwelling/Build_roms/libNLM_sed.a /Users/sean/Documents/ROMS/Projects/Upwelling/Build_roms/sed_bed.o /Users/sean/Documents/ROMS/Projects/Upwelling/Build_roms/sed_bedload.o /Users/sean/Documents/ROMS/Projects/Upwelling/Build_roms/sed_fluxes.o /Users/sean/Documents/ROMS/Projects/Upwelling/Build_roms/sed_settling.o /Users/sean/Documents/ROMS/Projects/Upwelling/Build_roms/sed_surface.o /Users/sean/Documents/ROMS/Projects/Upwelling/Build_roms/sediment.o
ar: creating archive /Users/sean/Documents/ROMS/Projects/Upwelling/Build_roms/libNLM_sed.a
/Library/Developer/CommandLineTools/usr/bin/ranlib: file: /Users/sean/Documents/ROMS/Projects/Upwelling/Build_roms/libNLM_sed.a(sed_bed.o) has no symbols
/Library/Developer/CommandLineTools/usr/bin/ranlib: file: /Users/sean/Documents/ROMS/Projects/Upwelling/Build_roms/libNLM_sed.a(sed_bedload.o) has no symbols
/Library/Developer/CommandLineTools/usr/bin/ranlib: file: /Users/sean/Documents/ROMS/Projects/Upwelling/Build_roms/libNLM_sed.a(sed_fluxes.o) has no symbols
/Library/Developer/CommandLineTools/usr/bin/ranlib: file: /Users/sean/Documents/ROMS/Projects/Upwelling/Build_roms/libNLM_sed.a(sed_settling.o) has no symbols
/Library/Developer/CommandLineTools/usr/bin/ranlib: file: /Users/sean/Documents/ROMS/Projects/Upwelling/Build_roms/libNLM_sed.a(sed_surface.o) has no symbols
/Library/Developer/CommandLineTools/usr/bin/ranlib: file: /Users/sean/Documents/ROMS/Projects/Upwelling/Build_roms/libNLM_sed.a(sediment.o) has no symbols
ranlib /Users/sean/Documents/ROMS/Projects/Upwelling/Build_roms/libNLM_sed.a
/Library/Developer/CommandLineTools/usr/bin/ranlib: file: /Users/sean/Documents/ROMS/Projects/Upwelling/Build_roms/libNLM_sed.a(sed_bed.o) has no symbols
/Library/Developer/CommandLineTools/usr/bin/ranlib: file: /Users/sean/Documents/ROMS/Projects/Upwelling/Build_roms/libNLM_sed.a(sed_bedload.o) has no symbols
/Library/Developer/CommandLineTools/usr/bin/ranlib: file: /Users/sean/Documents/ROMS/Projects/Upwelling/Build_roms/libNLM_sed.a(sed_fluxes.o) has no symbols
/Library/Developer/CommandLineTools/usr/bin/ranlib: file: /Users/sean/Documents/ROMS/Projects/Upwelling/Build_roms/libNLM_sed.a(sed_settling.o) has no symbols
/Library/Developer/CommandLineTools/usr/bin/ranlib: file: /Users/sean/Documents/ROMS/Projects/Upwelling/Build_roms/libNLM_sed.a(sed_surface.o) has no symbols
/Library/Developer/CommandLineTools/usr/bin/ranlib: file: /Users/sean/Documents/ROMS/Projects/Upwelling/Build_roms/libNLM_sed.a(sediment.o) has no symbols
warning: /Library/Developer/CommandLineTools/usr/bin/ranlib: archive library: /Users/sean/Documents/ROMS/Projects/Upwelling/Build_roms/libNLM_sed.a the table of contents is empty (no object file members in the library define global symbols)
ar -r /Users/sean/Documents/ROMS/Projects/Upwelling/Build_roms/libANA.a /Users/sean/Documents/ROMS/Projects/Upwelling/Build_roms/analytical.o
ar: creating archive /Users/sean/Documents/ROMS/Projects/Upwelling/Build_roms/libANA.a
ranlib /Users/sean/Documents/ROMS/Projects/Upwelling/Build_roms/libANA.a
/usr/bin/cpp -P -traditional -w -DDARWIN -DX86_64 -DGFORTRAN -D'ROOT_DIR="/Users/sean/Documents/ROMS/trunk"' -DUPWELLING -D'HEADER="upwelling.h"' -D'ROMS_HEADER="/Users/sean/Documents/ROMS/Projects/Upwelling/upwelling.h"' -DNestedGrids= -D'ANALYTICAL_DIR="/Users/sean/Documents/ROMS/Projects/Upwelling"' -D'MY_ANALYTICAL="on"' -D'SVN_URL="https://www.myroms.org/svn/src/trunk"' -D'SVN_REV="1053"' -IROMS/Include -I/Users/sean/Documents/ROMS/Projects/Upwelling -IROMS/Nonlinear -IROMS/Nonlinear/Biology -IROMS/Nonlinear/Sediment -IROMS/Utility -IROMS/Drivers -IROMS/Functionals -I/Users/sean/Documents/ROMS/Projects/Upwelling -IMaster -ICompilers -D'HEADER_DIR="/Users/sean/Documents/ROMS/Projects/Upwelling"' ROMS/Modules/mod_arrays.F > /Users/sean/Documents/ROMS/Projects/Upwelling/Build_roms/mod_arrays.f90
ROMS/Bin/cpp_clean /Users/sean/Documents/ROMS/Projects/Upwelling/Build_roms/mod_arrays.f90
cd /Users/sean/Documents/ROMS/Projects/Upwelling/Build_roms; /usr/local/bin/gfortran -c -frepack-arrays -O3 -ffast-math mod_arrays.f90
ar -r /Users/sean/Documents/ROMS/Projects/Upwelling/Build_roms/libMODS.a /Users/sean/Documents/ROMS/Projects/Upwelling/Build_roms/mod_arrays.o /Users/sean/Documents/ROMS/Projects/Upwelling/Build_roms/mod_average.o /Users/sean/Documents/ROMS/Projects/Upwelling/Build_roms/mod_bbl.o /Users/sean/Documents/ROMS/Projects/Upwelling/Build_roms/mod_behavior.o /Users/sean/Documents/ROMS/Projects/Upwelling/Build_roms/mod_biology.o /Users/sean/Documents/ROMS/Projects/Upwelling/Build_roms/mod_boundary.o /Users/sean/Documents/ROMS/Projects/Upwelling/Build_roms/mod_clima.o /Users/sean/Documents/ROMS/Projects/Upwelling/Build_roms/mod_coupler.o /Users/sean/Documents/ROMS/Projects/Upwelling/Build_roms/mod_coupling.o /Users/sean/Documents/ROMS/Projects/Upwelling/Build_roms/mod_diags.o /Users/sean/Documents/ROMS/Projects/Upwelling/Build_roms/mod_eclight.o /Users/sean/Documents/ROMS/Projects/Upwelling/Build_roms/mod_eoscoef.o /Users/sean/Documents/ROMS/Projects/Upwelling/Build_roms/mod_floats.o /Users/sean/Documents/ROMS/Projects/Upwelling/Build_roms/mod_forces.o /Users/sean/Documents/ROMS/Projects/Upwelling/Build_roms/mod_fourdvar.o /Users/sean/Documents/ROMS/Projects/Upwelling/Build_roms/mod_grid.o /Users/sean/Documents/ROMS/Projects/Upwelling/Build_roms/mod_iounits.o /Users/sean/Documents/ROMS/Projects/Upwelling/Build_roms/mod_kinds.o /Users/sean/Documents/ROMS/Projects/Upwelling/Build_roms/mod_mixing.o /Users/sean/Documents/ROMS/Projects/Upwelling/Build_roms/mod_ncparam.o /Users/sean/Documents/ROMS/Projects/Upwelling/Build_roms/mod_nesting.o /Users/sean/Documents/ROMS/Projects/Upwelling/Build_roms/mod_netcdf.o /Users/sean/Documents/ROMS/Projects/Upwelling/Build_roms/mod_ocean.o /Users/sean/Documents/ROMS/Projects/Upwelling/Build_roms/mod_parallel.o /Users/sean/Documents/ROMS/Projects/Upwelling/Build_roms/mod_param.o /Users/sean/Documents/ROMS/Projects/Upwelling/Build_roms/mod_scalars.o /Users/sean/Documents/ROMS/Projects/Upwelling/Build_roms/mod_sedbed.o /Users/sean/Documents/ROMS/Projects/Upwelling/Build_roms/mod_sediment.o /Users/sean/Documents/ROMS/Projects/Upwelling/Build_roms/mod_sources.o /Users/sean/Documents/ROMS/Projects/Upwelling/Build_roms/mod_stepping.o /Users/sean/Documents/ROMS/Projects/Upwelling/Build_roms/mod_storage.o /Users/sean/Documents/ROMS/Projects/Upwelling/Build_roms/mod_strings.o /Users/sean/Documents/ROMS/Projects/Upwelling/Build_roms/mod_tides.o
ar: creating archive /Users/sean/Documents/ROMS/Projects/Upwelling/Build_roms/libMODS.a
/Library/Developer/CommandLineTools/usr/bin/ranlib: file: /Users/sean/Documents/ROMS/Projects/Upwelling/Build_roms/libMODS.a(mod_bbl.o) has no symbols
/Library/Developer/CommandLineTools/usr/bin/ranlib: file: /Users/sean/Documents/ROMS/Projects/Upwelling/Build_roms/libMODS.a(mod_behavior.o) has no symbols
/Library/Developer/CommandLineTools/usr/bin/ranlib: file: /Users/sean/Documents/ROMS/Projects/Upwelling/Build_roms/libMODS.a(mod_biology.o) has no symbols
/Library/Developer/CommandLineTools/usr/bin/ranlib: file: /Users/sean/Documents/ROMS/Projects/Upwelling/Build_roms/libMODS.a(mod_coupler.o) has no symbols
/Library/Developer/CommandLineTools/usr/bin/ranlib: file: /Users/sean/Documents/ROMS/Projects/Upwelling/Build_roms/libMODS.a(mod_eclight.o) has no symbols
/Library/Developer/CommandLineTools/usr/bin/ranlib: file: /Users/sean/Documents/ROMS/Projects/Upwelling/Build_roms/libMODS.a(mod_eoscoef.o) has no symbols
/Library/Developer/CommandLineTools/usr/bin/ranlib: file: /Users/sean/Documents/ROMS/Projects/Upwelling/Build_roms/libMODS.a(mod_floats.o) has no symbols
/Library/Developer/CommandLineTools/usr/bin/ranlib: file: /Users/sean/Documents/ROMS/Projects/Upwelling/Build_roms/libMODS.a(mod_fourdvar.o) has no symbols
/Library/Developer/CommandLineTools/usr/bin/ranlib: file: /Users/sean/Documents/ROMS/Projects/Upwelling/Build_roms/libMODS.a(mod_kinds.o) has no symbols
/Library/Developer/CommandLineTools/usr/bin/ranlib: file: /Users/sean/Documents/ROMS/Projects/Upwelling/Build_roms/libMODS.a(mod_nesting.o) has no symbols
/Library/Developer/CommandLineTools/usr/bin/ranlib: file: /Users/sean/Documents/ROMS/Projects/Upwelling/Build_roms/libMODS.a(mod_sedbed.o) has no symbols
/Library/Developer/CommandLineTools/usr/bin/ranlib: file: /Users/sean/Documents/ROMS/Projects/Upwelling/Build_roms/libMODS.a(mod_sediment.o) has no symbols
/Library/Developer/CommandLineTools/usr/bin/ranlib: file: /Users/sean/Documents/ROMS/Projects/Upwelling/Build_roms/libMODS.a(mod_storage.o) has no symbols
/Library/Developer/CommandLineTools/usr/bin/ranlib: file: /Users/sean/Documents/ROMS/Projects/Upwelling/Build_roms/libMODS.a(mod_tides.o) has no symbols
ranlib /Users/sean/Documents/ROMS/Projects/Upwelling/Build_roms/libMODS.a
/Library/Developer/CommandLineTools/usr/bin/ranlib: file: /Users/sean/Documents/ROMS/Projects/Upwelling/Build_roms/libMODS.a(mod_bbl.o) has no symbols
/Library/Developer/CommandLineTools/usr/bin/ranlib: file: /Users/sean/Documents/ROMS/Projects/Upwelling/Build_roms/libMODS.a(mod_behavior.o) has no symbols
/Library/Developer/CommandLineTools/usr/bin/ranlib: file: /Users/sean/Documents/ROMS/Projects/Upwelling/Build_roms/libMODS.a(mod_biology.o) has no symbols
/Library/Developer/CommandLineTools/usr/bin/ranlib: file: /Users/sean/Documents/ROMS/Projects/Upwelling/Build_roms/libMODS.a(mod_coupler.o) has no symbols
/Library/Developer/CommandLineTools/usr/bin/ranlib: file: /Users/sean/Documents/ROMS/Projects/Upwelling/Build_roms/libMODS.a(mod_eclight.o) has no symbols
/Library/Developer/CommandLineTools/usr/bin/ranlib: file: /Users/sean/Documents/ROMS/Projects/Upwelling/Build_roms/libMODS.a(mod_eoscoef.o) has no symbols
/Library/Developer/CommandLineTools/usr/bin/ranlib: file: /Users/sean/Documents/ROMS/Projects/Upwelling/Build_roms/libMODS.a(mod_floats.o) has no symbols
/Library/Developer/CommandLineTools/usr/bin/ranlib: file: /Users/sean/Documents/ROMS/Projects/Upwelling/Build_roms/libMODS.a(mod_fourdvar.o) has no symbols
/Library/Developer/CommandLineTools/usr/bin/ranlib: file: /Users/sean/Documents/ROMS/Projects/Upwelling/Build_roms/libMODS.a(mod_kinds.o) has no symbols
/Library/Developer/CommandLineTools/usr/bin/ranlib: file: /Users/sean/Documents/ROMS/Projects/Upwelling/Build_roms/libMODS.a(mod_nesting.o) has no symbols
/Library/Developer/CommandLineTools/usr/bin/ranlib: file: /Users/sean/Documents/ROMS/Projects/Upwelling/Build_roms/libMODS.a(mod_sedbed.o) has no symbols
/Library/Developer/CommandLineTools/usr/bin/ranlib: file: /Users/sean/Documents/ROMS/Projects/Upwelling/Build_roms/libMODS.a(mod_sediment.o) has no symbols
/Library/Developer/CommandLineTools/usr/bin/ranlib: file: /Users/sean/Documents/ROMS/Projects/Upwelling/Build_roms/libMODS.a(mod_storage.o) has no symbols
/Library/Developer/CommandLineTools/usr/bin/ranlib: file: /Users/sean/Documents/ROMS/Projects/Upwelling/Build_roms/libMODS.a(mod_tides.o) has no symbols
/usr/bin/cpp -P -traditional -w -DDARWIN -DX86_64 -DGFORTRAN -D'ROOT_DIR="/Users/sean/Documents/ROMS/trunk"' -DUPWELLING -D'HEADER="upwelling.h"' -D'ROMS_HEADER="/Users/sean/Documents/ROMS/Projects/Upwelling/upwelling.h"' -DNestedGrids= -D'ANALYTICAL_DIR="/Users/sean/Documents/ROMS/Projects/Upwelling"' -D'MY_ANALYTICAL="on"' -D'SVN_URL="https://www.myroms.org/svn/src/trunk"' -D'SVN_REV="1053"' -IROMS/Include -I/Users/sean/Documents/ROMS/Projects/Upwelling -IROMS/Nonlinear -IROMS/Nonlinear/Biology -IROMS/Nonlinear/Sediment -IROMS/Utility -IROMS/Drivers -IROMS/Functionals -I/Users/sean/Documents/ROMS/Projects/Upwelling -IMaster -ICompilers -D'HEADER_DIR="/Users/sean/Documents/ROMS/Projects/Upwelling"' Master/esmf_roms.F > /Users/sean/Documents/ROMS/Projects/Upwelling/Build_roms/esmf_roms.f90
ROMS/Bin/cpp_clean /Users/sean/Documents/ROMS/Projects/Upwelling/Build_roms/esmf_roms.f90
cd /Users/sean/Documents/ROMS/Projects/Upwelling/Build_roms; /usr/local/bin/gfortran -c -frepack-arrays -O3 -ffast-math esmf_roms.f90
/usr/bin/cpp -P -traditional -w -DDARWIN -DX86_64 -DGFORTRAN -D'ROOT_DIR="/Users/sean/Documents/ROMS/trunk"' -DUPWELLING -D'HEADER="upwelling.h"' -D'ROMS_HEADER="/Users/sean/Documents/ROMS/Projects/Upwelling/upwelling.h"' -DNestedGrids= -D'ANALYTICAL_DIR="/Users/sean/Documents/ROMS/Projects/Upwelling"' -D'MY_ANALYTICAL="on"' -D'SVN_URL="https://www.myroms.org/svn/src/trunk"' -D'SVN_REV="1053"' -IROMS/Include -I/Users/sean/Documents/ROMS/Projects/Upwelling -IROMS/Nonlinear -IROMS/Nonlinear/Biology -IROMS/Nonlinear/Sediment -IROMS/Utility -IROMS/Drivers -IROMS/Functionals -I/Users/sean/Documents/ROMS/Projects/Upwelling -IMaster -ICompilers -D'HEADER_DIR="/Users/sean/Documents/ROMS/Projects/Upwelling"' Master/master.F > /Users/sean/Documents/ROMS/Projects/Upwelling/Build_roms/master.f90
ROMS/Bin/cpp_clean /Users/sean/Documents/ROMS/Projects/Upwelling/Build_roms/master.f90
cd /Users/sean/Documents/ROMS/Projects/Upwelling/Build_roms; /usr/local/bin/gfortran -c -frepack-arrays -O3 -ffast-math master.f90
/usr/local/bin/gfortran -frepack-arrays -O3 -ffast-math -frepack-arrays -O3 -ffast-math /Users/sean/Documents/ROMS/Projects/Upwelling/Build_roms/coupler.o /Users/sean/Documents/ROMS/Projects/Upwelling/Build_roms/esmf_roms.o /Users/sean/Documents/ROMS/Projects/Upwelling/Build_roms/master.o /Users/sean/Documents/ROMS/Projects/Upwelling/Build_roms/ocean_control.o /Users/sean/Documents/ROMS/Projects/Upwelling/Build_roms/propagator.o /Users/sean/Documents/ROMS/Projects/Upwelling/Build_roms/roms_export.o /Users/sean/Documents/ROMS/Projects/Upwelling/Build_roms/roms_import.o -o /Users/sean/Documents/ROMS/Projects/Upwelling/romsS /Users/sean/Documents/ROMS/Projects/Upwelling/Build_roms/libNLM.a /Users/sean/Documents/ROMS/Projects/Upwelling/Build_roms/libDRIVER.a /Users/sean/Documents/ROMS/Projects/Upwelling/Build_roms/libUTIL.a /Users/sean/Documents/ROMS/Projects/Upwelling/Build_roms/libNLM.a /Users/sean/Documents/ROMS/Projects/Upwelling/Build_roms/libNLM_bio.a /Users/sean/Documents/ROMS/Projects/Upwelling/Build_roms/libNLM_sed.a /Users/sean/Documents/ROMS/Projects/Upwelling/Build_roms/libANA.a /Users/sean/Documents/ROMS/Projects/Upwelling/Build_roms/libUTIL.a /Users/sean/Documents/ROMS/Projects/Upwelling/Build_roms/libDRIVER.a /Users/sean/Documents/ROMS/Projects/Upwelling/Build_roms/libMODS.a /Users/sean/Documents/ROMS/Projects/Upwelling/Build_roms/libNLM.a -L/usr/local/Cellar/netcdf/4.7.4_2/lib -L/usr/local/Cellar/hdf5/1.12.0_1/lib -lhdf5_fortran -lhdf5hl_fortran -lhdf5 -lz
Undefined symbols for architecture x86_64:
"___netcdf_MOD_nf90_close", referenced from:
___mod_netcdf_MOD_netcdf_close in libMODS.a(mod_netcdf.o)
"___netcdf_MOD_nf90_create", referenced from:
___mod_netcdf_MOD_netcdf_create in libMODS.a(mod_netcdf.o)
"___netcdf_MOD_nf90_def_dim", referenced from:
_def_dim_ in libUTIL.a(def_dim.o)
"___netcdf_MOD_nf90_def_var_manydims", referenced from:
___def_var_mod_MOD_def_var in libUTIL.a(def_var.o)
"___netcdf_MOD_nf90_def_var_scalar", referenced from:
___def_var_mod_MOD_def_var in libUTIL.a(def_var.o)
"___netcdf_MOD_nf90_enddef", referenced from:
___mod_netcdf_MOD_netcdf_enddef in libMODS.a(mod_netcdf.o)
"___netcdf_MOD_nf90_get_att_one_eightbytereal", referenced from:
___mod_netcdf_MOD_netcdf_get_fatt in libMODS.a(mod_netcdf.o)
___mod_netcdf_MOD_netcdf_inq_var in libMODS.a(mod_netcdf.o)
"___netcdf_MOD_nf90_get_att_one_fourbyteint", referenced from:
___mod_netcdf_MOD_netcdf_inq_var in libMODS.a(mod_netcdf.o)
"___netcdf_MOD_nf90_get_att_text", referenced from:
___mod_netcdf_MOD_netcdf_close in libMODS.a(mod_netcdf.o)
___mod_netcdf_MOD_netcdf_get_satt in libMODS.a(mod_netcdf.o)
___mod_netcdf_MOD_netcdf_inq_var in libMODS.a(mod_netcdf.o)
_lbc_getatt_ in libUTIL.a(lbc.o)
"___netcdf_MOD_nf90_get_var_1d_eightbytereal", referenced from:
___mod_netcdf_MOD_netcdf_get_fvar_0d in libMODS.a(mod_netcdf.o)
___mod_netcdf_MOD_netcdf_get_time_1d in libMODS.a(mod_netcdf.o)
___mod_netcdf_MOD_netcdf_get_time_0d in libMODS.a(mod_netcdf.o)
___mod_netcdf_MOD_netcdf_get_fvar_1d in libMODS.a(mod_netcdf.o)
___nf_fread2d_mod_MOD_nf_fread2d in libUTIL.a(nf_fread2d.o)
___nf_fread3d_mod_MOD_nf_fread3d in libUTIL.a(nf_fread3d.o)
"___netcdf_MOD_nf90_get_var_1d_fourbyteint", referenced from:
___mod_netcdf_MOD_netcdf_get_ivar_1d in libMODS.a(mod_netcdf.o)
___mod_netcdf_MOD_netcdf_get_ivar_0d in libMODS.a(mod_netcdf.o)
___mod_netcdf_MOD_netcdf_get_lvar_1d in libMODS.a(mod_netcdf.o)
___mod_netcdf_MOD_netcdf_get_lvar_0d in libMODS.a(mod_netcdf.o)
"___netcdf_MOD_nf90_get_var_1d_text", referenced from:
___mod_netcdf_MOD_netcdf_get_svar_1d in libMODS.a(mod_netcdf.o)
___mod_netcdf_MOD_netcdf_get_lvar_1d in libMODS.a(mod_netcdf.o)
"___netcdf_MOD_nf90_get_var_2d_eightbytereal", referenced from:
___mod_netcdf_MOD_netcdf_get_fvar_2d in libMODS.a(mod_netcdf.o)
"___netcdf_MOD_nf90_get_var_2d_fourbyteint", referenced from:
___mod_netcdf_MOD_netcdf_get_ivar_2d in libMODS.a(mod_netcdf.o)
"___netcdf_MOD_nf90_get_var_2d_text", referenced from:
___mod_netcdf_MOD_netcdf_get_svar_2d in libMODS.a(mod_netcdf.o)
"___netcdf_MOD_nf90_get_var_3d_eightbytereal", referenced from:
___mod_netcdf_MOD_netcdf_get_fvar_3d in libMODS.a(mod_netcdf.o)
"___netcdf_MOD_nf90_get_var_3d_text", referenced from:
___mod_netcdf_MOD_netcdf_get_svar_3d in libMODS.a(mod_netcdf.o)
"___netcdf_MOD_nf90_get_var_4d_eightbytereal", referenced from:
___mod_netcdf_MOD_netcdf_get_fvar_4d in libMODS.a(mod_netcdf.o)
"___netcdf_MOD_nf90_get_var_eightbytereal", referenced from:
___mod_netcdf_MOD_netcdf_get_fvar_0d in libMODS.a(mod_netcdf.o)
___mod_netcdf_MOD_netcdf_get_time_0d in libMODS.a(mod_netcdf.o)
"___netcdf_MOD_nf90_get_var_fourbyteint", referenced from:
___mod_netcdf_MOD_netcdf_get_ivar_0d in libMODS.a(mod_netcdf.o)
___mod_netcdf_MOD_netcdf_get_lvar_0d in libMODS.a(mod_netcdf.o)
"___netcdf_MOD_nf90_get_var_text", referenced from:
___mod_netcdf_MOD_netcdf_get_svar_0d in libMODS.a(mod_netcdf.o)
___mod_netcdf_MOD_netcdf_get_lvar_0d in libMODS.a(mod_netcdf.o)
"___netcdf_MOD_nf90_inq_attname", referenced from:
___mod_netcdf_MOD_netcdf_get_satt in libMODS.a(mod_netcdf.o)
___mod_netcdf_MOD_netcdf_get_fatt in libMODS.a(mod_netcdf.o)
___mod_netcdf_MOD_netcdf_inq_var in libMODS.a(mod_netcdf.o)
"___netcdf_MOD_nf90_inq_varid", referenced from:
___mod_netcdf_MOD_netcdf_put_svar_3d in libMODS.a(mod_netcdf.o)
___mod_netcdf_MOD_netcdf_put_svar_2d in libMODS.a(mod_netcdf.o)
___mod_netcdf_MOD_netcdf_put_svar_1d in libMODS.a(mod_netcdf.o)
___mod_netcdf_MOD_netcdf_put_svar_0d in libMODS.a(mod_netcdf.o)
___mod_netcdf_MOD_netcdf_put_lvar_2d in libMODS.a(mod_netcdf.o)
___mod_netcdf_MOD_netcdf_put_lvar_1d in libMODS.a(mod_netcdf.o)
___mod_netcdf_MOD_netcdf_put_lvar_0d in libMODS.a(mod_netcdf.o)
...
"___netcdf_MOD_nf90_inquire", referenced from:
___mod_netcdf_MOD_netcdf_get_satt in libMODS.a(mod_netcdf.o)
___mod_netcdf_MOD_netcdf_get_fatt in libMODS.a(mod_netcdf.o)
___mod_netcdf_MOD_netcdf_inq_var in libMODS.a(mod_netcdf.o)
___mod_netcdf_MOD_netcdf_get_dim in libMODS.a(mod_netcdf.o)
"___netcdf_MOD_nf90_inquire_attribute", referenced from:
___mod_netcdf_MOD_netcdf_inq_var in libMODS.a(mod_netcdf.o)
"___netcdf_MOD_nf90_inquire_dimension", referenced from:
___mod_netcdf_MOD_netcdf_inq_var in libMODS.a(mod_netcdf.o)
___mod_netcdf_MOD_netcdf_get_dim in libMODS.a(mod_netcdf.o)
"___netcdf_MOD_nf90_inquire_variable", referenced from:
___mod_netcdf_MOD_netcdf_get_lvar_1d in libMODS.a(mod_netcdf.o)
___mod_netcdf_MOD_netcdf_get_lvar_0d in libMODS.a(mod_netcdf.o)
___mod_netcdf_MOD_netcdf_get_satt in libMODS.a(mod_netcdf.o)
___mod_netcdf_MOD_netcdf_get_fatt in libMODS.a(mod_netcdf.o)
___mod_netcdf_MOD_netcdf_inq_var in libMODS.a(mod_netcdf.o)
"___netcdf_MOD_nf90_open", referenced from:
___mod_netcdf_MOD_netcdf_open.part.0 in libMODS.a(mod_netcdf.o)
"___netcdf_MOD_nf90_put_att_eightbytereal", referenced from:
___def_var_mod_MOD_def_var in libUTIL.a(def_var.o)
"___netcdf_MOD_nf90_put_att_fourbyteint", referenced from:
___def_var_mod_MOD_def_var in libUTIL.a(def_var.o)
"___netcdf_MOD_nf90_put_att_fourbytereal", referenced from:
___def_var_mod_MOD_def_var in libUTIL.a(def_var.o)
"___netcdf_MOD_nf90_put_att_one_eightbytereal", referenced from:
___def_var_mod_MOD_def_var in libUTIL.a(def_var.o)
"___netcdf_MOD_nf90_put_att_one_fourbyteint", referenced from:
___def_var_mod_MOD_def_var in libUTIL.a(def_var.o)
"___netcdf_MOD_nf90_put_att_one_fourbytereal", referenced from:
___def_var_mod_MOD_def_var in libUTIL.a(def_var.o)
"___netcdf_MOD_nf90_put_att_text", referenced from:
_lbc_putatt_ in libUTIL.a(lbc.o)
_tadv_putatt_ in libUTIL.a(tadv.o)
___def_var_mod_MOD_def_var in libUTIL.a(def_var.o)
_def_info_ in libUTIL.a(def_info.o)
"___netcdf_MOD_nf90_put_var_1d_eightbytereal", referenced from:
___mod_netcdf_MOD_netcdf_put_fvar_1d in libMODS.a(mod_netcdf.o)
___mod_netcdf_MOD_netcdf_put_fvar_0d in libMODS.a(mod_netcdf.o)
___nf_fwrite2d_mod_MOD_nf_fwrite2d in libUTIL.a(nf_fwrite2d.o)
___nf_fwrite3d_mod_MOD_nf_fwrite3d in libUTIL.a(nf_fwrite3d.o)
"___netcdf_MOD_nf90_put_var_1d_fourbyteint", referenced from:
___mod_netcdf_MOD_netcdf_put_lvar_1d in libMODS.a(mod_netcdf.o)
___mod_netcdf_MOD_netcdf_put_lvar_0d in libMODS.a(mod_netcdf.o)
___mod_netcdf_MOD_netcdf_put_ivar_1d in libMODS.a(mod_netcdf.o)
___mod_netcdf_MOD_netcdf_put_ivar_0d in libMODS.a(mod_netcdf.o)
"___netcdf_MOD_nf90_put_var_1d_text", referenced from:
___mod_netcdf_MOD_netcdf_put_svar_1d in libMODS.a(mod_netcdf.o)
"___netcdf_MOD_nf90_put_var_2d_eightbytereal", referenced from:
___mod_netcdf_MOD_netcdf_put_fvar_2d in libMODS.a(mod_netcdf.o)
"___netcdf_MOD_nf90_put_var_2d_fourbyteint", referenced from:
___mod_netcdf_MOD_netcdf_put_lvar_2d in libMODS.a(mod_netcdf.o)
___mod_netcdf_MOD_netcdf_put_ivar_2d in libMODS.a(mod_netcdf.o)
"___netcdf_MOD_nf90_put_var_2d_text", referenced from:
___mod_netcdf_MOD_netcdf_put_svar_2d in libMODS.a(mod_netcdf.o)
"___netcdf_MOD_nf90_put_var_3d_eightbytereal", referenced from:
___mod_netcdf_MOD_netcdf_put_fvar_3d in libMODS.a(mod_netcdf.o)
"___netcdf_MOD_nf90_put_var_3d_text", referenced from:
___mod_netcdf_MOD_netcdf_put_svar_3d in libMODS.a(mod_netcdf.o)
"___netcdf_MOD_nf90_put_var_4d_eightbytereal", referenced from:
___mod_netcdf_MOD_netcdf_put_fvar_4d in libMODS.a(mod_netcdf.o)
"___netcdf_MOD_nf90_put_var_eightbytereal", referenced from:
___mod_netcdf_MOD_netcdf_put_fvar_0d in libMODS.a(mod_netcdf.o)
"___netcdf_MOD_nf90_put_var_fourbyteint", referenced from:
___mod_netcdf_MOD_netcdf_put_lvar_0d in libMODS.a(mod_netcdf.o)
___mod_netcdf_MOD_netcdf_put_ivar_0d in libMODS.a(mod_netcdf.o)
"___netcdf_MOD_nf90_put_var_text", referenced from:
___mod_netcdf_MOD_netcdf_put_svar_0d in libMODS.a(mod_netcdf.o)
"___netcdf_MOD_nf90_redef", referenced from:
___mod_netcdf_MOD_netcdf_redef in libMODS.a(mod_netcdf.o)
"___netcdf_MOD_nf90_set_fill", referenced from:
___mod_netcdf_MOD_netcdf_create in libMODS.a(mod_netcdf.o)
"___netcdf_MOD_nf90_strerror", referenced from:
_close_out_ in libUTIL.a(close_io.o)
___mod_netcdf_MOD_netcdf_open.part.0 in libMODS.a(mod_netcdf.o)
___mod_netcdf_MOD_netcdf_sync in libMODS.a(mod_netcdf.o)
___mod_netcdf_MOD_netcdf_redef in libMODS.a(mod_netcdf.o)
___mod_netcdf_MOD_netcdf_enddef in libMODS.a(mod_netcdf.o)
___mod_netcdf_MOD_netcdf_create in libMODS.a(mod_netcdf.o)
___mod_netcdf_MOD_netcdf_close in libMODS.a(mod_netcdf.o)
...
"___netcdf_MOD_nf90_sync", referenced from:
___mod_netcdf_MOD_netcdf_sync in libMODS.a(mod_netcdf.o)
ld: symbol(s) not found for architecture x86_64
collect2: error: ld returned 1 exit status
make: *** [/Users/sean/Documents/ROMS/Projects/Upwelling/romsS] Error 1
Truly confused.

robertson
Site Admin
Posts: 227
Joined: Wed Feb 26, 2003 3:12 pm
Location: IMCS, Rutgers University

Re: Compilation error for build_roms.sh

#11 Unread post by robertson »

Your error is still in the linking. Those object files with no symbols are normal and most of them relate to the 4D-Var system which isn't used for the upwelling test case.

From the paths you have shared, I'm assuming that you are using a Mac with Homebrew. What appears to be the issue is the 'nf-config --flibs' command is not giving you all the information needed in order to link all the libraries. It looks like the latest version of NetCDF (4.7.4) is installed. I have never used home brew but the same version of nf-config from macports returns something like this:

Code: Select all

$ nf-config --flibs
-L/opt/local/lib -lnetcdff -L/opt/local/lib -Wl,-headerpad_max_install_names -Wl,-syslibroot,/Library/Developer/CommandLineTools/SDKs/MacOSX10.14.sdk -arch x86_64 -lnetcdf -lnetcdf -lm
What does 'nc-config --all' give you? I remember that at some point if you wanted Fortran capability with NetCDF on Homebrew, you had to install with the --with-fortran flag but I believe you have the Fortran already or the build script would fail near the beginning when trying to copy netcdf.mod into your build directory.

It looks like you may have also enabled "USE_HDF5" in your build script. That option is really only used in model coupling; it shouldn't cause any issues but it's unnecessary.

osean
Posts: 47
Joined: Sat Jan 23, 2021 3:46 pm
Location: MIT-WHOI

Re: Compilation error for build_roms.sh

#12 Unread post by osean »

robertson wrote: Wed Jan 27, 2021 3:28 pm Your error is still in the linking. Those object files with no symbols are normal and most of them relate to the 4D-Var system which isn't used for the upwelling test case.

From the paths you have shared, I'm assuming that you are using a Mac with Homebrew. What appears to be the issue is the 'nf-config --flibs' command is not giving you all the information needed in order to link all the libraries. It looks like the latest version of NetCDF (4.7.4) is installed. I have never used home brew but the same version of nf-config from macports returns something like this:

Code: Select all

$ nf-config --flibs
-L/opt/local/lib -lnetcdff -L/opt/local/lib -Wl,-headerpad_max_install_names -Wl,-syslibroot,/Library/Developer/CommandLineTools/SDKs/MacOSX10.14.sdk -arch x86_64 -lnetcdf -lnetcdf -lm
What does 'nc-config --all' give you? I remember that at some point if you wanted Fortran capability with NetCDF on Homebrew, you had to install with the --with-fortran flag but I believe you have the Fortran already or the build script would fail near the beginning when trying to copy netcdf.mod into your build directory.

It looks like you may have also enabled "USE_HDF5" in your build script. That option is really only used in model coupling; it shouldn't cause any issues but it's unnecessary.
I see, at least it is good for me to know it is to do with linking netCDF, rather than something else bigger, e.g. to do with the system...

I tried nc-config --all, which returned the following
This netCDF 4.7.4 has been built with the following features:

--cc -> /usr/bin/clang
--cflags -> -I/usr/local/Cellar/netcdf/4.7.4_2/include
--libs -> -L/usr/local/Cellar/netcdf/4.7.4_2/lib -lnetcdf
--static -> -lhdf5_hl -lhdf5 -lsz -lz -ldl -lm -lcurl

--has-c++ -> no
--cxx ->

--has-c++4 -> yes
--cxx4 -> /usr/bin/clang++
--cxx4flags -> -I/usr/local/Cellar/netcdf/4.7.4_2/include
--cxx4libs -> -L/usr/local/Cellar/netcdf/4.7.4_2/lib -lnetcdf-cxx4 -lnetcdf

--has-fortran -> yes
--fc -> /usr/local/bin/gfortran
--fflags -> /usr/local/Cellar/netcdf/4.7.4_2/include
--flibs -> -L/usr/local/Cellar/netcdf/4.7.4_2/lib
--has-f90 -> TRUE
--has-f03 -> FALSE

--has-dap -> yes
--has-dap2 -> yes
--has-dap4 -> yes
--has-nc2 -> yes
--has-nc4 -> yes
--has-hdf5 -> yes
--has-hdf4 -> no
--has-logging -> no
--has-pnetcdf -> no
--has-szlib -> no
--has-cdf5 -> yes
--has-parallel4 -> no
--has-parallel -> no

--prefix -> /usr/local/Cellar/netcdf/4.7.4_2
--includedir -> /usr/local/Cellar/netcdf/4.7.4_2/include
--libdir -> /usr/local/Cellar/netcdf/4.7.4_2/lib
--version -> netCDF 4.7.4
The library direction does point to the same directory as output from nf-config --flibs

Is there anything else that I need to pay close attention to in the 'makefile' file for this, in addition to build_roms.sh and build_my_paths.sh?

thank you

User avatar
arango
Site Admin
Posts: 1368
Joined: Wed Feb 26, 2003 4:41 pm
Location: DMCS, Rutgers University
Contact:

Re: Compilation error for build_roms.sh

#13 Unread post by arango »

Obviously, you need to work on the libraries available on your computer. There is plenty of information about Compiling and Linking in WikiROMS. If you are using the latest version of ROMS, you may benefit from using CMake. Check cbuild_roms.csh or cbuild_roms.sh. CMake is a different philosophy for compiling and linking.

robertson
Site Admin
Posts: 227
Joined: Wed Feb 26, 2003 3:12 pm
Location: IMCS, Rutgers University

Re: Compilation error for build_roms.sh

#14 Unread post by robertson »

I'm not sure where homebrew is getting their patches but they are missing some important things and are actually further from a usable product than the netcdf-fortran 4.5.3 release is. I believe home brew puts symlinks to all libraries in /usr/local/lib so, if you have the proper permissions, I would suggest editing /usr/local/bin/nf-config and setting the line (probably around line 20 or so) that assigns flibs to be something like:

Code: Select all

flibs="-L/usr/local/lib -lnetcdff -lnetcdf"
if that results in hdf5 (or H5) missing references you should add "-lhdf5_hl -lhdf5 -lsz -lz -ldl -lm -lcurl" making it:

Code: Select all

flibs="-L/usr/local/lib -lnetcdff -lnetcdf -lhdf5_hl -lhdf5 -lsz -lz -ldl -lm -lcurl"
Some of that (almost certainly -L/usr/local/lib) might not be entirely necessary but they shouldn't have any negative effects. If you don't have permissions then you could:
  1. create ~/Compilers/ROMS
  2. copy DARWIN-gfortran.mk and my_build_paths.sh from the Compilers directory of the ROMS source code to ~/Compilers/ROMS
  3. set 'LIBS +=' in the USE_NETCDF4 section (approx. line 147) of DARWIN-gfortran.mk to the first 'flibs' line from above then the second if you run into undefined references
  4. modify your build script (approx. line 132) to use the Compilers directory you just created. It should just be a simple switch of the comment markers.
  5. run the build script again

osean
Posts: 47
Joined: Sat Jan 23, 2021 3:46 pm
Location: MIT-WHOI

Re: Compilation error for build_roms.sh

#15 Unread post by osean »

robertson wrote: Thu Jan 28, 2021 8:21 am I'm not sure where homebrew is getting their patches but they are missing some important things and are actually further from a usable product than the netcdf-fortran 4.5.3 release is. I believe home brew puts symlinks to all libraries in /usr/local/lib so, if you have the proper permissions, I would suggest editing /usr/local/bin/nf-config and setting the line (probably around line 20 or so) that assigns flibs to be something like:

Code: Select all

flibs="-L/usr/local/lib -lnetcdff -lnetcdf"
if that results in hdf5 (or H5) missing references you should add "-lhdf5_hl -lhdf5 -lsz -lz -ldl -lm -lcurl" making it:

Code: Select all

flibs="-L/usr/local/lib -lnetcdff -lnetcdf -lhdf5_hl -lhdf5 -lsz -lz -ldl -lm -lcurl"
Some of that (almost certainly -L/usr/local/lib) might not be entirely necessary but they shouldn't have any negative effects. If you don't have permissions then you could:
  1. create ~/Compilers/ROMS
  2. copy DARWIN-gfortran.mk and my_build_paths.sh from the Compilers directory of the ROMS source code to ~/Compilers/ROMS
  3. set 'LIBS +=' in the USE_NETCDF4 section (approx. line 147) of DARWIN-gfortran.mk to the first 'flibs' line from above then the second if you run into undefined references
  4. modify your build script (approx. line 132) to use the Compilers directory you just created. It should just be a simple switch of the comment markers.
  5. run the build script again
I tried editing nf-config with the first line

Code: Select all

flibs="-L/usr/local/lib -lnetcdff -lnetcdf"
and it has produced a romsS file at the end, instead of the oceanS file that was outlined in the WikiROMS page. I presume this means that it has been compiled successfully?!

robertson
Site Admin
Posts: 227
Joined: Wed Feb 26, 2003 3:12 pm
Location: IMCS, Rutgers University

Re: Compilation error for build_roms.sh

#16 Unread post by robertson »

That is correct. I thought I had replaced all the occurrences of 'ocean*' with 'roms*' in the wiki but I clearly missed some. I corrected several more pages this morning but, out of curiosity, on which page did you find the reference to 'oceanS'?

osean
Posts: 47
Joined: Sat Jan 23, 2021 3:46 pm
Location: MIT-WHOI

Re: Compilation error for build_roms.sh

#17 Unread post by osean »

robertson wrote: Thu Jan 28, 2021 3:26 pm That is correct. I thought I had replaced all the occurrences of 'ocean*' with 'roms*' in the wiki but I clearly missed some. I corrected several more pages this morning but, out of curiosity, on which page did you find the reference to 'oceanS'?
Thank you so very much for your help.

It is the wiki page for setting up ROMS on Mac: https://www.myroms.org/wiki/ROMS_Mac

The page I think is rather outdated and needs some update to reflect on various changes. I posted a document that outlines each step that I did to get ROMS running on my Mac (OS 10.15.7 Catalina), which I hope can be of help to others and perhaps a basis for further updates. Thanks!

Post Reply