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

libQt5Core.so.5: cannot open shared object file #375

Closed
RobertBaruch opened this issue Dec 31, 2019 · 4 comments
Closed

libQt5Core.so.5: cannot open shared object file #375

RobertBaruch opened this issue Dec 31, 2019 · 4 comments

Comments

@RobertBaruch
Copy link

RobertBaruch commented Dec 31, 2019

I've cloned and built nextpnr just now (cmake -DARCH=ice40 .) , and I'm running into the dreaded libQt5Core.so.5 not found. I have already installed qt-default:

lrwxrwxrwx 1 root root      20 Oct 30 04:47 /usr/lib/x86_64-linux-gnu/libQt5Core.so -> libQt5Core.so.5.11.3             
lrwxrwxrwx 1 root root      20 Oct 30 04:47 /usr/lib/x86_64-linux-gnu/libQt5Core.so.5 -> libQt5Core.so.5.11.3           
lrwxrwxrwx 1 root root      20 Oct 30 04:47 /usr/lib/x86_64-linux-gnu/libQt5Core.so.5.11 -> libQt5Core.so.5.11.3        
-rw-r--r-- 1 root root 5200168 Oct 30 04:47 /usr/lib/x86_64-linux-gnu/libQt5Core.so.5.11.3

ldd on nextpnr-ice40 indeed shows things like:

libQt5Gui.so.5 => /usr/lib/x86_64-linux-gnu/libQt5Gui.so.5 (0x00007ffbe7090000)
libicuuc.so.63 => /usr/lib/x86_64-linux-gnu/libicuuc.so.63 (0x00007f4bfa340000)
libQt5Core.so.5 => not found

And that's pretty weird, that it's found the other Qt libs, but not core.

I am not using Anaconda, so I'm pretty sure #292 is not applicable.

$ grep -i Qt CMakeCache.txt

//The directory containing a CMake configuration file for Qt5Core.
Qt5Core_DIR:PATH=/usr/lib/x86_64-linux-gnu/cmake/Qt5Core
//The directory containing a CMake configuration file for Qt5Gui.
Qt5Gui_DIR:PATH=/usr/lib/x86_64-linux-gnu/cmake/Qt5Gui
//The directory containing a CMake configuration file for Qt5OpenGL.
Qt5OpenGL_DIR:PATH=/usr/lib/x86_64-linux-gnu/cmake/Qt5OpenGL
//The directory containing a CMake configuration file for Qt5Widgets.
Qt5Widgets_DIR:PATH=/usr/lib/x86_64-linux-gnu/cmake/Qt5Widgets
//The directory containing a CMake configuration file for Qt5.
Qt5_DIR:PATH=/usr/lib/x86_64-linux-gnu/cmake/Qt5
QtPropertyBrowser_BINARY_DIR:STATIC=/home/robertbaruch/repos/nextpnr/generated/3rdparty/QtPropertyBrowser
QtPropertyBrowser_LIB_DEPENDS:STATIC=general;Qt5::Widgets;
QtPropertyBrowser_SOURCE_DIR:STATIC=/home/robertbaruch/repos/nextpnr/3rdparty/QtPropertyBrowser
gui_ice40_LIB_DEPENDS:STATIC=general;Qt5::Widgets;

Any ideas?

@daveshah1
Copy link
Contributor

Just to check:

What is the full error when running nextpnr?
What is the full output of ldd -v nextpnr-ice40?
What distro is this?

@RobertBaruch
Copy link
Author

It seems to have been a Windows Subsystem for Linux issue, when using Debian. Apparently this is a known issue.

Also see the bug in the WSL repo.

Long story short, you need to strip out the ELF section called .note.ABI-tag from libQt5Core.so.5:

sudo strip --remove-section=.note.ABI-tag /usr/lib/x86_64-linux-gnu/libQt5Core.so.5

@yousefcodes
Copy link

This saved me!

@DeflateAwning
Copy link

Note that the strip command can be installed on Ubuntu/Debian with sudo apt install binutils

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants