warp-ctc icon indicating copy to clipboard operation
warp-ctc copied to clipboard

mac os install and use problem.

Open cm2316 opened this issue 5 years ago • 3 comments

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?

cm2316 avatar Sep 22 '18 09:09 cm2316

me too

jiangxiluning avatar Nov 10 '18 15:11 jiangxiluning

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

FrancoisPgm avatar Jun 18 '19 21:06 FrancoisPgm

me too,help

BeHappyForMe avatar Mar 27 '20 10:03 BeHappyForMe