Closed thijstriemstra closed 8 years ago
This looks like a link-time issue, i.e. it cannot find the libgphoto2 functions that the backend references. Do you have any way of passing linker flags to pyqtdeploy/sip? You'll probably have to pass something like -lgphoto2
.
I added that and the error changed, progress! :)
/home/raspi-build/src/gcc-linaro-4.9-2016.02-x86_64_arm-linux-gnueabihf/bin/../lib/gcc/arm-linux-gnueabihf/4.9.4/../../../../arm-linux-gnueabihf/bin/ld: foo.o: undefined reference to symbol 'gp_port_info_new@@LIBGPHOTO2_INTERNAL'
/home/raspi-build/sysroot/usr/lib/libgphoto2_port.so.12: error adding symbols: DSO missing from command line
collect2: error: ld returned 1 exit status
Makefile:435: recipe for target 'test' failed
make: *** [test] Error 1
Ready.
The sysroot contains a rsynced version of the /usr/
folder on the raspberry, including the gphoto library.
Turns out I had to add -lgphoto2 -lgphoto2_port
and it compiled, sweet! Thanks for the help. Here's a screenshot with final config, maybe useful to someone else.
I'm trying to compile gphoto2-cffi into a PyQt5 application using pyqtdeploy, to be deployed on a raspberrypi (ARM platform). pyqtdeploy uses something called sip to compile c/c++ code. The steps are basically including all the *.py files from a package and point it to any additional .c files, for example:
There you can see my approach for the other libraries (psutil and RPi.GPIO). Normally these C-extensions work when they're defined like:
I tried the same for this library, as you can see in the picture, but my build is failing with a long list of errors like this:
Apparently there's also a cffi
emit_c_code
method, which I also tried like the patch below, but this results in similar errors:Any ideas how I could produce a proper _backend.c file that doesn't throw these errors?