Comments (10)
Hi,
On Fedora 20 with swig 2.0.11 I get similar errors. I have added and removed -builtin from swig-opts. Is there anything else I should try?
Dan
bash-4.2$ python setup.py --verbose build
running build
running build_ext
building '_gphoto2_abilities_list' extension
swigging src/gphoto2/lib/gphoto2_abilities_list.i to src/gphoto2/lib/gphoto2_abilities_list_wrap.c
swig -python -nodefaultctor -O -Wextra -Werror -MMD -DGPHOTO2_25 -I/usr/include -o src/gphoto2/lib/gphoto2_abilities_list_wrap.c src/gphoto2/lib/gphoto2_abilities_list.i
creating build
creating build/temp.linux-x86_64-2.7
creating build/temp.linux-x86_64-2.7/src
creating build/temp.linux-x86_64-2.7/src/gphoto2
creating build/temp.linux-x86_64-2.7/src/gphoto2/lib
gcc -pthread -fno-strict-aliasing -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -D_GNU_SOURCE -fPIC -fwrapv -DNDEBUG -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -D_GNU_SOURCE -fPIC -fwrapv -fPIC -I/usr/include/python2.7 -c src/gphoto2/lib/gphoto2_abilities_list_wrap.c -o build/temp.linux-x86_64-2.7/src/gphoto2/lib/gphoto2_abilities_list_wrap.o -O3 -Wno-unused-variable -Wno-strict-prototypes -Werror -DGPHOTO2_25
src/gphoto2/lib/gphoto2_abilities_list_wrap.c: In function ‘_wrap_CameraAbilitiesList___len__’:
src/gphoto2/lib/gphoto2_abilities_list_wrap.c:3398:5: error: implicit declaration of function ‘struct__CameraAbilitiesList___len__’ [-Werror=implicit-function-declaration]
result = (int)struct__CameraAbilitiesList___len__(arg1);
^
src/gphoto2/lib/gphoto2_abilities_list_wrap.c: In function ‘_wrap_CameraAbilitiesList_count’:
src/gphoto2/lib/gphoto2_abilities_list_wrap.c:3694:5: error: implicit declaration of function ‘struct__CameraAbilitiesList_count’ [-Werror=implicit-function-declaration]
result = (int)struct__CameraAbilitiesList_count(arg1);
^
src/gphoto2/lib/gphoto2_abilities_list_wrap.c: In function ‘_wrap_CameraAbilitiesList_lookup_model’:
src/gphoto2/lib/gphoto2_abilities_list_wrap.c:3733:5: error: implicit declaration of function ‘struct__CameraAbilitiesList_lookup_model’ [-Werror=implicit-function-declaration]
result = (int)struct__CameraAbilitiesList_lookup_model(arg1,(char const *)arg2);
^
cc1: all warnings being treated as errors
error: command 'gcc' failed with exit status 1
bash-4.2$ python setup.py --verbose build
running build
running build_ext
building '_gphoto2_abilities_list' extension
swigging src/gphoto2/lib/gphoto2_abilities_list.i to src/gphoto2/lib/gphoto2_abilities_list_wrap.c
swig -python -nodefaultctor -O -Wextra -Werror -MMD -builtin -DGPHOTO2_25 -I/usr/include -o src/gphoto2/lib/gphoto2_abilities_list_wrap.c src/gphoto2/lib/gphoto2_abilities_list.i
gcc -pthread -fno-strict-aliasing -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -D_GNU_SOURCE -fPIC -fwrapv -DNDEBUG -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -D_GNU_SOURCE -fPIC -fwrapv -fPIC -I/usr/include/python2.7 -c src/gphoto2/lib/gphoto2_abilities_list_wrap.c -o build/temp.linux-x86_64-2.7/src/gphoto2/lib/gphoto2_abilities_list_wrap.o -O3 -Wno-unused-variable -Wno-strict-prototypes -Werror -DGPHOTO2_25
src/gphoto2/lib/gphoto2_abilities_list_wrap.c: In function ‘_wrap_CameraAbilitiesList___len__’:
src/gphoto2/lib/gphoto2_abilities_list_wrap.c:3913:5: error: implicit declaration of function ‘struct__CameraAbilitiesList___len__’ [-Werror=implicit-function-declaration]
result = (int)struct__CameraAbilitiesList___len__(arg1);
^
src/gphoto2/lib/gphoto2_abilities_list_wrap.c: In function ‘_wrap_CameraAbilitiesList_count’:
src/gphoto2/lib/gphoto2_abilities_list_wrap.c:4214:5: error: implicit declaration of function ‘struct__CameraAbilitiesList_count’ [-Werror=implicit-function-declaration]
result = (int)struct__CameraAbilitiesList_count(arg1);
^
src/gphoto2/lib/gphoto2_abilities_list_wrap.c: In function ‘_wrap_CameraAbilitiesList_lookup_model’:
src/gphoto2/lib/gphoto2_abilities_list_wrap.c:4254:5: error: implicit declaration of function ‘struct__CameraAbilitiesList_lookup_model’ [-Werror=implicit-function-declaration]
result = (int)struct__CameraAbilitiesList_lookup_model(arg1,(char const *)arg2);
^
src/gphoto2/lib/gphoto2_abilities_list_wrap.c: At top level:
src/gphoto2/lib/gphoto2_abilities_list_wrap.c:5479:5: error: implicit declaration of function ‘offsetof’ [-Werror=implicit-function-declaration]
(Py_ssize_t)offsetof(SwigPyObject, dict), /* tp_dictoffset */
^
src/gphoto2/lib/gphoto2_abilities_list_wrap.c:5479:26: error: expected expression before ‘SwigPyObject’
(Py_ssize_t)offsetof(SwigPyObject, dict), /* tp_dictoffset */
^
src/gphoto2/lib/gphoto2_abilities_list_wrap.c:5731:26: error: expected expression before ‘SwigPyObject’
(Py_ssize_t)offsetof(SwigPyObject, dict), /* tp_dictoffset */
^
cc1: all warnings being treated as errors
error: command 'gcc' failed with exit status 1
bash-4.2$
from python-gphoto2.
Are you using a version newer than commit 86f261e, and have you tried completely removing the build directory?
from python-gphoto2.
Jim,
Yes. Newer than 86f261e
86f261e
.
Have deleted build directory.
Dan
Cheers,
Dan Tyrrell
Data & Networks Techniek
m 0409 964694 e [email protected]
www.dnt.com.au
On 2 December 2014 at 19:23, Jim Easterbrook [email protected]
wrote:
Are you using a version newer than commit 86f261e
86f261e,
and have you tried completely removing the build directory?—
Reply to this email directly or view it on GitHub
#4 (comment)
.
from python-gphoto2.
That's odd, as your log messages show the -builtin option being used.
Can you add some "print swig_version" statements to setup.py to try and work out what's going on.
from python-gphoto2.
Jim,
The log posted includes 2 attempts -a run without and then with -builtin. I manually edited setup.py.
Here it is set back to the original with 'print swig_version:
bash-4.2$ python setup.py --verbose build
2.0.11
running build
running build_ext
building '_gphoto2_abilities_list' extension
swigging src/gphoto2/lib/gphoto2_abilities_list.i to src/gphoto2/lib/gphoto2_abilities_list_wrap.c
swig -python -nodefaultctor -O -Wextra -Werror -MMD -DGPHOTO2_25 -I/usr/include -o src/gphoto2/lib/gphoto2_abilities_list_wrap.c src/gphoto2/lib/gphoto2_abilities_list.i
creating build
creating build/temp.linux-x86_64-2.7
creating build/temp.linux-x86_64-2.7/src
creating build/temp.linux-x86_64-2.7/src/gphoto2
creating build/temp.linux-x86_64-2.7/src/gphoto2/lib
gcc -pthread -fno-strict-aliasing -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -D_GNU_SOURCE -fPIC -fwrapv -DNDEBUG -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -D_GNU_SOURCE -fPIC -fwrapv -fPIC -I/usr/include/python2.7 -c src/gphoto2/lib/gphoto2_abilities_list_wrap.c -o build/temp.linux-x86_64-2.7/src/gphoto2/lib/gphoto2_abilities_list_wrap.o -O3 -Wno-unused-variable -Wno-strict-prototypes -Werror -DGPHOTO2_25
src/gphoto2/lib/gphoto2_abilities_list_wrap.c: In function ‘_wrap_CameraAbilitiesList___len__’:
src/gphoto2/lib/gphoto2_abilities_list_wrap.c:3398:5: error: implicit declaration of function ‘struct__CameraAbilitiesList___len__’ [-Werror=implicit-function-declaration]
result = (int)struct__CameraAbilitiesList___len__(arg1);
^
src/gphoto2/lib/gphoto2_abilities_list_wrap.c: In function ‘_wrap_CameraAbilitiesList_count’:
src/gphoto2/lib/gphoto2_abilities_list_wrap.c:3694:5: error: implicit declaration of function ‘struct__CameraAbilitiesList_count’ [-Werror=implicit-function-declaration]
result = (int)struct__CameraAbilitiesList_count(arg1);
^
src/gphoto2/lib/gphoto2_abilities_list_wrap.c: In function ‘_wrap_CameraAbilitiesList_lookup_model’:
src/gphoto2/lib/gphoto2_abilities_list_wrap.c:3733:5: error: implicit declaration of function ‘struct__CameraAbilitiesList_lookup_model’ [-Werror=implicit-function-declaration]
result = (int)struct__CameraAbilitiesList_lookup_model(arg1,(char const *)arg2);
^
cc1: all warnings being treated as errors
error: command 'gcc' failed with exit status 1
bash-4.2$
from python-gphoto2.
Ah, now I see. It's not the "(Py_ssize_t)offsetof(SwigPyObject, dict)" error at all, but something else that doesn't go away when -builtin is used. I'll look into it.
from python-gphoto2.
Jim,
Many thanks. I can give you access to the system if it makes it any easier or if there is anything else I can do just yell out.
Dan
from python-gphoto2.
It looks as if the '-builtin' bug isn't the only thing that changed in SWIG 2.0.11 (I'm on 2.0.10).
Your missing functions such as struct__CameraAbilitiesList___len__
are called _CameraAbilitiesList___len__
in my version. I think it might be possible to add extra definitions in macros.i. Can you add int (*struct ## _ ## type ## _ ## member)() = function;
immediately after line 143 in macros.i and try again.
from python-gphoto2.
Jim,
Much better but a similar error later on:
building '_gphoto2_widget' extension
swigging src/gphoto2/lib/gphoto2_widget.i to src/gphoto2/lib/gphoto2_widget_wrap.c
swig -python -nodefaultctor -O -Wextra -Werror -MMD -DGPHOTO2_25 -I/usr/include -o src/gphoto2/lib/gphoto2_widget_wrap.c src/gphoto2/lib/gphoto2_widget.i
gcc -pthread -fno-strict-aliasing -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -D_GNU_SOURCE -fPIC -fwrapv -DNDEBUG -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -D_GNU_SOURCE -fPIC -fwrapv -fPIC -I/usr/include/python2.7 -c src/gphoto2/lib/gphoto2_widget_wrap.c -o build/temp.linux-x86_64-2.7/src/gphoto2/lib/gphoto2_widget_wrap.o -O3 -Wno-unused-variable -Wno-strict-prototypes -Werror -DGPHOTO2_25
src/gphoto2/lib/gphoto2_widget_wrap.c: In function ‘_wrap_CameraWidget_set_value’:
src/gphoto2/lib/gphoto2_widget_wrap.c:4135:3: error: implicit declaration of function ‘struct__CameraWidget_set_value’ [-Werror=implicit-function-declaration]
result = (PyObject *)struct__CameraWidget_set_value(arg1,arg2);
^
src/gphoto2/lib/gphoto2_widget_wrap.c:4135:12: error: cast to pointer from integer of different size [-Werror=int-to-pointer-cast]
result = (PyObject *)struct__CameraWidget_set_value(arg1,arg2);
^
src/gphoto2/lib/gphoto2_widget_wrap.c: In function ‘_wrap_CameraWidget_get_value’:
src/gphoto2/lib/gphoto2_widget_wrap.c:4158:3: error: implicit declaration of function ‘struct__CameraWidget_get_value’ [-Werror=implicit-function-declaration]
result = (PyObject *)struct__CameraWidget_get_value(arg1);
^
src/gphoto2/lib/gphoto2_widget_wrap.c:4158:12: error: cast to pointer from integer of different size [-Werror=int-to-pointer-cast]
result = (PyObject *)struct__CameraWidget_get_value(arg1);
^
cc1: all warnings being treated as errors
error: command 'gcc' failed with exit status 1
bash-4.2$
from python-gphoto2.
Yup, same problem. My "hand crafted" helper functions need to match SWIG's naming scheme and it must have changed. Commit 667efe9 should do the right thing.
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.