Skip to content
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

Libraries are missing soname #431

Closed
paolostivanin opened this issue Aug 10, 2021 · 7 comments
Closed

Libraries are missing soname #431

paolostivanin opened this issue Aug 10, 2021 · 7 comments
Labels
bug Something isn't working

Comments

@paolostivanin
Copy link
Contributor

Version: all released versions, included latest stable 1.9.1

The following libraries are missing a SONAME (DT_SONAME) field, which is unfortunate. Programs built with them will not receive proper library requires (DT_NEEDED):

libaltaircam.so
libASICamera2.so
libEFWFilter.so
libUSB2ST4Conv.so
libEAFFocuser.so
libatikcameras.so
libflycapture.so
libmallincam.so
libnncam.so
libpktriggercord.so
libqsiapi.so
libRicohCameraSDKCpp.so
libmtpricoh.so
libsbig.so
libstarshootg.so
libSVBCameraSDK.so

Unfortunately, this is something that only the vendors (ZWO, QHY, etc) can fix.

@paolostivanin paolostivanin added the bug Something isn't working label Aug 10, 2021
@jengelh
Copy link

jengelh commented Aug 10, 2021

As a workaround, patchelf --set-soname libstarshootg.so.1 on the packager side is possible.

@knro
Copy link
Collaborator

knro commented Aug 10, 2021

Binary blobs provided by the camera manufacturers. Can't really do much about it besides using patchelf as suggested above.

@paolostivanin
Copy link
Contributor Author

Thanks!
That worked for almost all libs. I have one last issue with libatikcameras, because it requires libflycapture.so.2:

$ patchelf --debug --print-needed indi-3rdparty-1.9.1/libatik/x64/libatikcameras.bin 
...
libflycapture.so.2
...

I'm using patchelf --set-soname 2 libflycapture.so.2, and it works fine because DT_SONAME is correctly set, but when trying to install libatikcameras2 I get:

unresolvable: nothing provides libflycapture.so.2()(64bit) needed by libatikcameras2

Any idea how I can sovle this @jengelh ?

@paolostivanin
Copy link
Contributor Author

libflycapture has the correct soname set, so I don't understand why OBS is not picking up the lib correctly (https://build.opensuse.org/package/binary/home:polslinux:teststuff/libindi-3rdparty-libs/openSUSE_Tumbleweed/x86_64/libatikcameras2-1.9.1-17.1.x86_64.rpm)

$ objdump -p indi-3rdparty-1.9.1/libatik/x64/libflycapture.bin |grep 'SONAME'
  SONAME               libflycapture.so.2

@paolostivanin
Copy link
Contributor Author

found and fixed the packaging issue :) (as always the bug was between the chair and the keyboard)

@jengelh
Copy link

jengelh commented Aug 19, 2021

When you (re-)set the SONAME on one library, it may be necessary to do --replace-needed in another.

Binary blobs provided by the camera manufacturers. Can't really do much about it besides using patchelf as suggested above.

@knro, would it be possible/feasible that indi-3rdparty does the patchelf (perhaps as part of make install or something)? Then all distributions would benefit.

@paolostivanin
Copy link
Contributor Author

In case it might be helpful, that's what I've used to find missing/wrong soname:

for f in $(find lib* -type f -name *bin | grep -E 'x64|64' | sed '/arm64/d' | xargs); do echo "=> Checking $f" ; patchelf --debug --print-soname $f; echo "------"; done

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants