AICAN-Research / FAST-Pathology

⚡ Open-source software for deep learning-based digital pathology
BSD 2-Clause "Simplified" License
121 stars 24 forks source link

Ubuntu install doesn't find libQt5Core #83

Closed nategarver-daniels closed 1 year ago

nategarver-daniels commented 1 year ago

Trying to install the .deb package in Ubuntu 22.04, and running fastpathology indicates a missing libQt5Core.so.5. The library is in /opt/fastpathology/lib, as are other libraries that the binary is linked against and finds. Any chance this is something others have seen?

smistad commented 1 year ago

Sounds like there might be something wrong with the rpath. I can take a look at this tomorrow. Maybe you can do: ldd /opt/fastpathology/bin/fastpathology to see which libraries it is unable to find. And also objdump -x /opt/fastpathology/bin/fastpathology | grep 'R.*PATH' to check if the rpath is set.

nategarver-daniels commented 1 year ago

Thanks for the quick response. This is the only missing library:

ldd /opt/fastpathology/bin/fastpathology | grep not | sort -u libQt5Core.so.5 => not found

and

The runpath appears to be relative:

objdump -x /opt/fastpathology/bin/fastpathology | grep 'R.*PATH' RUNPATH $ORIGIN/../lib

And other libraries that are installed in the fastpathology path are found:

libFAST.so.4 => /opt/fastpathology/bin/./../lib/libFAST.so.4 (0x00007f76d0800000) libOpenCL.so.1 => /opt/fastpathology/bin/./../lib/libOpenCL.so.1 (0x00007f76d0400000) libQt5Core.so.5 => not found libQt5Widgets.so.5 => /opt/fastpathology/bin/./../lib/libQt5Widgets.so.5 (0x00007f76cfa00000) libQt5Gui.so.5 => /opt/fastpathology/bin/./../lib/libQt5Gui.so.5 (0x00007f76cf000000) libQt5OpenGL.so.5 => /opt/fastpathology/bin/./../lib/libQt5OpenGL.so.5 (0x00007f76cec00000) libQt5Network.so.5 => /opt/fastpathology/bin/./../lib/libQt5Network.so.5 (0x00007f76ce800000)

I'll admit that this one is stumping me. I thought perhaps libQt5Core.so.5 was missing a dependency, but it looks OK as well:

ldd ../lib/libQt5Core.so.5 linux-vdso.so.1 (0x00007ffea3b6e000) libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x00007f125d99a000) libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2 (0x00007f125d995000) libglib-2.0.so.0 => /opt/fastpathology/bin/../lib/../lib/libglib-2.0.so.0 (0x00007f125cc00000) libstdc++.so.6 => /lib/x86_64-linux-gnu/libstdc++.so.6 (0x00007f125c9d4000) libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007f125c8ed000) libgcc_s.so.1 => /lib/x86_64-linux-gnu/libgcc_s.so.1 (0x00007f125d973000) libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007f125c6c5000) /lib64/ld-linux-x86-64.so.2 (0x00007f125d9ac000) libpcre.so.3 => /opt/fastpathology/bin/../lib/../lib/../lib/libpcre.so.3 (0x00007f125c400000)

On Mon, Aug 21, 2023 at 3:45 PM Erik Smistad @.***> wrote:

Sounds like there might be something wrong with the rpath. I can take a look at this tomorrow. Maybe you can do: ldd /opt/fastpathology/bin/fastpathology to see which libraries it is unable to find. And also objdump -x /opt/fastpathology/bin/fastpathology | grep 'R.*PATH' to check if the rpath is set.

— Reply to this email directly, view it on GitHub https://github.com/AICAN-Research/FAST-Pathology/issues/83#issuecomment-1686937860, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAGJJFLJTGXQKXPPTKFGJ7TXWO3G7ANCNFSM6AAAAAA3Y26P6A . You are receiving this because you authored the thread.Message ID: @.***>

smistad commented 1 year ago

Can you confirm that it is the latest release you have tried (1.1.1) https://github.com/AICAN-Research/FAST-Pathology/releases/tag/v1.1.1

I tried installing this on my ubuntu 20.04, and it works fine.

Could you paste the entire output of ldd /opt/fastpathology/bin/fastpathology?

nategarver-daniels commented 1 year ago

Thanks Erik. this is with v1.1.1 on 22.04 LTS. I am installing it in a singularity container, so it's possible that is the issue as well. Here's the full ldd output:

ldd /opt/fastpathology/bin/fastpathology linux-vdso.so.1 (0x00007fffdadfc000) libFAST.so.4 => /opt/fastpathology/bin/../lib/libFAST.so.4 (0x00007fa373e00000) libOpenCL.so.1 => /opt/fastpathology/bin/../lib/libOpenCL.so.1 (0x00007fa373a00000) libQt5Core.so.5 => not found libQt5Widgets.so.5 => /opt/fastpathology/bin/../lib/libQt5Widgets.so.5 (0x00007fa373000000) libQt5Gui.so.5 => /opt/fastpathology/bin/../lib/libQt5Gui.so.5 (0x00007fa372600000) libQt5OpenGL.so.5 => /opt/fastpathology/bin/../lib/libQt5OpenGL.so.5 (0x00007fa372200000) libQt5Network.so.5 => /opt/fastpathology/bin/../lib/libQt5Network.so.5 (0x00007fa371e00000) libstdc++.so.6 => /lib/x86_64-linux-gnu/libstdc++.so.6 (0x00007fa371bd4000) libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007fa373d19000) libgcc_s.so.1 => /lib/x86_64-linux-gnu/libgcc_s.so.1 (0x00007fa3745e0000) libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007fa3719ac000) libQt5Core.so.5 => not found libQt5Multimedia.so.5 => /opt/fastpathology/bin/../lib/../lib/libQt5Multimedia.so.5 (0x00007fa371600000) libz.so.1 => /opt/fastpathology/bin/../lib/../lib/libz.so.1 (0x00007fa371200000) libtiff.so.5 => /opt/fastpathology/bin/../lib/../lib/libtiff.so.5 (0x00007fa370e00000) libopenslide.so => /opt/fastpathology/bin/../lib/../lib/libopenslide.so (0x00007fa370a00000) libhdf5_cpp.so.103 => /opt/fastpathology/bin/../lib/../lib/libhdf5_cpp.so.103 (0x00007fa370600000) libJKQTPlotterSharedLib_Release.so.4.0.0 => /opt/fastpathology/bin/../lib/../lib/libJKQTPlotterSharedLib_Release.so.4.0.0 (0x00007fa370000000) libOpenGL.so.0 => /lib/x86_64-linux-gnu/libOpenGL.so.0 (0x00007fa3745b4000) libGLX.so.0 => /lib/x86_64-linux-gnu/libGLX.so.0 (0x00007fa374580000) libX11.so.6 => /lib/x86_64-linux-gnu/libX11.so.6 (0x00007fa3724c0000) libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x00007fa37497c000) libgomp.so.1 => /lib/x86_64-linux-gnu/libgomp.so.1 (0x00007fa374536000) /lib64/ld-linux-x86-64.so.2 (0x00007fa374994000) libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2 (0x00007fa374975000) libQt5Core.so.5 => not found libQt5Core.so.5 => not found libGL.so.1 => /lib/x86_64-linux-gnu/libGL.so.1 (0x00007fa373c92000) libQt5Core.so.5 => not found libQt5Core.so.5 => not found libssl.so.1.1 => /opt/fastpathology/bin/../lib/../lib/libssl.so.1.1 (0x00007fa36fc00000) libcrypto.so.1.1 => /opt/fastpathology/bin/../lib/../lib/libcrypto.so.1.1 (0x00007fa36f600000) libQt5Core.so.5 => not found libjpeg.so.8 => /opt/fastpathology/bin/../lib/../lib/../lib/libjpeg.so.8 (0x00007fa36f200000) libpixman-1.so.0 => /opt/fastpathology/bin/../lib/../lib/../lib/libpixman-1.so.0 (0x00007fa36ee00000) libglib-2.0.so.0 => /opt/fastpathology/bin/../lib/../lib/../lib/libglib-2.0.so.0 (0x00007fa36ea00000) libcairo.so.2 => /lib/x86_64-linux-gnu/libcairo.so.2 (0x00007fa3714d8000) libgdk_pixbuf-2.0.so.0 => /opt/fastpathology/bin/../lib/../lib/../lib/libgdk_pixbuf-2.0.so.0 (0x00007fa36e600000) libopenjp2.so.7 => /opt/fastpathology/bin/../lib/../lib/../lib/libopenjp2.so.7 (0x00007fa36e200000) libsqlite3.so.0 => /opt/fastpathology/bin/../lib/../lib/../lib/libsqlite3.so.0 (0x00007fa36de00000) libxml2.so.2 => /opt/fastpathology/bin/../lib/../lib/../lib/libxml2.so.2 (0x00007fa36da00000) libpng16.so.16 => /opt/fastpathology/bin/../lib/../lib/../lib/libpng16.so.16 (0x00007fa36d600000) libgobject-2.0.so.0 => /opt/fastpathology/bin/../lib/../lib/../lib/libgobject-2.0.so.0 (0x00007fa36d200000) libgio-2.0.so.0 => /opt/fastpathology/bin/../lib/../lib/../lib/libgio-2.0.so.0 (0x00007fa36ce00000) libhdf5.so.103 => /opt/fastpathology/bin/../lib/../lib/../lib/libhdf5.so.103 (0x00007fa36c800000) libQt5Svg.so.5 => /opt/fastpathology/bin/../lib/../lib/../lib/libQt5Svg.so.5 (0x00007fa36c400000) libJKQTMathTextSharedLib_Release.so.4.0.0 => /opt/fastpathology/bin/../lib/../lib/../lib/libJKQTMathTextSharedLib_Release.so.4.0.0 (0x00007fa36c000000) libJKQTCommonSharedLib_Release.so.4.0.0 => /opt/fastpathology/bin/../lib/../lib/../lib/libJKQTCommonSharedLib_Release.so.4.0.0 (0x00007fa36bc00000) libQt5PrintSupport.so.5 => /opt/fastpathology/bin/../lib/../lib/../lib/libQt5PrintSupport.so.5 (0x00007fa36b800000) libQt5Core.so.5 => not found libGLdispatch.so.0 => /lib/x86_64-linux-gnu/libGLdispatch.so.0 (0x00007fa373948000) libxcb.so.1 => /lib/x86_64-linux-gnu/libxcb.so.1 (0x00007fa373c68000) libpcre.so.3 => /opt/fastpathology/bin/../lib/../lib/../lib/../lib/libpcre.so.3 (0x00007fa36b400000) libfontconfig.so.1 => /lib/x86_64-linux-gnu/libfontconfig.so.1 (0x00007fa373c1e000) libfreetype.so.6 => /lib/x86_64-linux-gnu/libfreetype.so.6 (0x00007fa371138000) libxcb-shm.so.0 => /lib/x86_64-linux-gnu/libxcb-shm.so.0 (0x00007fa373c19000) libxcb-render.so.0 => /lib/x86_64-linux-gnu/libxcb-render.so.0 (0x00007fa373939000) libXrender.so.1 => /lib/x86_64-linux-gnu/libXrender.so.1 (0x00007fa373c0c000) libXext.so.6 => /lib/x86_64-linux-gnu/libXext.so.6 (0x00007fa373924000) libgmodule-2.0.so.0 => /opt/fastpathology/bin/../lib/../lib/../lib/../lib/libgmodule-2.0.so.0 (0x00007fa36b000000) libicuuc.so.60 => /opt/fastpathology/bin/../lib/../lib/../lib/../lib/libicuuc.so.60 (0x00007fa36ac00000) liblzma.so.5 => /opt/fastpathology/bin/../lib/../lib/../lib/../lib/liblzma.so.5 (0x00007fa36a800000) libffi.so.6 => /opt/fastpathology/bin/../lib/../lib/../lib/../lib/libffi.so.6 (0x00007fa36a400000) libselinux.so.1 => /lib/x86_64-linux-gnu/libselinux.so.1 (0x00007fa3738f8000) libresolv.so.2 => /lib/x86_64-linux-gnu/libresolv.so.2 (0x00007fa3738e4000) libmount.so.1 => /lib/x86_64-linux-gnu/libmount.so.1 (0x00007fa372fbc000) libQt5Core.so.5 => not found libQt5Core.so.5 => not found libQt5Xml.so.5 => /opt/fastpathology/bin/../lib/../lib/../lib/../lib/libQt5Xml.so.5 (0x00007fa36a000000) libQt5Core.so.5 => not found libQt5Core.so.5 => not found libXau.so.6 => /lib/x86_64-linux-gnu/libXau.so.6 (0x00007fa372fb4000) libXdmcp.so.6 => /lib/x86_64-linux-gnu/libXdmcp.so.6 (0x00007fa372fac000) libexpat.so.1 => /lib/x86_64-linux-gnu/libexpat.so.1 (0x00007fa372f7b000) libuuid.so.1 => /lib/x86_64-linux-gnu/libuuid.so.1 (0x00007fa372f72000) libbrotlidec.so.1 => /lib/x86_64-linux-gnu/libbrotlidec.so.1 (0x00007fa372f62000) libicudata.so.60 => /opt/fastpathology/bin/../lib/../lib/../lib/../lib/../lib/libicudata.so.60 (0x00007fa368400000) libpcre2-8.so.0 => /lib/x86_64-linux-gnu/libpcre2-8.so.0 (0x00007fa371441000) libblkid.so.1 => /lib/x86_64-linux-gnu/libblkid.so.1 (0x00007fa372489000) libQt5Core.so.5 => not found libbsd.so.0 => /lib/x86_64-linux-gnu/libbsd.so.0 (0x00007fa372471000) libbrotlicommon.so.1 => /lib/x86_64-linux-gnu/libbrotlicommon.so.1 (0x00007fa3721dd000) libmd.so.0 => /lib/x86_64-linux-gnu/libmd.so.0 (0x00007fa372464000)

On Tue, Aug 22, 2023 at 4:35 AM Erik Smistad @.***> wrote:

Can you confirm that it is the latest release you have tried (1.1.1) https://github.com/AICAN-Research/FAST-Pathology/releases/tag/v1.1.1

I tried installing this on my ubuntu 20.04, and it works fine.

Could you paste the entire output of ldd /opt/fastpathology/bin/fastpathology?

— Reply to this email directly, view it on GitHub https://github.com/AICAN-Research/FAST-Pathology/issues/83#issuecomment-1687730560, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAGJJFIFYZONY6R4LY52IN3XWRVMPANCNFSM6AAAAAA3Y26P6A . You are receiving this because you authored the thread.Message ID: @.***>

smistad commented 1 year ago

Very strange.. Have you tried outside singularity?

You could also try to do LD_LIBRARY_PATH=/opt/fastpathology/lib/ /opt/fastpathology/bin/fastpathology Since the libQt5Core.so.5 should lie in /opt/fastpathology/lib/

nategarver-daniels commented 1 year ago

I am working on doing it outside of Singularity, but I've also tried explicitly setting LD_LIBRARY_PATH, etc. to no avail. Since it works for you, I'm definitely suspecting this is a me problem, and as such the issue can likely be closed.

On Tue, Aug 22, 2023 at 8:39 AM Erik Smistad @.***> wrote:

Very strange.. Have you tried outside singularity?

You could also try to do LD_LIBRARY_PATH=/opt/fastpathology/lib/ /opt/fastpathology/bin/fastpathology Since the libQt5Core.so.5 should lie in /opt/fastpathology/lib/

— Reply to this email directly, view it on GitHub https://github.com/AICAN-Research/FAST-Pathology/issues/83#issuecomment-1688107780, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAGJJFIWZCDPGHL5IGBQAOTXWSSBXANCNFSM6AAAAAA3Y26P6A . You are receiving this because you authored the thread.Message ID: @.***>

nategarver-daniels commented 1 year ago

Another note, this happens even if I add the /opt/fastpathology/lib directory to the system shared library path with ldconfig. So definitely a me problem : )

nategarver-daniels commented 1 year ago

Ok, last comment and I'll close it. Thanks for nudging me in the right direction. Running ldconfig -p after adding the libraries showed:

`Singularity> ldconfig -p | grep Core

libQt5Core.so.5 (libc6,x86-64, OS ABI: Linux 3.17.0) => /opt/fastpathology/lib/libQt5Core.so.5 libQt5Core.so (libc6,x86-64, OS ABI: Linux 3.17.0) => /opt/fastpathology/lib/libQt5Core.so`

and none of the other libraries had ABI tags. The kernel the underlying system was using did not have the same ABI tag, which (to my understanding) was preventing the shared library from being used. Using strip to remove the ABI tag like so:

strip --remove-section=.note.ABI-tag /opt/fastpathology/lib/libQt5Core.so.5.15.2

seems to have cleared things up. Thanks again for the help, I appreciate it.

smistad commented 1 year ago

Hm, I have never noticed this tag before. Does it mean that your singularity container was using a very old linux kernel? The Qt5 binaries here were compiled on ubuntu 18.04

We should then probably consider adding this fix ourselves

nategarver-daniels commented 1 year ago

The OS where the container was running was a RHEL7.9 system, so it's kernel as presented to the container was 3.10, which was the problem. Here is a very long thread about it on the microsoft WSL github: https://github.com/microsoft/WSL/issues/3023

smistad commented 1 year ago

Ok, thanks for the info.