Skip to content

Xcode 10.1 doesn't support stdlibc++ anymore #2144

@micaela-matta

Description

@micaela-matta

Code to reproduce the behavior

when installing MDAnalysis locally using an unmodified setup.py:

pip install .

I get this error message:

 g++ -bundle -undefined dynamic_lookup -L/anaconda/envs/mda_dask/lib -arch x86_64 -L/anaconda/envs/mda_dask/lib -arch x86_64 -arch x86_64 build/temp.macosx-10.7-x86_64-3.6/MDAnalysis/lib/_cutil.o -lm -o build/lib.macosx-10.7-x86_64-3.6/MDAnalysis/lib/_cutil.cpython-36m-darwin.so
    clang: warning: libstdc++ is deprecated; move to libc++ with a minimum deployment target of OS X 10.9 [-Wdeprecated]
    ld: library not found for -lstdc++
    clang: error: linker command failed with exit code 1 (use -v to see invocation)
    error: command 'g++' failed with exit status 1

It looks like libstdc++ is not supported anymore. I was able to solve this issue as explained here, by adding the line
xtra_link_args=["-stdlib=libc++", "-mmacosx-version-min=10.9"]

wherever necessary (that is, every time cpp_extra_compile_args is present).

Will make a PR with the fix to the main repo ASAP.

  • MDanalysis version 19.x
  • python 3.6
  • Mac OS X Mojave
  • Xcode 10.1

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions