Skip to content

Commit

Permalink
use LLVM for mac-os builds to avoid gcc openmp issue
Browse files Browse the repository at this point in the history
with gcc, we kept getting an error:
ImportError: dlopen(
    /private/...lib.macosx-10.9-x86_64-3.6/pycraf/
    pathprof/cyprop.cpython-36m-darwin.so, 2
    ): Symbol not found: _GOMP_parallel
  • Loading branch information
bwinkel committed Nov 21, 2017
1 parent 58c6512 commit dbe6753
Showing 1 changed file with 34 additions and 15 deletions.
49 changes: 34 additions & 15 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -87,26 +87,47 @@ matrix:
- os: osx
osx_image: xcode8.3
env:
- CC='gcc-7'
- CXX='g++-7'
- CPP='g++-7'
- LD='gcc-7'
- CC='/usr/local/opt/llvm/bin/clang'
- CXX='/usr/local/opt/llvm/bin/clang'
- CPP='/usr/local/opt/llvm/bin/clang'
- LD='/usr/local/opt/llvm/bin/clang'
- LDFLAGS='-L/usr/local/opt/llvm/lib -Wl,-rpath,/usr/local/opt/llvm/lib'
- CPPFLAGS='-I/usr/local/opt/llvm/include'
- COMPILER='llvm'
# compiler: gcc

# Try MacOS X
# produces ImportError: dlopen(/private/.../pycraf/pathprof/cyprop.cpython-36m-darwin.so, 2): Symbol not found: _GOMP_parallel
# - os: osx
# osx_image: xcode8.3
# env:
# - CC='gcc-7'
# - CXX='g++-7'
# - CPP='g++-7'
# - LD='gcc-7'
# - COMPILER='gcc'

# We have to make the MacOS release based on rather old numpy version
# otherwise users will keep getting "incompatible API" errors
# (For more information on ABI problems with numpy see:
# https://stackoverflow.com/questions/17709641/valueerror-numpy-dtype-has-the-wrong-size-try-recompiling/18369312)
- os: osx
osx_image: xcode8.3
env:
- CC='gcc-7'
- CXX='g++-7'
- CPP='g++-7'
- LD='gcc-7'
# - CC='gcc-7'
# - CXX='g++-7'
# - CPP='g++-7'
# - LD='gcc-7'
# - COMPILER='gcc'
- DO_MAC_DIST=YES
- NUMPY_VERSION=1.11
# compiler: gcc
- CC='/usr/local/opt/llvm/bin/clang'
- CXX='/usr/local/opt/llvm/bin/clang'
- CPP='/usr/local/opt/llvm/bin/clang'
- LD='/usr/local/opt/llvm/bin/clang'
- LDFLAGS='-L/usr/local/opt/llvm/lib -Wl,-rpath,/usr/local/opt/llvm/lib'
- CPPFLAGS='-I/usr/local/opt/llvm/include'
- COMPILER='llvm'

# Do a coverage test.
- os: linux
Expand Down Expand Up @@ -148,12 +169,10 @@ matrix:

before_install:
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then brew update; fi
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then brew install gcc; brew link --overwrite gcc; fi
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then gcc --version; fi
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then gcc-7 --version; fi
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then gfortran --version; fi
# - if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then echo "LD_LIBRARY_PATH" $LD_LIBRARY_PATH ; fi
# - if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then echo "DYLD_LIBRARY_PATH" $DYLD_LIBRARY_PATH ; fi
- if [[ "$TRAVIS_OS_NAME" == "osx" ]] && [[ $COMPILER == "gcc" ]]; then brew install gcc; brew link --overwrite gcc; fi
- if [[ "$TRAVIS_OS_NAME" == "osx" ]] && [[ $COMPILER == "gcc" ]]; then gcc --version; fi
- if [[ "$TRAVIS_OS_NAME" == "osx" ]] && [[ $COMPILER == "gcc" ]]; then gcc-7 --version; fi
- if [[ "$TRAVIS_OS_NAME" == "osx" ]] && [[ $COMPILER == "llvm" ]]; then brew install llvm; fi

install:

Expand Down

0 comments on commit dbe6753

Please sign in to comment.