jordens / pyflycapture2

python bindings for the flycapture v2 api (libflycapture-2c)
37 stars 31 forks source link

Installing on arm processor #23

Closed EvilGarfield closed 7 years ago

EvilGarfield commented 7 years ago

Hi!

Thank you for oyur wrappe that proved very useful. I use it on Linux without problem. I now want to use the camera on a RPi3 but when installing the wrapper, I get the following error:

`running install

running bdist_egg

running egg_info

writing pyflycapture2.egg-info/PKG-INFO writing requirements to pyflycapture2.egg-info/requires.txt writing dependency_links to pyflycapture2.egg-info/dependency_links.txt writing top-level names to pyflycapture2.egg-info/top_level.txt reading manifest file 'pyflycapture2.egg-info/SOURCES.txt' reading manifest template 'MANIFEST.in' writing manifest file 'pyflycapture2.egg-info/SOURCES.txt' installing library code to build/bdist.linux-armv7l/egg running install_lib running build_ext skipping 'src/flycapture2.c' Cython extension (up-to-date) building 'flycapture2' extension arm-linux-gnueabihf-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -I/usr/include/flycapture/C -IC:/Program Files/Point Grey Research/FlyCapture2/include/C -I/home/droppi/.virtualenvs/cv/lib/python3.5/site-packages/numpy/core/include -I/usr/include/python3.5m -I/home/droppi/.virtualenvs/cv/include/python3.5m -c src/flycapture2.c -o build/temp.linux-armv7l-3.5/src/flycapture2.o src/flycapture2.c:432:31: fatal error: FlyCapture2Defs_C.h: No such file or directory compilation terminated. error: command 'arm-linux-gnueabihf-gcc' failed with exit status 1 `

Are you aware of such an issue? Would you have a workaround?

Thank you in advance Best

jordens commented 7 years ago

https://github.com/jordens/pyflycapture2#install-point-grey-flycapture2-library

jordens commented 7 years ago

check that you have the heades in the usual locations (/usr/include/...) or adjust https://github.com/jordens/pyflycapture2/blob/master/setup.py

ethanlarochelle commented 7 years ago

@EvilGarfield I tried this a few months ago and kept hitting different issues. I know this doesn't really help, but I had an Intel MinnowBoard Max available and it works well on that without making changes. The physical size is similar to the Pi and has USB3 and SATA support.

EvilGarfield commented 7 years ago

I think that the problem is that FlyCapture is not installed the same way on an ARM architecture than on other. So I copied my files from the desktop PC to the Pi on /usr/include. This solved my error but now I'm stuck a bit farther down the road.

`

running install running bdist_egg running egg_info writing pyflycapture2.egg-info/PKG-INFO writing requirements to pyflycapture2.egg-info/requires.txt writing dependency_links to pyflycapture2.egg-info/dependency_links.txt writing top-level names to pyflycapture2.egg-info/top_level.txt reading manifest file 'pyflycapture2.egg-info/SOURCES.txt' reading manifest template 'MANIFEST.in' writing manifest file 'pyflycapture2.egg-info/SOURCES.txt' installing library code to build/bdist.linux-armv7l/egg running install_lib running build_ext skipping 'src/flycapture2.c' Cython extension (up-to-date) building 'flycapture2' extension arm-linux-gnueabihf-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -I/usr/include/flycapture/C -IC:/Program Files/Point Grey Research/FlyCapture2/include/C -I/home/droppi/.virtualenvs/cv/lib/python3.5/site-packages/numpy/core/include -I/usr/include/python3.5m -I/home/droppi/.virtualenvs/cv/include/python3.5m -c src/flycapture2.c -o build/temp.linux-armv7l-3.5/src/flycapture2.o In file included from src/flycapture2.c:433:0: /usr/include/flycapture/C/FlyCapture2_C.h:395:3: warning: function declaration isn’t a prototype [-Wstrict-prototypes] fc2ForceAllIPAddressesAutomatically(); ^ /usr/include/flycapture/C/FlyCapture2_C.h:1533:3: warning: function declaration isn’t a prototype [-Wstrict-prototypes] ResetStats(); ^ In file included from /home/droppi/.virtualenvs/cv/lib/python3.5/site-packages/numpy/core/include/numpy/ndarraytypes.h:1788:0, from /home/droppi/.virtualenvs/cv/lib/python3.5/site-packages/numpy/core/include/numpy/ndarrayobject.h:18, from /home/droppi/.virtualenvs/cv/lib/python3.5/site-packages/numpy/core/include/numpy/arrayobject.h:4, from src/flycapture2.c:437: /home/droppi/.virtualenvs/cv/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 " \

^ src/flycapture2.c: In function ‘pyx_pf_11flycapture2_5Image_4array’: src/flycapture2.c:7139:36: warning: passing argument 1 of ‘(PyObject ()(PyTypeObject , PyArray_Descr , int, npy_intp , npy_intp , void , int, PyObject ))*(PyArray_API + 376u)’ from incompatible pointer type [-Wincompatible-pointer-types] pyx_t_1 = PyArray_NewFromDescr(((PyObject )__pyx_ptype_5numpy_ndarray), __ ^ src/flycapture2.c:7139:36: note: expected ‘PyTypeObject {aka struct _typeobject }’ but argument is of type ‘PyObject {aka struct _object *}’ creating build/lib.linux-armv7l-3.5 arm-linux-gnueabihf-gcc -pthread -shared -Wl,-O1 -Wl,-Bsymbolic-functions -Wl,-Bsymbolic-functions -Wl,-z,relro -Wl,-Bsymbolic-functions -Wl,-z,relro -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 build/temp.linux-armv7l-3.5/src/flycapture2.o -LC:/Program Files/Point Grey Research/FlyCapture2/lib64/C -lflycapture-c -o build/lib.linux-armv7l-3.5/flycapture2.cpython-35m-arm-linux-gnueabihf.so /usr/bin/ld: cannot find -lflycapture-c collect2: error: ld returned 1 exit status error: command 'arm-linux-gnueabihf-gcc' failed with exit status 1

`

I am fairly new to programming and Linux in general and I struggle to understand the problem. I cannot find this -lflycapture-c even on my Desktop

jordens commented 7 years ago

libflycapture-c is one of the pointgrey packages

jordens commented 7 years ago

@EvilGarfield is this resolved now?

chelsell commented 7 years ago

@jordens I had the same problem, like you say it is fixed by copying the contents of flycapture.2.9.3.43_armhf/lib/C (including libflycapture-c.so) to /usr/lib. It's easy to miss this because the pointgrey installation instructions don't say to copy the contents of this directory to /usr/lib. Might be worth documenting in the installation instructions.

jordens commented 7 years ago

@chelsell Thanks! I don't really use pyflycapture2 much anymore. Could you write a few lines of instructions with the correct files and the correct locations?

chelsell commented 7 years ago

@jordens Happily! One somewhat unrelated question though--you mention that there is now PointGrey support for a python flycap wrapper, but I can't find it. Would you mind sharing a link?

jordens commented 7 years ago

here and here and here supposedly.

chelsell commented 7 years ago

@jordens Thanks