Skip to content

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

Description

@chenrui333

馃憢 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

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions