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

libddcutil.so.2 not found #19

Open
gsedej opened this issue Mar 5, 2020 · 2 comments
Open

libddcutil.so.2 not found #19

gsedej opened this issue Mar 5, 2020 · 2 comments
Labels

Comments

@gsedej
Copy link

gsedej commented Mar 5, 2020

Hello,

the ddcui from github worked for me few weeks ago, but i updated from git, recompiled and get error

./ddcui 
./ddcui: error while loading shared libraries: libddcutil.so.2: cannot open shared object file: No such file or directory

the ddcutil is also recent from github

the ddcutil is in system via sudo make install

locate libddcutil.so.2
/home/gasper/git/ddcutil/src/.libs/libddcutil.so.2
/home/gasper/git/ddcutil/src/.libs/libddcutil.so.2.0.0
/usr/local/lib/libddcutil.so.2
/usr/local/lib/libddcutil.so.2.0.0

qmake also looks fine (or does it?)

qmake
Project MESSAGE: not setting APPLY_CANCEL_FLAG
Project MESSAGE: PKG_OK: TRUE
Project MESSAGE: GLIB_LIBS        = -lglib-2.0
Project MESSAGE: PKGCONFIG_LIBS   = -L/usr/local/lib -lddcutil
Project MESSAGE: PKGCONFIG_CFLAGS = -I/usr/local/include
Project MESSAGE: GLIB_CFLAGS      = /usr/include/glib-2.0 /usr/lib/x86_64-linux-gnu/glib-2.0/include
Project MESSAGE: CONFIG           = lex yacc debug exceptions depend_includepath testcase_targets import_plugins import_qpa_plugin file_copies qmake_use qt warn_on release link_prl incremental shared release linux unix posix gcc c++11 no_lflags_merge link_pkgconfig
Project MESSAGE: PKGCONFIG        =
Project MESSAGE: LIBS             = -lglib-2.0 -L/usr/local/lib -lddcutil
Project MESSAGE: INCLUDEPATH      = src -I/usr/local/include /usr/include/glib-2.0 /usr/lib/x86_64-linux-gnu/glib-2.0/include
Project MESSAGE: INCLUDE          =

but it does not get linked

ldd ./ddcui | grep "not found"
	libddcutil.so.2 => not found

using Ubuntu 18.04

EDIT:
when building with cmake, the local binary works, but not the installed one

sudo make install -j 12
[  1%] Automatic MOC, UIC and RCC for target ddcui
[  1%] Built target ddcui_autogen
[100%] Built target ddcui
Install the project...
-- Install configuration: ""
-- Installing: /usr/local/bin/ddcui
-- Set runtime path of "/usr/local/bin/ddcui" to ""

installed does copy to user/local/bin

ldd ddcui | grep ddcutil
	libddcutil.so.2 => /usr/local/lib/libddcutil.so.2 (0x00007f5d7698e000)
ldd /usr/local/bin/ddcui | grep ddcutil
	libddcutil.so.2 => not found

but ldd is wrong

works for now by manually copying binnary
sudo cp ddcui /usr/local/bin/ddcui

@rockowitz
Copy link
Owner

rockowitz commented Mar 5, 2020 via email

@gsedej
Copy link
Author

gsedej commented Mar 5, 2020

Firstly thank you for reply and extensive explanation.

Yes the link was broken, but I think that I was using actually git version of ddcutil few weeks ago, since apt package was not installed. but i might be wrong, was trying many things...

The ˙sudo ldconfig˙ solved the issue.

It works for both qmake and cmake.

Maybe ldcofig could be mention in installation page.

also qmake does not generate "install" option, while cmake does. This is expected.
Also would it be possible to use ddcui/ddcutil without sudo?

.

the answers (before ldconfig!):

$ ldconfig -p | grep ddc
	libddcutil.so.1 (libc6,x86-64) => /usr/local/lib/libddcutil.so.1
	libddcutil.so (libc6,x86-64) => /usr/local/lib/libddcutil.so

so it looks like libddcutil.so.2 is missing but it actually is here: /usr/local/lib/libddcutil.so.2

$ cat /etc/ld.so.conf
include /etc/ld.so.conf.d/*.conf

$ cat /etc/ld.so.conf.d/libc.conf | grep local
/usr/local/lib

so the local is in the libc.conf

i don't remember seeing any error in neither qmake nor cmake

.
EDIT:
"Shared Library Configuration" link is still broken here:
https://github.com/rockowitz/ddcui/blob/master/BUILDING.md

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

No branches or pull requests

2 participants