Skip to content
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

Build of an acme_developer test fails on Mac #85

Closed
jeff-cohere opened this issue Jan 28, 2015 · 0 comments
Closed

Build of an acme_developer test fails on Mac #85

jeff-cohere opened this issue Jan 28, 2015 · 0 comments
Assignees

Comments

@jeff-cohere
Copy link
Contributor

Using the following command to create and run the acme_developer tests on a Mac produced a build problem in a test case:

cd ACME/scripts
export NETCDF=/usr/local
./create_test -testid t01 -xml_category acme_developer -xml_mach mac -xml_compiler gnu

The following link error occurs during the build of the "glimmer-cism" library:

mpif90 -o /Users/jeff/projects/acme/scratch/ERS_Ly21.f09_g16.TG.mac_gnu.t01/bld/cesm.exe ccsm_comp_mod.o ccsm_driver.o component_mod.o component_type_mod.o cpl_comp_esmf.o cplcomp_exchange_mod.o prep_aoflux_mod.o prep_atm_mod.o prep_glc_mod.o prep_ice_mod.o prep_lnd_mod.o prep_ocn_mod.o prep_rof_mod.o prep_wav_mod.o seq_diag_mct.o seq_domain_mct.o seq_flux_mct.o seq_frac_mct.o seq_hist_mod.o seq_io_mod.o seq_map_esmf.o seq_map_mod.o seq_map_type_mod.o seq_rest_mod.o t_driver_timers_mod.o -L/Users/jeff/projects/acme/scratch/ERS_Ly21.f09_g16.TG.mac_gnu.t01/bld/lib/ -latm -L/Users/jeff/projects/acme/scratch/ERS_Ly21.f09_g16.TG.mac_gnu.t01/bld/lib/ -lice -L/Users/jeff/projects/acme/scratch/ERS_Ly21.f09_g16.TG.mac_gnu.t01/bld/lib/ -llnd -L/Users/jeff/projects/acme/scratch/ERS_Ly21.f09_g16.TG.mac_gnu.t01/bld/lib/ -locn -L/Users/jeff/projects/acme/scratch/ERS_Ly21.f09_g16.TG.mac_gnu.t01/bld/lib/ -lrof -L/Users/jeff/projects/acme/scratch/ERS_Ly21.f09_g16.TG.mac_gnu.t01/bld/lib/ -lglc -L/Users/jeff/projects/acme/scratch/ERS_Ly21.f09_g16.TG.mac_gnu.t01/bld/lib/ -lwav -L/Users/jeff/projects/acme/scratch/ERS_Ly21.f09_g16.TG.mac_gnu.t01/bld/glc/lib/ -lglimmercismfortran -L/Users/jeff/projects/acme/scratch/sharedlibroot.t01/gnu/openmpi/nodebug/nothreads/MCT/noesmf/a1l1r1i1o1g1w1/csm_share -lcsm_share -L/Users/jeff/projects/acme/scratch/sharedlibroot.t01/gnu/openmpi/nodebug/nothreads/lib -lpio -lgptl -lmct -lmpeu -L/usr/local/lib -lnetcdff -lnetcdf -framework Accelerate -all_load
duplicate symbol _main in:
ccsm_driver.o
/Users/jeff/projects/acme/scratch/ERS_Ly21.f09_g16.TG.mac_gnu.t01/bld/glc/lib//libglimmercismfortran.a(dlapqc.f.o)
ld: 1 duplicate symbol for architecture x86_64
collect2: error: ld returned 1 exit status

This is because dlapqc.f, a source file in the SLAP library bundled in with glimmer-solve, contains a Fortran program, not library functions. The fix is to make sure that this source is excluded from the library in models/glc/cism/glimmer-cism/CMakeLists.txt. I will be submitting a pull request to enact this change.

Alternatively, an interested party on the Land-Ice team could add the following line to the list of removed Fortran sources in models/glc/cism/glimmer-cism/CMakeLists.txt (around line 263 in the master branch):

${GLIMMER_SOURCE_DIR}/libglimmer-solve/SLAP/dlapqc.f

@jeff-cohere jeff-cohere self-assigned this Jan 28, 2015
douglasjacobsen added a commit that referenced this issue Jan 28, 2015
… next

* jnjohnsonlbl/models/fix_glimmer_cism_build_on_mac:
  Removes dlapqc.f from sources built into libglimmer. Fixes #85.
douglasjacobsen added a commit that referenced this issue Jan 28, 2015
dlapqc.f contains a program, which produces a duplicate "main" symbol
that prevents a successful build of the glimmer-cism library on Macs.
This change simply removes that file from the list of sources to be
built into the library.

[BFB]

* jnjohnsonlbl/models/fix_glimmer_cism_build_on_mac:
  Removes dlapqc.f from sources built into libglimmer. Fixes #85.
mark-petersen pushed a commit to mark-petersen/E3SM that referenced this issue Jun 15, 2024
Refactors the Omega build to collect build configurations from the E3SM case
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant