Open robertladwig opened 4 years ago
Hi Robert
You must subscribe to gotm-users@googlegroups.com in order to hope to get response.
Best regards, Karsten
Den fre. 28. feb. 2020 kl. 20.22 skrev Robert Ladwig < notifications@github.com>:
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(netcdfoutput.F90.o) "netcdf_MOD_nf90_create", referenced from: _netcdf_output_MOD_initialize in liboutput_manager.a(netcdfoutput.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_varmanydims", referenced from: netcdf_output_MOD_initialize in liboutput_manager.a(netcdf_output.F90.o) "_netcdf_MOD_nf90enddef", referenced from: netcdf_output_MOD_initialize in liboutput_manager.a(netcdf_output.F90.o) "_netcdf_MOD_nf90_get_atttext", referenced from: input_netcdf_MOD_check_restart_time in libinput_manager.a(input_netcdf.F90.o) "___netcdf_MOD_nf90_get_var_1deightbytereal", 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(inputnetcdf.F90.o) "netcdf_MOD_nf90_inq_libvers", referenced from: _printversion in libgotm.a(printversion.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(inputnetcdf.F90.o) "netcdf_MOD_nf90_open", referenced from: _input_netcdf_MOD_read_restart_data in libinput_manager.a(inputnetcdf.F90.o) input_netcdf_MOD_check_restart_time in libinput_manager.a(input_netcdf.F90.o) "___netcdf_MOD_nf90_put_att_oneeightbytereal", 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_onefourbyteint", referenced from: netcdf_output_MOD_initialize in liboutput_manager.a(netcdf_output.F90.o) "_netcdf_MOD_nf90_put_att_onefourbytereal", 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(netcdfoutput.F90.o) "netcdf_MOD_nf90_put_var_1deightbytereal", referenced from: netcdf_output_MOD_save in liboutput_manager.a(netcdf_output.F90.o) "_netcdf_MOD_nf90_put_var_2deightbytereal", referenced from: netcdf_output_MOD_save in liboutput_manager.a(netcdf_output.F90.o) "_netcdf_MOD_nf90_put_var_3deightbytereal", 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(netcdfoutput.F90.o) "netcdf_MOD_nf90_strerror", referenced from: ___input_netcdf_MOD_handle_err in libinput_manager.a(inputnetcdf.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(netcdfoutput.F90.o) netcdf_output_MOD_initialize in liboutput_manager.a(netcdf_output.F90.o) "_netcdf_MOD_nf90sync", 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 https://github.com/gotm-model/code/issues/4?email_source=notifications&email_token=ACVA42PP2SLOYCCGAMKE2MDRFFP6XA5CNFSM4K5ZOEMKYY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4IRGTIXQ, or unsubscribe https://github.com/notifications/unsubscribe-auth/ACVA42IZY4NWGB7PGUGEZDTRFFP6XANCNFSM4K5ZOEMA .
-- Karsten Bolding karsten@bolding-bruggeman.com +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:
cmake ~/GOTM/code -DCMAKE_EXE_LINKER_FLAGS="-lnetcdff -lnetcdf"
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: nc-config --libs -L/usr/local/Cellar/netcdf/4.9.2_1/lib -lnetcdf
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: "_reporterror", referenced from: ___settings_MOD_type_input_create in libconfig.a(settings.F90.o) ld: symbol(s) not found for architecture x86_64 collect2: error: ld returned 1 exit status
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