-
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
Missing libgphoto2.so symbols, library is not loaded #173
Comments
If your python-gphoto2 installation copied libgphoto2 binaries to Do you have Capturing the output of |
I do not think it is about path to libgphoto2.so but problem when building _context*.so library where is no link to libgphoto2. When I check original file there are dependencies. Something like missing "-l" params in linker. But I do not understand what part of setup.py is responsible.
|
I found the issue. When pointing GPHOTO2_ROOT to source directory of libgphoto2 then the library found by pkg-config is libgphoto2.la and output is
So library is not passed to setuptools. The .so library is in .lib directory
The workaround is adding always libgphoto2 into options.
Note I also encountered linker non-optimization but seems it is not needed.
Note: does not work with g++. |
I suspect you are linking directly to your libgphoto2 build (in The compiler and linker options are obtained via |
libgphoto2 was compiled out of box. Yes, issue is value returned by |
Find the file |
libgphoto2-2.5.31.2/libgphoto2.pc
|
That's the one for a system libgphoto2 in |
It is file in source
All files seems almost equal, just prefix differs |
One of them should have the prefix you used when you ran configure before building and installing libgphoto2. That is the one to use.On 30 Jun 2024 11:03, tmandys ***@***.***> wrote:
It is file in source libgphoto2 directory which is referenced by GPHOTO2_ROOT.
/home/pi/work/libgphoto2
libgphoto2.pc
/home/pi/work/libgphoto2/libgphoto2-2.5.31.2
libgphoto2.pc <------------------
/home/pi/work/libgphoto2/l~debian/libgphoto2/usr/lib/aarch64-linux-gnu/pkgconfig
libgphoto2.pc
+
/home/pi/.local/lib/pkgconfig
libgphoto2.pc
All files seems almost equal, just prefix differs
—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you commented.Message ID: ***@***.***>
|
Issue is where pointing PKG_CONFIG_DIR evaluated in setup.py. This is from fresh libgphoto2 and python-gphoto2 repository clone. Seems pkg-config get
/home/pi/work/digie35-python/contrib/libgphoto2/libgphoto2.pc
home/pi/work/digie35-python/contrib/libgphoto2/libgphoto2-uninstalled.pc
Working but it takes wrong .pc system file
less /usr/lib/aarch64-linux-gnu/pkgconfig/libgphoto2.pc
|
I'm getting more and more confused by all this.
|
Key is this line where
See pkg-config man page (https://linux.die.net/man/1/pkg-config) --uninstalled |
I don't understand why |
I stuck with Note that I have no |
The file
The "install" stage copies all the files needed to use libgphoto2, including Then use this directory when installing python-gphoto2:
There is no requirement for debian packaging or anything like that. |
Note that |
I have compiled libgphoto2 to fix a bug and python-gphoto2. Compilation passed but problem is that cython binary packages does not load libghoto2.so library and complains about missing symbols. System is Bookworm on RPI.
ImportError: /home/pi/.local/lib/python3.11/site-packages/gphoto2/_context.cpython-311-aarch64-linux-gnu.so: undefined symbol: gp_context_set_status_func
I have to force loading libphoto2.so to get it working
LD_PRELOAD=/home/pi/.local/lib/python3.11/site-packages/gphoto2/libgphoto2/libgphoto2.so.6 python3 -m gphoto2
There are no bindings in cpython binaries:
How to fix this build issue ?
The text was updated successfully, but these errors were encountered: