-
Notifications
You must be signed in to change notification settings - Fork 59
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
Tried to compile on Raspberry PI #2
Comments
I just tried it on my Pi and got the same result. It's got an earlier version of SWIG (2.0.7) than I've been using on my main machine (2.0.10). The problem is in the typemaps for gp_port_info_new(), which I don't think would ever be called from Python, so doesn't really need wrapping. (But who knows what someone might want to do...) |
SWIG version 2.0.7 complains about an argument type that SWIG 2.0.10 ignores. See issue #2.
PS I haven't tested any image capture stuff - you may find things you need are missing or "not properly joined up". Do let me know of any problems you run into. |
Thanks Jim. |
Thanks Jim, I got the same issue but on ubuntu 12.04 with default swig 2.04 installation. |
Got this issue arising now: *gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fPIC -I/usr/include/python2.7 -c source/lib/gphoto2_camera_wrap.c -o build/temp.linux-armv6l-2.7/source/lib/gphoto2_camera_wrap.o -O3 -Wno-unused-variable gcc version 4.6.3 (Debian 4.6.3-14+rpi1) |
Unfortunately, although this change allows it to compile with older SWIG versions, it causes a segfault when gp_camera_set_port_info() is called. Some more work needed. |
I think I've found the problem. It's nothing to do with SWIG, it's the version of libgphoto2. The API changed in version 2.5 (see http://www.gphoto.org/news/) - my Pi only has version 2.4.14. I'm surprised I managed to build python-gphoto2 at all. You certainly need version 2.5 to run the example programs. |
The problem compiling on a Pi is because it has libgphoto2 version 2.4. The Python interfaces need version 2.5+.
Commit 9d1f71e allows building with gphoto2 version 2.4 or 2.5. Some of the examples work with version 2.4 as well (tested with my Canon DSLR connected to a Raspberry Pi). |
Hi Jim,
I love that someone finally is working on a real wrapper for gphoto2 for python.
I tried to compile on a raspberry PI as I am starting a series of time lapse scripts and I got the following, my days of C are a bit behind me so not sure if I am missing a dev or if its something else below is the output of what I ran:
*running build
running build_py
copying source/gphoto2_camera.py -> build/lib.linux-armv6l-2.7/gphoto2
copying source/gphoto2_abilities_list.py -> build/lib.linux-armv6l-2.7/gphoto2
running build_ext
building '_gphoto2_camera' extension
swigging source/gphoto2_camera.i to source/gphoto2_camera_wrap.c
swig -python -I/usr/include -builtin -O -Wall -o source/gphoto2_camera_wrap.c source/gphoto2_camera.i
gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fPIC -I/usr/include/python2.7 -c source/gphoto2_camera_wrap.c -o build/temp.linux-armv6l-2.7/source/gphoto2_camera_wrap.o -O3 -Wno-unused-variable
source/gphoto2_camera_wrap.c: In function ‘_wrap_gp_camera_get_port_info’:
source/gphoto2_camera_wrap.c:5536:5: error: incompatible type for argument 2 of ‘SWIG_Python_NewPointerObj’
source/gphoto2_camera_wrap.c:2547:1: note: expected ‘void ’ but argument is of type ‘GPPortInfo’
error: command 'gcc' failed with exit status 1
Thanks for the help
Cheers
Fred
The text was updated successfully, but these errors were encountered: