-
Notifications
You must be signed in to change notification settings - Fork 47
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Compiling gotm lake branch under macOS #4
Comments
Hi Robert
You must subscribe to [email protected] in order to hope to get
response.
Best regards,
Karsten
Den fre. 28. feb. 2020 kl. 20.22 skrev Robert Ladwig <
[email protected]>:
… I'm currently trying to compile GOTM lake v5.3-673 under macOS (Catalina
v10.15.3) after having no problems in compiling it under Ubuntu (18.04). I
added the line -DGOTM_USE_STIM=on \ to gotm_configure.sh to include ice
dynamics.
Now, running gotm_configure.sh works without problems and creates a
gfortran directory, but gotm_build.sh reaches 100% and then fails in
building the executable:
[100%] Linking Fortran executable gotm
Undefined symbols for architecture x86_64:
"___netcdf_MOD_nf90_close", referenced from:
___netcdf_output_MOD_finalize in liboutput_manager.a(netcdf_output.F90.o)
"___netcdf_MOD_nf90_create", referenced from:
___netcdf_output_MOD_initialize in liboutput_manager.a(netcdf_output.F90.o)
"___netcdf_MOD_nf90_def_dim", referenced from:
_get_dim_id.4982 in liboutput_manager.a(netcdf_output.F90.o)
"___netcdf_MOD_nf90_def_var_manydims", referenced from:
___netcdf_output_MOD_initialize in liboutput_manager.a(netcdf_output.F90.o)
"___netcdf_MOD_nf90_enddef", referenced from:
___netcdf_output_MOD_initialize in liboutput_manager.a(netcdf_output.F90.o)
"___netcdf_MOD_nf90_get_att_text", referenced from:
___input_netcdf_MOD_check_restart_time in libinput_manager.a(input_netcdf.F90.o)
"___netcdf_MOD_nf90_get_var_1d_eightbytereal", referenced from:
___input_netcdf_MOD_read_restart_data in libinput_manager.a(input_netcdf.F90.o)
"___netcdf_MOD_nf90_get_var_eightbytereal", referenced from:
___input_netcdf_MOD_read_restart_data in libinput_manager.a(input_netcdf.F90.o)
"___netcdf_MOD_nf90_inq_libvers", referenced from:
_print_version_ in libgotm.a(print_version.F90.o)
"___netcdf_MOD_nf90_inq_varid", referenced from:
___input_netcdf_MOD_read_restart_data in libinput_manager.a(input_netcdf.F90.o)
___input_netcdf_MOD_check_restart_time in libinput_manager.a(input_netcdf.F90.o)
"___netcdf_MOD_nf90_open", referenced from:
___input_netcdf_MOD_read_restart_data in libinput_manager.a(input_netcdf.F90.o)
___input_netcdf_MOD_check_restart_time in libinput_manager.a(input_netcdf.F90.o)
"___netcdf_MOD_nf90_put_att_one_eightbytereal", referenced from:
___netcdf_output_MOD_put_att_typed_real in liboutput_manager.a(netcdf_output.F90.o)
___netcdf_output_MOD_initialize in liboutput_manager.a(netcdf_output.F90.o)
"___netcdf_MOD_nf90_put_att_one_fourbyteint", referenced from:
___netcdf_output_MOD_initialize in liboutput_manager.a(netcdf_output.F90.o)
"___netcdf_MOD_nf90_put_att_one_fourbytereal", referenced from:
___netcdf_output_MOD_put_att_typed_real in liboutput_manager.a(netcdf_output.F90.o)
"___netcdf_MOD_nf90_put_att_text", referenced from:
___netcdf_output_MOD_initialize in liboutput_manager.a(netcdf_output.F90.o)
"___netcdf_MOD_nf90_put_var_1d_eightbytereal", referenced from:
___netcdf_output_MOD_save in liboutput_manager.a(netcdf_output.F90.o)
"___netcdf_MOD_nf90_put_var_2d_eightbytereal", referenced from:
___netcdf_output_MOD_save in liboutput_manager.a(netcdf_output.F90.o)
"___netcdf_MOD_nf90_put_var_3d_eightbytereal", referenced from:
___netcdf_output_MOD_save in liboutput_manager.a(netcdf_output.F90.o)
"___netcdf_MOD_nf90_put_var_eightbytereal", referenced from:
___netcdf_output_MOD_save in liboutput_manager.a(netcdf_output.F90.o)
"___netcdf_MOD_nf90_strerror", referenced from:
___input_netcdf_MOD_handle_err in libinput_manager.a(input_netcdf.F90.o)
___netcdf_output_MOD_save in liboutput_manager.a(netcdf_output.F90.o)
___netcdf_output_MOD_finalize in liboutput_manager.a(netcdf_output.F90.o)
_get_dim_id.4982 in liboutput_manager.a(netcdf_output.F90.o)
___netcdf_output_MOD_initialize in liboutput_manager.a(netcdf_output.F90.o)
"___netcdf_MOD_nf90_sync", referenced from:
___netcdf_output_MOD_save in liboutput_manager.a(netcdf_output.F90.o)
ld: symbol(s) not found for architecture x86_64
collect2: error: ld returned 1 exit status
make[2]: *** [gotm] Error 1
make[1]: *** [CMakeFiles/gotm_exe.dir/all] Error 2
make: *** [all] Error 2
Any recommendations/ideas why it's failing during the last step? Both my
systems (macOS and Ubuntu) are 64bit.
Thanks
Robert
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#4?email_source=notifications&email_token=ACVA42PP2SLOYCCGAMKE2MDRFFP6XA5CNFSM4K5ZOEMKYY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4IRGTIXQ>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ACVA42IZY4NWGB7PGUGEZDTRFFP6XANCNFSM4K5ZOEMA>
.
--
Karsten Bolding
[email protected]
+4564422058
|
Hi! Was this ever resolved? I have run into the same issue. |
Hello I'm not sure if it was resolved - but I do remember that the NetCDF link information was not included properly on Mac. Whether this has been solved or not - I don't know. It is also outside what can be fixed in GOTM. I've have an old Mac for testing purposes - and I don't have the problem. Karsten |
I did solve my issues back then by specifying the cmake command: Here's the link to the google groups thread: https://groups.google.com/g/gotm-users/c/I5ApEpqt6YA/m/STUl4DGoBgAJ |
Hi The two errors are related but not quite the same. Anyway the solution for the first problem can be used to solve the other. Try: The first is the folder where the netcdf C library is. cmake -B ./build -S . -DGOTM_USE_FABM=off -DCMAKE_EXE_LINKER_FLAGS="-L/usr/local/Cellar/netcdf/4.9.2_1/lib will create the build environment in the build folder. For me compilation passes the issue with -lnetcdf. Unfortunately, another error comes up. Undefined symbols for architecture x86_64: I'm not sure what to do with this one. Karsten |
thanks to Robert for digging up the solution |
I'm currently trying to compile GOTM lake v5.3-673 under macOS (Catalina v10.15.3) after having no problems in compiling it under Ubuntu (18.04). I added the line
-DGOTM_USE_STIM=on \
togotm_configure.sh
to include ice dynamics.Now, running
gotm_configure.sh
works without problems and creates a gfortran directory, butgotm_build.sh
reaches 100% and then fails in building the executable:Any recommendations/ideas why it's failing during the last step? Both my systems (macOS and Ubuntu) are 64bit.
edit: It seems all errors are somehow related to netcdf. When running check_netcdf.sh, I get
Thanks
Robert
The text was updated successfully, but these errors were encountered: