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’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

mac os install and use problem. #85

Open
cm2316 opened this issue Sep 22, 2018 · 3 comments
Open

mac os install and use problem. #85

cm2316 opened this issue Sep 22, 2018 · 3 comments

Comments

@cm2316
Copy link

cm2316 commented Sep 22, 2018

My pc environment:
MAC OS 10.13.5
xcode 8.2.1
cc -v
Apple LLVM version 8.0.0 (clang-800.0.42.1)
Target: x86_64-apple-darwin17.6.0

clang -v
Apple LLVM version 8.0.0 (clang-800.0.42.1)
Target: x86_64-apple-darwin17.6.0

gcc -v
Using built-in specs.
COLLECT_GCC=gcc-6


cuda "9.2" cudnn-9.2-osx-x64-v7.1

nvcc -V
nvcc: NVIDIA (R) Cuda compiler driver
Copyright (c) 2005-2018 NVIDIA Corporation
Built on Tue_Jun_12_23:08:12_CDT_2018
Cuda compilation tools, release 9.2, V9.2.148


python --version
Python 3.6.6
pytorch 0.4.1


run: make
clang: error: unsupported option '-fopenmp'

change: warp-ctc/build/CMakeCache.txt
WITH_OMP:BOOL=OFF

./test_gpu
Running GPU tests
Tests pass

run: python setup.py install
error: invalid argument '-std=c99' not allowed with 'C++/ObjC++'
error: command '/usr/bin/gcc' failed with exit status 1

change: pytorch_binding/setup.py
if platform.system() == 'Darwin':
extra_compile_args = ['-fPIC']
else:
extra_compile_args = ['-std=c++11', '-fPIC', '-std=c99']

run: CC=g++-6 python setup.py install

show info:
Installed /Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/warpctc_pytorch-0.1-py3.6-macosx-10.9-x86_64.egg
Processing dependencies for warpctc-pytorch==0.1
Finished processing dependencies for warpctc-pytorch==0.1

but when I run the test, python tests/test_gpu.py, show the problem

Traceback (most recent call last):
File "tests/test_gpu.py", line 2, in
import warpctc_pytorch as warp_ctc
File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/warpctc_pytorch-0.1-py3.6-macosx-10.9-x86_64.egg/warpctc_pytorch/init.py", line 6, in
from ._warp_ctc import *
File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/warpctc_pytorch-0.1-py3.6-macosx-10.9-x86_64.egg/warpctc_pytorch/_warp_ctc/init.py", line 3, in
from .__warp_ctc import lib as _lib, ffi as _ffi
ImportError: dlopen(/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/warpctc_pytorch-0.1-py3.6-macosx-10.9-x86_64.egg/warpctc_pytorch/_warp_ctc/__warp_ctc.cpython-36m-darwin.so, 2): Symbol not found: __ZNSt8ios_base4InitD1Ev
Referenced from: /Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/warpctc_pytorch-0.1-py3.6-macosx-10.9-x86_64.egg/warpctc_pytorch/_warp_ctc/__warp_ctc.cpython-36m-darwin.so
Expected in: flat namespace
in /Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/warpctc_pytorch-0.1-py3.6-macosx-10.9-x86_64.egg/warpctc_pytorch/_warp_ctc/__warp_ctc.cpython-36m-darwin.so

Can anybody help me slove the problem?

@jiangxiluning
Copy link

me too

@FrancoisPgm
Copy link

FrancoisPgm commented Jun 18, 2019

I had the same clang: error: unsupported option '-fopenmp' problem but found the solution there:
https://blog.csdn.net/xhzDeng/article/details/80511437
It consits in turning off the WITH_OMP option in the build/CMakeCache.txt file, simply replacing the lineWITH_OMP:BOOL=ON with WITH_OMP:BOOL=OFF

@BeHappyForMe
Copy link

me too,help

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

4 participants