[MacPorts] #59330: openmpi-default @4.0.1 +gfortran configure: error: C and C++ compilers are not link compatible. Can not continue.

MacPorts noreply at macports.org
Tue Oct 15 00:58:38 UTC 2019


#59330: openmpi-default @4.0.1 +gfortran configure: error: C and C++ compilers are
not link compatible.  Can not continue.
---------------------+-----------------------------
 Reporter:  willic3  |      Owner:  (none)
     Type:  defect   |     Status:  new
 Priority:  Normal   |  Milestone:
Component:  ports    |    Version:  2.6.1
 Keywords:  mojave   |       Port:  openmpi-default
---------------------+-----------------------------
 I am unable to install openmpi-default with the +gfortran variant.  It
 configures and installs fine without this variant.  I believe the reason
 is the following from the openmpi config.log:
 {{{
 configure:26308: WARNING:  -finline-functions has been added to CXXFLAGS
 configure:26319: checking if C and C++ are link compatible
 configure:26344: /usr/bin/clang -c -O3 -DNDEBUG -pipe -Os
 -isysroot/Library/Developer/CommandLineTools/SDKs/MacOSX10.14.sdk -arch
 x86_64 -finline-functions -fno-strict-aliasing
 -isysroot/Library/Developer/CommandLineTools/SDKs/MacOSX10.14.sdk
 conftest_c.c
 configure:26351: $? = 0
 configure:26382: /usr/bin/clang++ -o conftest -DNDEBUG -pipe
 -stdlib=libstdc++
 -isysroot/Library/Developer/CommandLineTools/SDKs/MacOSX10.14.sdk -arch
 x86_64 -finline-functions
 -isysroot/Library/Developer/CommandLineTools/SDKs/MacOSX10.14.sdk
 -Wl,-headerpad_max_install_names
 -Wl,-syslibroot,/Library/Developer/CommandLineTools/SDKs/MacOSX10.14.sdk
 conftest.cpp conftest_c.o  -lz >&5
 clang: warning: libstdc++ is deprecated; move to libc++ [-Wdeprecated]
 warning: include path for stdlibc++ headers not found; pass
 '-stdlib=libc++' on the command line to use the libc++ standard library
 instead [-Wstdlibcxx-not-found]
 1 warning generated.
 ld: library not found for -lstdc++
 clang: error: linker command failed with exit code 1 (use -v to see
 invocation)
 }}}
 I believe that the correct flag would be '-stdlib=libc++', but this
 doesn't happen when using the +gfortran variant.
 Is there a simple workaround for this problem?  I initially discovered
 this issue because an update triggered a rebuild of openmpi-default.  I
 need the +gfortran variant for other packages (e.g., hdf5
 @1.10.5_0+cxx+fortran+gfortran+hl+openmpi+szip).
 My system info:
 MacOS 10.14.6
 {{{
 xcodebuild -version
 Xcode 11.1
 Build version 11A1027
 }}}
 {{{
 port version
 Version: 2.6.1
 }}}

 Thanks,
 Charles

-- 
Ticket URL: <https://trac.macports.org/ticket/59330>
MacPorts <https://www.macports.org/>
Ports system for macOS


More information about the macports-tickets mailing list