2017-10-27 7 views
0

CentOS 7에서이 오류를 어떻게 해결해야합니까?/cs/software/anaconda3/compiler_compat/ld : 찾을 수 없습니다. -lm을 찾을 수 없습니다. -lpthread가 -lc을 찾을 수 없습니다.

[[email protected] HW4]$ git clone https://github.com/pathak22/pyflow.git 
Cloning into 'pyflow'... 
remote: Counting objects: 96, done. 
remote: Total 96 (delta 0), reused 0 (delta 0), pack-reused 96 
Unpacking objects: 100% (96/96), done. 
[[email protected] HW4]$ ls 
pyflow 
[[email protected] HW4]$ cd pyflow/ 
[[email protected] pyflow]$ ls 
LICENSE README.md demo.py examples pyflow.pyx setup.py src 
[[email protected] pyflow]$ python demo.py 
Traceback (most recent call last): 
    File "demo.py", line 11, in <module> 
    import pyflow 
ImportError: No module named 'pyflow' 
[[email protected] pyflow]$ python setup.py build_ext -i 
Compiling pyflow.pyx because it changed. 
[1/1] Cythonizing pyflow.pyx 
running build_ext 
building 'pyflow' extension 
creating build 
creating build/temp.linux-x86_64-3.5 
creating build/temp.linux-x86_64-3.5/src 
gcc -pthread -B /cs/software/anaconda3/compiler_compat -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -I/usr/local/anaconda3/lib/python3.5/site-packages/numpy/core/include -I/usr/local/anaconda3/lib/python3.5/site-packages/numpy/core/include -I/usr/local/anaconda3/include/python3.5m -c pyflow.cpp -o build/temp.linux-x86_64-3.5/pyflow.o 
cc1plus: warning: command line option ‘-Wstrict-prototypes’ is valid for C/ObjC but not for C++ [enabled by default] 
In file included from /usr/local/anaconda3/lib/python3.5/site-packages/numpy/core/include/numpy/ndarraytypes.h:1809:0, 
       from /usr/local/anaconda3/lib/python3.5/site-packages/numpy/core/include/numpy/ndarrayobject.h:18, 
       from /usr/local/anaconda3/lib/python3.5/site-packages/numpy/core/include/numpy/arrayobject.h:4, 
       from pyflow.cpp:564: 
/usr/local/anaconda3/lib/python3.5/site-packages/numpy/core/include/numpy/npy_1_7_deprecated_api.h:15:2: warning: #warning "Using deprecated NumPy API, disable it by " "#defining NPY_NO_DEPRECATED_API NPY_1_7_API_VERSION" [-Wcpp] 
#warning "Using deprecated NumPy API, disable it by " \ 
^
gcc -pthread -B /cs/software/anaconda3/compiler_compat -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -I/usr/local/anaconda3/lib/python3.5/site-packages/numpy/core/include -I/usr/local/anaconda3/lib/python3.5/site-packages/numpy/core/include -I/usr/local/anaconda3/include/python3.5m -c src/Coarse2FineFlowWrapper.cpp -o build/temp.linux-x86_64-3.5/src/Coarse2FineFlowWrapper.o 
cc1plus: warning: command line option ‘-Wstrict-prototypes’ is valid for C/ObjC but not for C++ [enabled by default] 
gcc -pthread -B /cs/software/anaconda3/compiler_compat -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -I/usr/local/anaconda3/lib/python3.5/site-packages/numpy/core/include -I/usr/local/anaconda3/lib/python3.5/site-packages/numpy/core/include -I/usr/local/anaconda3/include/python3.5m -c src/GaussianPyramid.cpp -o build/temp.linux-x86_64-3.5/src/GaussianPyramid.o 
cc1plus: warning: command line option ‘-Wstrict-prototypes’ is valid for C/ObjC but not for C++ [enabled by default] 
In file included from src/Image.h:9:0, 
       from src/GaussianPyramid.h:7, 
       from src/GaussianPyramid.cpp:4: 
src/ImageProcessing.h: In instantiation of ‘static void ImageProcessing::vfiltering(const T1*, T2*, int, int, int, const double*, int) [with T1 = double; T2 = double]’: 
src/Image.h:1331:96: required from ‘void Image<T>::imfilter_hv(Image<T1>&, const double*, int, const double*, int) const [with T1 = double; T = double]’ 
src/Image.h:1199:47: required from ‘void Image<T>::GaussianSmoothing(Image<T1>&, double, int) const [with T1 = double; T = double]’ 
src/GaussianPyramid.cpp:67:45: required from here 
src/ImageProcessing.h:344:14: warning: unused variable ‘offset’ [-Wunused-variable] 
    int i,j,l,k,offset,ii; 
      ^
gcc -pthread -B /cs/software/anaconda3/compiler_compat -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -I/usr/local/anaconda3/lib/python3.5/site-packages/numpy/core/include -I/usr/local/anaconda3/lib/python3.5/site-packages/numpy/core/include -I/usr/local/anaconda3/include/python3.5m -c src/OpticalFlow.cpp -o build/temp.linux-x86_64-3.5/src/OpticalFlow.o 
cc1plus: warning: command line option ‘-Wstrict-prototypes’ is valid for C/ObjC but not for C++ [enabled by default] 
src/OpticalFlow.cpp: In static member function ‘static void OpticalFlow::SmoothFlowSOR(const DImage&, const DImage&, DImage&, DImage&, DImage&, double, int, int, int)’: 
src/OpticalFlow.cpp:267:11: warning: unused variable ‘power_alpha’ [-Wunused-variable] 
    double power_alpha = 0.5; 
     ^
src/OpticalFlow.cpp:287:11: warning: unused variable ‘_a’ [-Wunused-variable] 
    double _a = 10000, _b = 0.1; 
     ^
src/OpticalFlow.cpp:287:24: warning: unused variable ‘_b’ [-Wunused-variable] 
    double _a = 10000, _b = 0.1; 
         ^
src/OpticalFlow.cpp: In static member function ‘static void OpticalFlow::SmoothFlowPDE(const DImage&, const DImage&, DImage&, DImage&, DImage&, double, int, int, int)’: 
src/OpticalFlow.cpp:545:11: warning: unused variable ‘power_alpha’ [-Wunused-variable] 
    double power_alpha = 0.5; 
     ^
src/OpticalFlow.cpp:565:11: warning: unused variable ‘_a’ [-Wunused-variable] 
    double _a = 10000, _b = 0.1; 
     ^
src/OpticalFlow.cpp:565:24: warning: unused variable ‘_b’ [-Wunused-variable] 
    double _a = 10000, _b = 0.1; 
         ^
In file included from src/Image.h:9:0, 
       from src/OpticalFlow.h:6, 
       from src/OpticalFlow.cpp:4: 
src/ImageProcessing.h: In instantiation of ‘static void ImageProcessing::vfiltering(const T1*, T2*, int, int, int, const double*, int) [with T1 = double; T2 = double]’: 
src/Image.h:1331:96: required from ‘void Image<T>::imfilter_hv(Image<T1>&, const double*, int, const double*, int) const [with T1 = double; T = double]’ 
src/OpticalFlow.cpp:52:42: required from here 
src/ImageProcessing.h:344:14: warning: unused variable ‘offset’ [-Wunused-variable] 
    int i,j,l,k,offset,ii; 
      ^
In file included from src/OpticalFlow.h:6:0, 
       from src/OpticalFlow.cpp:4: 
src/Image.h: In instantiation of ‘void Image<T>::warpImageBicubicRef(const Image<T>&, Image<T>&, const Image<T1>&, const Image<T1>&, const Image<T1>&, const Image<T2>&, const Image<T2>&) const [with T1 = double; T2 = double; T = double]’: 
src/Image.h:2482:55: required from ‘void Image<T>::warpImageBicubicRef(const Image<T>&, Image<T>&, const Image<T1>&, const Image<T1>&) const [with T1 = double; T = double]’ 
src/OpticalFlow.cpp:437:43: required from here 
src/Image.h:2525:4: warning: variable ‘ImgMax’ set but not used [-Wunused-but-set-variable] 
    T ImgMax; 
    ^
gcc -pthread -B /cs/software/anaconda3/compiler_compat -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -I/usr/local/anaconda3/lib/python3.5/site-packages/numpy/core/include -I/usr/local/anaconda3/lib/python3.5/site-packages/numpy/core/include -I/usr/local/anaconda3/include/python3.5m -c src/Stochastic.cpp -o build/temp.linux-x86_64-3.5/src/Stochastic.o 
cc1plus: warning: command line option ‘-Wstrict-prototypes’ is valid for C/ObjC but not for C++ [enabled by default] 
g++ -pthread -shared -L/cs/software/anaconda3/lib -B /cs/software/anaconda3/compiler_compat -Wl,-rpath=/cs/software/anaconda3/lib,--no-as-needed build/temp.linux-x86_64-3.5/pyflow.o build/temp.linux-x86_64-3.5/src/Coarse2FineFlowWrapper.o build/temp.linux-x86_64-3.5/src/GaussianPyramid.o build/temp.linux-x86_64-3.5/src/OpticalFlow.o build/temp.linux-x86_64-3.5/src/Stochastic.o -L/cs/software/anaconda3/lib -lpython3.5m -o /home/grad3/jalal/CS585/HW4/pyflow/pyflow.cpython-35m-x86_64-linux-gnu.so 
/cs/software/anaconda3/compiler_compat/ld: cannot find -lm 
/cs/software/anaconda3/compiler_compat/ld: cannot find -lpthread 
/cs/software/anaconda3/compiler_compat/ld: cannot find -lc 
collect2: error: ld returned 1 exit status 
error: command 'g++' failed with exit status 1 
[[email protected] pyflow]$ uname -a 
Linux goku.bu.edu 3.10.0-693.5.2.el7.x86_64 #1 SMP Fri Oct 20 20:32:50 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux 

[[email protected] pyflow]$ lsb_release -a 
LSB Version: :core-4.1-amd64:core-4.1-noarch 
Distributor ID: CentOS 
Description: CentOS Linux release 7.4.1708 (Core) 
Release: 7.4.1708 
Codename: Core 

답변

0

라이브러리를 설치해야합니다. 지금은 테스트 할 수 없지만 터미널에서 다음 명령을 실행하면 "-lm/-lc/-lpthread"오류를 해결할 수 있습니다.

관련 문제