SeanNaren / warp-ctc

Pytorch Bindings for warp-ctc
Apache License 2.0
756 stars 271 forks source link

安装到 python setup.py install 的时候出错了, 前面的步骤一切正常 #149

Open GandalfLiu opened 5 years ago

GandalfLiu commented 5 years ago
which: no nvcc in (/app/anaconda3/envs/chineseocr/bin:/app/anaconda3/condabin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/sbin:/home/mcbadm/.local/bin:/home/mcbadm/bin)
Torch was not built with CUDA support, not building warp-ctc GPU extensions.
running install
running bdist_egg
running egg_info
writing warpctc_pytorch.egg-info/PKG-INFO
writing dependency_links to warpctc_pytorch.egg-info/dependency_links.txt
writing top-level names to warpctc_pytorch.egg-info/top_level.txt
reading manifest file 'warpctc_pytorch.egg-info/SOURCES.txt'
writing manifest file 'warpctc_pytorch.egg-info/SOURCES.txt'
installing library code to build/bdist.linux-x86_64/egg
running install_lib
running build_py
running build_ext
/app/anaconda3/envs/chineseocr/lib/python3.6/site-packages/torch/utils/cpp_extension.py:191: UserWarning: 

                               !! WARNING !!

!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
Your compiler (g++ 4.8.5) may be ABI-incompatible with PyTorch!
Please use a compiler that is ABI-compatible with GCC 4.9 and above.
See https://gcc.gnu.org/onlinedocs/libstdc++/manual/abi.html.

See https://gist.github.com/goldsborough/d466f43e8ffc948ff92de7486c5216d6
for instructions on how to install GCC 4.9 or higher.
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

                              !! WARNING !!

  warnings.warn(ABI_INCOMPATIBILITY_WARNING.format(compiler))
building 'warpctc_pytorch._warp_ctc' extension
gcc -pthread -B /home/ubuntu/anaconda3/envs/chineseocr/compiler_compat -Wl,--sysroot=/ -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -I/home/mcbadm/warp-ctc/include -I/app/anaconda3/envs/chineseocr/lib/python3.6/site-packages/torch/lib/include -I/app/anaconda3/envs/chineseocr/lib/python3.6/site-packages/torch/lib/include/torch/csrc/api/include -I/app/anaconda3/envs/chineseocr/lib/python3.6/site-packages/torch/lib/include/TH -I/app/anaconda3/envs/chineseocr/lib/python3.6/site-packages/torch/lib/include/THC -I/app/anaconda3/envs/chineseocr/include/python3.6m -c src/binding.cpp -o build/temp.linux-x86_64-3.6/src/binding.o -std=c++11 -fPIC -DTORCH_API_INCLUDE_EXTENSION_H -DTORCH_EXTENSION_NAME=_warp_ctc -D_GLIBCXX_USE_CXX11_ABI=0
cc1plus: warning: command line option ‘-Wstrict-prototypes’ is valid for C/ObjC but not for C++ [enabled by default]
g++ -pthread -shared -B /home/ubuntu/anaconda3/envs/chineseocr/compiler_compat -L/home/ubuntu/anaconda3/envs/chineseocr/lib -Wl,-rpath=/home/ubuntu/anaconda3/envs/chineseocr/lib -Wl,--no-as-needed -Wl,--sysroot=/ build/temp.linux-x86_64-3.6/src/binding.o -L/home/mcbadm/warp-ctc/build -lwarpctc -o build/lib.linux-x86_64-3.6/warpctc_pytorch/_warp_ctc.cpython-36m-x86_64-linux-gnu.so -Wl,-rpath,/home/mcbadm/warp-ctc/build
/usr/bin/ld: this linker was not configured to use sysroots
collect2: error: ld returned 1 exit status
error: command 'g++' failed with exit status 1

能帮我看看是怎么回事么


python3.6,   centos7.4    torch 1.0.1.post2
oweiii commented 4 years ago

gcc需要升级到4.9及以上