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

pyflow install #21

Open
wanghai111 opened this issue Apr 16, 2019 · 2 comments
Open

pyflow install #21

wanghai111 opened this issue Apr 16, 2019 · 2 comments

Comments

@wanghai111
Copy link

Compiling pyflow.pyx because it changed.
[1/1] Cythonizing pyflow.pyx
/home/hai/anaconda3/envs/tianchi/lib/python3.7/site-packages/Cython/Compiler/Main.py:367: FutureWarning: Cython directive 'language_level' not set, using 2 for now (Py2). This will change in a later release! File: /home/hai/tianchi/pyflow-master/pyflow.pyx
tree = Parsing.p_module(s, pxd, full_module_name)
running build_ext
building 'pyflow' extension
creating build
creating build/temp.linux-x86_64-3.7
creating build/temp.linux-x86_64-3.7/src
gcc -pthread -B /home/hai/anaconda3/envs/tianchi/compiler_compat -Wl,--sysroot=/ -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -I/home/hai/anaconda3/envs/tianchi/lib/python3.7/site-packages/numpy/core/include -I/home/hai/anaconda3/envs/tianchi/lib/python3.7/site-packages/numpy/core/include -I/home/hai/anaconda3/envs/tianchi/include/python3.7m -c pyflow.cpp -o build/temp.linux-x86_64-3.7/pyflow.o
cc1plus: warning: command line option ‘-Wstrict-prototypes’ is valid for C/ObjC but not for C++
In file included from /home/hai/anaconda3/envs/tianchi/lib/python3.7/site-packages/numpy/core/include/numpy/ndarraytypes.h:1824:0,
from /home/hai/anaconda3/envs/tianchi/lib/python3.7/site-packages/numpy/core/include/numpy/ndarrayobject.h:12,
from /home/hai/anaconda3/envs/tianchi/lib/python3.7/site-packages/numpy/core/include/numpy/arrayobject.h:4,
from pyflow.cpp:632:
/home/hai/anaconda3/envs/tianchi/lib/python3.7/site-packages/numpy/core/include/numpy/npy_1_7_deprecated_api.h:17:2: warning: #warning "Using deprecated NumPy API, disable it with " "#define NPY_NO_DEPRECATED_API NPY_1_7_API_VERSION" [-Wcpp]
#warning "Using deprecated NumPy API, disable it with "
^
gcc -pthread -B /home/hai/anaconda3/envs/tianchi/compiler_compat -Wl,--sysroot=/ -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -I/home/hai/anaconda3/envs/tianchi/lib/python3.7/site-packages/numpy/core/include -I/home/hai/anaconda3/envs/tianchi/lib/python3.7/site-packages/numpy/core/include -I/home/hai/anaconda3/envs/tianchi/include/python3.7m -c src/Coarse2FineFlowWrapper.cpp -o build/temp.linux-x86_64-3.7/src/Coarse2FineFlowWrapper.o
cc1plus: warning: command line option ‘-Wstrict-prototypes’ is valid for C/ObjC but not for C++
In file included from src/Image.h:9:0,
from src/Coarse2FineFlowWrapper.cpp:8:
src/ImageProcessing.h: In static member function ‘static void ImageProcessing::ResizeImage(const T1*, T2*, int, int, int, int, int)’:
src/ImageProcessing.h:230:60: warning: ‘memset’ used with constant zero length parameter; this could be due to transposed parameters [-Wmemset-transposed-args]
memset(pDstImage,sizeof(T2)DstWidthDstHeightnChannels,0);
^
gcc -pthread -B /home/hai/anaconda3/envs/tianchi/compiler_compat -Wl,--sysroot=/ -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -I/home/hai/anaconda3/envs/tianchi/lib/python3.7/site-packages/numpy/core/include -I/home/hai/anaconda3/envs/tianchi/lib/python3.7/site-packages/numpy/core/include -I/home/hai/anaconda3/envs/tianchi/include/python3.7m -c src/Stochastic.cpp -o build/temp.linux-x86_64-3.7/src/Stochastic.o
cc1plus: warning: command line option ‘-Wstrict-prototypes’ is valid for C/ObjC but not for C++
gcc -pthread -B /home/hai/anaconda3/envs/tianchi/compiler_compat -Wl,--sysroot=/ -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -I/home/hai/anaconda3/envs/tianchi/lib/python3.7/site-packages/numpy/core/include -I/home/hai/anaconda3/envs/tianchi/lib/python3.7/site-packages/numpy/core/include -I/home/hai/anaconda3/envs/tianchi/include/python3.7m -c src/OpticalFlow.cpp -o build/temp.linux-x86_64-3.7/src/OpticalFlow.o
cc1plus: warning: command line option ‘-Wstrict-prototypes’ is valid for C/ObjC but not for C++
In file included from src/Image.h:9:0,
from src/OpticalFlow.h:6,
from src/OpticalFlow.cpp:4:
src/ImageProcessing.h: In static member function ‘static void ImageProcessing::ResizeImage(const T1, T2*, int, int, int, int, int)’:
src/ImageProcessing.h:230:60: warning: ‘memset’ used with constant zero length parameter; this could be due to transposed parameters [-Wmemset-transposed-args]
memset(pDstImage,sizeof(T2)DstWidthDstHeightnChannels,0);
^
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::imfilter_hv(Image&, 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::warpImageBicubicRef(const Image&, Image&, const Image&, const Image&, const Image&, const Image&, const Image&) const [with T1 = double; T2 = double; T = double]’:
src/Image.h:2482:55: required from ‘void Image::warpImageBicubicRef(const Image&, Image&, const Image&, const Image&) 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;
^
In file included from /usr/include/string.h:635:0,
from /usr/include/memory.h:29,
from src/Image.h:8,
from src/OpticalFlow.h:6,
from src/OpticalFlow.cpp:4:
In function ‘void* memset(void*, int, size_t)’,
inlined from ‘static void ImageProcessing::ResizeImage(const T1*, T2*, int, int, int, int, int) [with T1 = double; T2 = double]’ at src/ImageProcessing.h:230:2:
/usr/include/x86_64-linux-gnu/bits/string3.h:86:32: warning: call to ‘__warn_memset_zero_len’ declared with attribute warning: memset used with constant zero length parameter; this could be due to transposed parameters
__warn_memset_zero_len ();
^
gcc -pthread -B /home/hai/anaconda3/envs/tianchi/compiler_compat -Wl,--sysroot=/ -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -I/home/hai/anaconda3/envs/tianchi/lib/python3.7/site-packages/numpy/core/include -I/home/hai/anaconda3/envs/tianchi/lib/python3.7/site-packages/numpy/core/include -I/home/hai/anaconda3/envs/tianchi/include/python3.7m -c src/GaussianPyramid.cpp -o build/temp.linux-x86_64-3.7/src/GaussianPyramid.o
cc1plus: warning: command line option ‘-Wstrict-prototypes’ is valid for C/ObjC but not for C++
In file included from src/Image.h:9:0,
from src/GaussianPyramid.h:7,
from src/GaussianPyramid.cpp:4:
src/ImageProcessing.h: In static member function ‘static void ImageProcessing::ResizeImage(const T1*, T2*, int, int, int, int, int)’:
src/ImageProcessing.h:230:60: warning: ‘memset’ used with constant zero length parameter; this could be due to transposed parameters [-Wmemset-transposed-args]
memset(pDstImage,sizeof(T2)DstWidthDstHeightnChannels,0);
^
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::imfilter_hv(Image&, const double*, int, const double*, int) const [with T1 = double; T = double]’
src/Image.h:1199:47: required from ‘void Image::GaussianSmoothing(Image&, 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;
^
g++ -pthread -shared -B /home/hai/anaconda3/envs/tianchi/compiler_compat -L/home/hai/anaconda3/envs/tianchi/lib -Wl,-rpath=/home/hai/anaconda3/envs/tianchi/lib -Wl,--no-as-needed -Wl,--sysroot=/ build/temp.linux-x86_64-3.7/pyflow.o build/temp.linux-x86_64-3.7/src/Coarse2FineFlowWrapper.o build/temp.linux-x86_64-3.7/src/Stochastic.o build/temp.linux-x86_64-3.7/src/OpticalFlow.o build/temp.linux-x86_64-3.7/src/GaussianPyramid.o -o /home/hai/tianchi/pyflow-master/pyflow.cpython-37m-x86_64-linux-gnu.so

Python setup.py build_ext -i is running successfully?

@hitachinsk
Copy link

Switch to gcc/g++ 5.5 version, and try it again.

@Nannigalaxy
Copy link

Here is the gist to downgrade gcc.
You can always upgrade to latest version.

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

3 participants