Comments (12)
What version of SWIG are you using?
from python-gphoto2.
swig 3.0.7
from python-gphoto2.
I'm still on 3.0.2. I'll investigate further. Meanwhile, does editing setup.py and removing '-Wextra' and '-Werror' from swig_opts help?
from python-gphoto2.
No. I have to also remove Werror in extra_compile_args, and then I only get warnings.
Thanks.
from python-gphoto2.
I need to set up an archlinux virtual machine to sort this out properly. This may take some time.
from python-gphoto2.
I've established that it's not the different SWIG versions that's the problem, but most likely the different gcc versions (4.8.3 on my OpenSUSE machine vs 5.2.0 on archlinux).
from python-gphoto2.
I've found that some of the warnings (e.g. "missing braces around initializer") are easily disabled and probably inconsequential. However, the "excess elements in struct initializer" warnings are more serious. Ignoring all errors means the build and install appears to work, but the python module produced does not work correctly.
My archlinux machine has Python 3.5, which introduces a new member (PyAsyncMethods as_async) into the PyHeapTypeObject struct defined in /usr/include/python3.5m/object.h. Removing this member stops the "excess elements in struct initializer" warnings and produces a working python module. This is not a solution!
It appears that SWIG is not aware of this difference between python 3.5 & python 3.4, and so is wrongly defining its version of the python type structs.
from python-gphoto2.
Nice investigations.
SWIG does not seem to have any ticket related to async. It's probably worth to talk to them.
from python-gphoto2.
A more legitimate workaround is to not use SWIG's '-builtin' option. This makes wrappers that don't use PyHeapTypeObject at all. My problem is that the PyPI releases of python-gphoto2 include the SWIG output (to reduce the dependencies users need) and the -builtin option provides a worthwhile improvement for most Python versions.
I'll modify setup.py to drop the -builtin option for Python 3.5 users who are building from source. This will be a temporary fix until SWIG catches up.
from python-gphoto2.
I've released version 1.2.2 that should use -builtin only where it's known to be safe. I'll submit a bug report to SWIG when I've made a suitable small example to illustrate the problem.
from python-gphoto2.
I successfully built the package with 1.2.2. Thank you for quick fix!
from python-gphoto2.
See swig/swig#539.
from python-gphoto2.
Related Issues (20)
- Missing pre-req's(?) after building libgphoto2 from source on Raspberry Pi HOT 3
- Can not set datetime on Canon EOS 1200D HOT 4
- equivalent of gphoto2 --reset HOT 1
- delete a file HOT 2
- gp_camera_get_single_config HOT 2
- Socket error after gp_camera_exit in windows/msys2 HOT 15
- Faster way to copy files from camera HOT 7
- Sony FX3 overshoot HOT 1
- `delete_file()` does not delete file HOT 9
- Segmentation Fault segfault on gp.Camera.autodetect() on Github Actions Runner HOT 21
- LGPL vs. GPL license? HOT 8
- Test Virtual Camera HOT 4
- Missing bindings for gp_port_new, gp_port_open, and gp_port_reset? HOT 2
- capture_preview() broken in v2.5.0 HOT 4
- having trouble getting gphoto2 on rpi HOT 3
- use python-gphoto2 in Windows system HOT 1
- Always connected capture anytime HOT 1
- Github Actions Python 3.12 environment. HOT 1
- Is live data acquisition available in the library? HOT 1
- Error When Installing with "Local" libgphoto2 HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from python-gphoto2.