-
Notifications
You must be signed in to change notification settings - Fork 210
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
Unable to load shared library (libcheck.so.0). #155
Comments
It might be that by default libcheck is being installed to /usr/local/lib
instead of /usr/lib when built from source. Is your project also trying to
find the library in /usr/local/lib ? Or, can you install Check into
/usr/lib ?
- Branden
…On Wed, Apr 25, 2018 at 4:03 AM, Quytelda Kahja ***@***.***> wrote:
I've installed check 0.12.0 from git on Debian Testing. I used the
following commands:
$ git clone https://github.com/libcheck/check.git && cd check && git checkout 0.12.0
$ autoreconf --install
$ make
$ make check
$ sudo make install
However, when I try to run the unit tests in my project I get the
following output:
$ make check
make -C test
make[1]: Entering directory '/home/myhome/myproject/test'
make[1]: Nothing to be done for 'all'.
make[1]: Leaving directory '/home/myhome/myproject/test'
make -C test check
make[1]: Entering directory '/home/myhome/myproject/test'
./linklist: error while loading shared libraries: libcheck.so.0: cannot open shared object file: No such file or directory
Makefile:18: recipe for target 'check' failed
make[1]: *** [check] Error 127
make[1]: Leaving directory '/home/myhome/myproject/test'
Makefile:35: recipe for target 'check' failed
make: *** [check] Error 2
When I run make check in this repository on Arch Linux (where I installed
the package via pacman), the unit tests all run successfully. I also tried
installing from the prepackaged tarball release, but I got the same result.
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#155>, or mute the thread
<https://github.com/notifications/unsubscribe-auth/AFBUl38uIWNg24ikcvwK84tyiwE5Zrgqks5tsC3ogaJpZM4Ti9Jz>
.
|
I successfully ran the following:
Perfect; now the unit tests work in my project. However, it is worth noting that
This may be a bug; I'm not sure. Either way, it feels like installing to My system doesn't have any unusual build configuration or anything; it's just a vanilla Debian VM I spun up to do testing in. The details of the system are as follows:
|
I think the installcheck issue is a bug; I've not tried that target myself and I do not think it is part of the automated tests. As it is failing in checkmk I suspect it never worked. The automake documentation says it is typically not used. Probably it should be a no-op instead of fail, though. As for installing to /usr/local instead of /usr, I think this is expected behavior and is common among the various configure scripts I've interacted with. Here is a discussion about it. |
I see; well, hopefully this issue will help out anyone trying to install from source on a similar systems. I don't think the problem was that GCC didn't check |
I had a similar issue with Ubuntu 16.04, with check 0.12.0 compiled from source code. Creating sym link solved the issue for me for now:
|
I found the solution for my case: Running Below command didn't produce any output before I ran $ ldconfig -p | grep libcheck
libcheck.so.0 (libc6,x86-64) => /usr/local/lib/libcheck.so.0
libcheck.so (libc6,x86-64) => /usr/local/lib/libcheck.so Also I made sure |
I think it's kind of surprising that libtool doesn't handle that automatically, but evidently it is normal. See: https://lists.gnu.org/archive/html/libtool/2014-05/msg00021.html That said, I do think it would be helpful and worthwhile to add a reminder to update the library cache somewhere during the install or maybe even in the docs/README; it seems some other libraries do that, and it would clear up confusion for those who don't install from tarballs very often - pre-built packages tend to handle this type of stuff automatically. |
May you propose an addition to README.md which may be helpful fo other users? Maybe something at the end of the autoconf section. If you can create a pull request (editing the file on GitHub should take care of that) I can merge it in. If not, you can mention what verbiage would be helpful here. |
I've merged in your README changes. Thanks |
I've installed check 0.12.0 from git on Debian Testing. I used the following commands:
However, when I try to run the unit tests in my project I get the following output:
When I run
make check
in this repository on Arch Linux (where I installed the packagecheck
via pacman), the unit tests all run successfully. I also tried installing from the prepackaged tarball release, but I got the same result.I also ran
make installcheck
, which fails:The text was updated successfully, but these errors were encountered: