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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open-MPI: Apple linker does not accept -commons use_dylibs flag anymore #139

Open
chenrui333 opened this issue Mar 30, 2024 · 1 comment

Comments

@chenrui333
Copy link

馃憢 while building 1.13.0 release, running into the following build failure.

libtool: link: /opt/homebrew/opt/open-mpi/bin/mpif90 -I../../src/binding/f90 -ffree-form -I. -DN_DIM=3 -DMAXBLOCKS=100 -DIONMAX=13 -g -O2 -fallow-argument-mismatch -o .libs/flash_benchmark_io get_mfluid_property.o flash_release.o flash_benchmark_io.o checkpoint_ncmpi_parallel.o plotfile_ncmpi_parallel.o  -L../../src/libs /private/tmp/pnetcdf-20240330-45441-hnd2nv/pnetcdf-1.13.0/src/libs/.libs/libpnetcdf.dylib -L/opt/homebrew/Cellar/open-mpi/5.0.2_1/lib -L/opt/homebrew/Cellar/gcc/13.2.0/bin/../lib/gcc/current/gcc/aarch64-apple-darwin22/13 -L/opt/homebrew/Cellar/gcc/13.2.0/bin/../lib/gcc/current/gcc -L/opt/homebrew/Cellar/gcc/13.2.0/bin/../lib/gcc/current/gcc/aarch64-apple-darwin22/13/../../.. -lmpi_usempif08 -lmpi_usempi_ignore_tkr -lmpi_mpifh -lmpi -lgfortran -lemutls_w -lquadmath
ld: warning: -commons use_dylibs is no longer supported, using error treatment instead
ld: warning: ignoring duplicate libraries: '-lemutls_w', '-lgcc', '-lgfortran', '-lmpi', '-lmpi_mpifh', '-lmpi_usempi_ignore_tkr', '-lmpi_usempif08', '-lquadmath'
ld: common symbol '_mpi_fortran_argv_null_' from '/private/tmp/pnetcdf-20240330-45441-hnd2nv/pnetcdf-1.13.0/benchmarks/FLASH-IO/checkpoint_ncmpi_parallel.o' conflicts with definition from dylib '_mpi_fortran_argv_null_' from '/opt/homebrew/Cellar/open-mpi/5.0.2_1/lib/libmpi_usempi_ignore_tkr.40.dylib'
collect2: error: ld returned 1 exit status

This is mostly because of -commons use_dylibs is now ignored. We (Homebrew) have filed the similar issue as open-mpi/ompi#12427

And now for now. LDFLAGS=-ld_classic is a workaround.

relates to Homebrew/homebrew-core#167535

@chenrui333 chenrui333 changed the title Apple linker does not accept -commons use_dylibs flag anymore Apple linker does not accept -commons use_dylibs flag anymore Mar 30, 2024
@wkliao wkliao changed the title Apple linker does not accept -commons use_dylibs flag anymore Open-MPI: Apple linker does not accept -commons use_dylibs flag anymore Mar 30, 2024
@wkliao
Copy link
Member

wkliao commented Mar 30, 2024

Thanks.
I have added "Open-MPI:" to the title to mark it as an issue related to Open-MPI.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants