Discussion:
[clamav-users] error while loading shared libraries
Andreas Meyer
2018-04-15 11:43:14 UTC
Permalink
Hello!

Since the upgrade to version 0.100.0 of clamav I get
usr/local/sbin/clamd: error while loading shared libraries: libclammspack.so.0: cannot open shared object file: No such file or directory
after compiling and installing.

libclammspack is not available on my system. configure and make went through.

Is clamav now unusable from now on?

Kind regards

Andreas
--
PGP-Fingerprint: D392 5D21 0299 63D7 5BAE 4562 1E56 B2EA 81A2 59F1
Gary R. Schmidt
2018-04-15 12:27:33 UTC
Permalink
Post by Andreas Meyer
Hello!
Since the upgrade to version 0.100.0 of clamav I get
usr/local/sbin/clamd: error while loading shared libraries: libclammspack.so.0: cannot open shared object file: No such file or directory
after compiling and installing.
libclammspack is not available on my system. configure and make went through.
Is clamav now unusable from now on?
Immediate thought - did "make install" succeed?

More information, what configure options did you specify, and have you
checked every line of output from the make process? Sometimes things
don't cause the make to fail, but cab create files that don't do the
Right Thing(TM).

Cheers,
Gary B-)
_______________________________________________
clamav-users mailing list
clamav-***@lists.clamav.net
http://lists.clamav.net/cgi-bin/mailman/listinfo/clamav-users


Help us build a comprehensive ClamAV guide:
https://github.com/vrtadmin/clamav-faq

http://www.clamav.net/contact.html#ml
Andreas Meyer
2018-04-15 12:56:06 UTC
Permalink
Hello!
Post by Gary R. Schmidt
Post by Andreas Meyer
Hello!
Since the upgrade to version 0.100.0 of clamav I get
usr/local/sbin/clamd: error while loading shared libraries: libclammspack.so.0: cannot open shared object file: No such file or directory
after compiling and installing.
libclammspack is not available on my system. configure and make went through.
Is clamav now unusable from now on?
Immediate thought - did "make install" succeed?
yes, make install succeeded.
Post by Gary R. Schmidt
More information, what configure options did you specify, and have you
checked every line of output from the make process? Sometimes things
don't cause the make to fail, but cab create files that don't do the
Right Thing(TM).
I did not specify any configure options.

....
config.status: executing depfiles commands
config.status: executing libtool commands
configure: Summary of detected features follows
OS : linux-gnu
pthreads : yes (-lpthread)
configure: Summary of miscellaneous features
check : no (auto)
fanotify : yes
fdpassing : 1
IPv6 : yes
configure: Summary of optional tools
clamdtop : -lncurses (auto)
milter : yes (disabled)
clamsubmit : no (missing libjson-c-dev. Use the website to submit FPs/FNs.) (disabled)
configure: Summary of engine performance features
release mode: yes
llvm : no (disabled)
mempool : yes
configure: Summary of engine detection features
bzip2 : ok
zlib : /usr
unrar : yes
preclass : no (missing libjson-c-dev) (disabled)
pcre : /usr
libmspack : yes (Internal)
libxml2 : yes, from /usr
yara : yes
fts : yes (internal, libc's is not LFS compatible)


These are part of the make process:

Making install in libmspack-0.5alpha
make[3]: Entering directory '/home/andreas/clamav-0.100.0/libclamav/libmspack-0.5alpha'
make[4]: Entering directory '/home/andreas/clamav-0.100.0/libclamav/libmspack-0.5alpha'
/usr/bin/mkdir -p '/usr/local/lib64'
/bin/sh ./libtool --mode=install /usr/bin/install -c libclammspack.la '/usr/local/lib64'
libtool: install: /usr/bin/install -c .libs/libclammspack.so.0.1.0 /usr/local/lib64/libclammspack.so.0.1.0
libtool: install: (cd /usr/local/lib64 && { ln -s -f libclammspack.so.0.1.0 libclammspack.so.0 || { rm -f libclammspack.so.0 && ln -s libclammspack.so.0.1.0 libclammspack.so.0; }; })
libtool: install: (cd /usr/local/lib64 && { ln -s -f libclammspack.so.0.1.0 libclammspack.so || { rm -f libclammspack.so && ln -s libclammspack.so.0.1.0 libclammspack.so; }; })
libtool: install: /usr/bin/install -c .libs/libclammspack.lai /usr/local/lib64/libclammspack.la
libtool: install: /usr/bin/install -c .libs/libclammspack.a /usr/local/lib64/libclammspack.a
libtool: install: chmod 644 /usr/local/lib64/libclammspack.a
libtool: install: ranlib /usr/local/lib64/libclammspack.a
libtool: finish: PATH="/usr/local/bin:/usr/bin:/sbin:/usr/sbin:/bin:/usr/games:/sbin" ldconfig -n /usr/local/lib64
----------------------------------------------------------------------
Libraries have been installed in:
/usr/local/lib64

When I call freshclam I get:
./freshclam: error while loading shared libraries: libclammspack.so.0: cannot open shared object file: No such file or directory

Kind regards

Andreas
--
PGP-Fingerprint: D392 5D21 0299 63D7 5BAE 4562 1E56 B2EA 81A2 59F1
Gary R. Schmidt
2018-04-15 14:02:00 UTC
Permalink
Post by Andreas Meyer
Hello!
[SNIP}
Post by Andreas Meyer
I did not specify any configure options.
[SNIP]
Post by Andreas Meyer
/usr/local/lib64
./freshclam: error while loading shared libraries: libclammspack.so.0: cannot open shared object file: No such file or directory
Hmm, I just built it on an OpenSUSE system (I mainly use Solaris), and
had the same problem. Which is interesting as /etc/ld.so.conf contains
/usr/local/lib64, so it should find libclammspack.so.0 there.

Of course, specifying "LD_LIBRARY_PATH=/usr/local/lib64" fixes things,
but it shouldn't be needed...

I'm guessing that configure is doing something weird, like setting bogus
elements in libtool, and will leave it for those who know what they did,
and why, to look into this.

Cheers,
Gary B-)

_______________________________________________
clamav-users mailing list
clamav-***@lists.clamav.net
http://lists.clamav.net/cgi-bin/mailman/listinfo/clamav-users


Help us build a comprehensive ClamAV guide:
https://github.com/vrtadmin/clamav-faq

http://www.clamav.net/contact.html#ml
Gary R. Schmidt
2018-04-15 14:48:10 UTC
Permalink
Post by Gary R. Schmidt
Post by Andreas Meyer
Hello!
[SNIP}
Post by Andreas Meyer
I did not specify any configure options.
[SNIP]
Post by Andreas Meyer
    /usr/local/lib64
cannot open shared object file: No such file or directory
Hmm, I just built it on an OpenSUSE system (I mainly use Solaris), and
had the same problem.  Which is interesting as /etc/ld.so.conf contains
/usr/local/lib64, so it should find libclammspack.so.0 there.
and youd did call "ldconfig"?
No, the OpenSUSE system is basically as it came out of the box, and
given that /etc/ld.so.conf contains /usr/local/lib64 by default I am
surprised that ldconfig would be needed.
a common problem with running make outside a proper environment
producing packages where a proper spec-file either calls ldconfig
explicit or the environment does when libraries are installed in the
transaction
What do you mean by "a proper environment"?  To me that means a shell,
and an editor, and access to cc, ar, ld, and make, or equivalents.
ldconfig creates the necessary links and cache to the most
recent shared libraries found in the directories specified on the
command line, in the file /etc/ld.so.conf, and in the trusted
directories, /lib and /usr/lib (on some 64-bit architectures such as
x86-64, lib and /usr/lib are the trusted directories for 32-bit
libraries, while /lib64 and /usr/lib64 are used for 64-bit libraries).
Does this mean that it is no longer possible to produce and install
binaries on Linux systems with having to create spec files and generate
installation packages for them?

    Cheers,
        Gary    B-)
_______________________________________________
clamav-users mailing list
clamav-***@lists.clamav.net
http://lists.clamav.net/cgi-bin/mailman/listinfo/clamav-users


Help us build a comprehensive ClamAV guide:
https://github.com/vrtadmin/clamav-faq

http://www.clama
Micah Snyder (micasnyd)
2018-04-16 16:00:28 UTC
Permalink
Someone else has pointed out that the `make install` is placing libclammspack in usr/lib/ instead of /usr/lib64/ (they are using --prefix=/usr, instead of the default /usr/local).
https://bugzilla.clamav.net/show_bug.cgi?id=12093

Micah Snyder
ClamAV Development
Talos
Cisco Systems, Inc.


On Apr 15, 2018, at 10:48 AM, Gary R. Schmidt <***@acm.org<mailto:***@acm.org>> wrote:

On 16/04/2018 00:10, Reindl Harald wrote:
Am 15.04.2018 um 16:02 schrieb Gary R. Schmidt:
On 15/04/2018 22:56, Andreas Meyer wrote:
Hello!
[SNIP}
I did not specify any configure options.

[SNIP]

Libraries have been installed in:
/usr/local/lib64

When I call freshclam I get:
./freshclam: error while loading shared libraries: libclammspack.so.0:
cannot open shared object file: No such file or directory

Hmm, I just built it on an OpenSUSE system (I mainly use Solaris), and
had the same problem. Which is interesting as /etc/ld.so.conf contains
/usr/local/lib64, so it should find libclammspack.so.0 there.
and youd did call "ldconfig"?
No, the OpenSUSE system is basically as it came out of the box, and given that /etc/ld.so.conf contains /usr/local/lib64 by default I am surprised that ldconfig would be needed.

a common problem with running make outside a proper environment
producing packages where a proper spec-file either calls ldconfig
explicit or the environment does when libraries are installed in the
transaction
What do you mean by "a proper environment"? To me that means a shell, and an editor, and access to cc, ar, ld, and make, or equivalents.

ldconfig creates the necessary links and cache to the most
recent shared libraries found in the directories specified on the
command line, in the file /etc/ld.so.conf, and in the trusted
directories, /lib and /usr/lib (on some 64-bit architectures such as
x86-64, lib and /usr/lib are the trusted directories for 32-bit
libraries, while /lib64 and /usr/lib64 are used for 64-bit libraries).

Does this mean that it is no longer possible to produce and install binaries on Linux systems with having to create spec files and generate installation packages for them?

Cheers,
Gary B-)
_______________________________________________
clamav-users mailing list
clamav-***@lists.clamav.net<mailto:clamav-***@lists.clamav.net>
http://lists.clamav.net/cgi-bin/mailman/listinfo/clamav-users


Help us build a comprehensive ClamAV guide:
https://github.com/vrtadmin/clamav-faq

http://www.clamav.net/contact.html#ml

_______________________________________________
clamav-users mailing list
clamav-***@lists.clamav.net
http://lists.clamav.net/cgi-bin/mailman/listinfo/clamav-users


Help us build a comprehensive ClamAV guide:
https://github.com/vrtadmin/clamav-faq

http://www.clamav.net/contact.html#ml
Reindl Harald
2018-04-16 16:09:46 UTC
Permalink
Post by Micah Snyder (micasnyd)
Someone else has pointed out that the `make install` is placing libclammspack in usr/lib/ instead of /usr/lib64/ (they are using --prefix=/usr, instead of the default /usr/local).
https://bugzilla.clamav.net/show_bug.cgi?id=12093
and that is why you should learn to build packages because the "make
install" don't run as root, don't install diretcly below /usr and so you
can't overwrite system-libraries from other packages with incompatible
versions - as well as when soemthing breaks out the buildroot and tries
to touch files below /usr it get a permission denied
_______________________________________________
clamav-users mailing list
clamav-***@lists.clamav.net
http://lists.clamav.net/cgi-bin/mailman/listinfo/clamav-users


Help us build a comprehensive ClamAV guide:
https://github.com/vrtadmin/clamav-faq

http://www.clamav.net/contact.html#ml

Reindl Harald
2018-04-15 17:54:53 UTC
Permalink
Post by Gary R. Schmidt
Post by Gary R. Schmidt
Post by Andreas Meyer
Hello!
[SNIP}
Post by Andreas Meyer
I did not specify any configure options.
[SNIP]
Post by Andreas Meyer
     /usr/local/lib64
cannot open shared object file: No such file or directory
Hmm, I just built it on an OpenSUSE system (I mainly use Solaris), and
had the same problem.  Which is interesting as /etc/ld.so.conf contains
/usr/local/lib64, so it should find libclammspack.so.0 there.
and youd did call "ldconfig"?
No, the OpenSUSE system is basically as it came out of the box, and
given that /etc/ld.so.conf contains /usr/local/lib64 by default I am
surprised that ldconfig would be needed.
read what i posted at bottom
Post by Gary R. Schmidt
a common problem with running make outside a proper environment
producing packages where a proper spec-file either calls ldconfig
explicit or the environment does when libraries are installed in the
transaction
What do you mean by "a proper environment"?  To me that means a shell,
and an editor, and access to cc, ar, ld, and make, or equivalents.
i don't install anything which is not properly packaged
rpmbuild is no rocket science

that way your setups live years and deacades without reinstall because
you don't leave obsolete files laying around introducing funny things
over the years
Post by Gary R. Schmidt
ldconfig creates  the  necessary  links  and  cache  to  the  most
recent  shared  libraries  found  in  the  directories specified on the
command line, in the file /etc/ld.so.conf, and in the trusted
directories, /lib and /usr/lib (on some 64-bit architectures such as
x86-64, lib and /usr/lib  are  the  trusted  directories  for 32-bit
libraries, while /lib64 and /usr/lib64 are used for 64-bit libraries).
Does this mean that it is no longer possible to produce and install
binaries on Linux systems with having to create spec files and generate
installation packages for them?
WTF - "and cache to the most recent shared libraries"
why didn't you just type "ldconfig"

https://fedoraproject.org/wiki/Changes/Removing_ldconfig_scriptlets

_______________________________________________
clamav-users mailing list
clamav-***@lists.clamav.net
http://lists.clamav.net/cgi-bin/mailman/listinfo/clamav-users


Help us build a comprehensive ClamAV guide:
https://github.com/vrtadmin/clamav-faq

http://www.clamav.net/
Andreas Meyer
2018-04-15 15:24:59 UTC
Permalink
Post by Gary R. Schmidt
Post by Gary R. Schmidt
Hmm, I just built it on an OpenSUSE system (I mainly use Solaris), and
had the same problem.  Which is interesting as /etc/ld.so.conf contains
/usr/local/lib64, so it should find libclammspack.so.0 there.
and youd did call "ldconfig"?
No, the OpenSUSE system is basically as it came out of the box, and
given that /etc/ld.so.conf contains /usr/local/lib64 by default I am
surprised that ldconfig would be needed.
It contains both paths.
Post by Gary R. Schmidt
ldconfig creates the necessary links and cache to the most
recent shared libraries found in the directories specified on the
command line, in the file /etc/ld.so.conf, and in the trusted
directories, /lib and /usr/lib (on some 64-bit architectures such as
x86-64, lib and /usr/lib are the trusted directories for 32-bit
libraries, while /lib64 and /usr/lib64 are used for 64-bit libraries).
Does this mean that it is no longer possible to produce and install
binaries on Linux systems with having to create spec files and generate
installation packages for them?
Any chance to get the thing working again? I fear going back to 0.94
is not the best idea.

Kind regards

Andreas
--
PGP-Fingerprint: D392 5D21 0299 63D7 5BAE 4562 1E56 B2EA 81A2 59F1
Andreas Meyer
2018-04-15 15:45:24 UTC
Permalink
Post by Gary R. Schmidt
Post by Gary R. Schmidt
Hmm, I just built it on an OpenSUSE system (I mainly use Solaris), and
had the same problem.  Which is interesting as /etc/ld.so.conf contains
/usr/local/lib64, so it should find libclammspack.so.0 there.
and youd did call "ldconfig"?
No, the OpenSUSE system is basically as it came out of the box, and
given that /etc/ld.so.conf contains /usr/local/lib64 by default I am
surprised that ldconfig would be needed.
hmmm, after a ldconfig freshclam and clamd are running again.
strange...

Andreas
--
PGP-Fingerprint: D392 5D21 0299 63D7 5BAE 4562 1E56 B2EA 81A2 59F1
Telsin
2018-04-15 19:24:58 UTC
Permalink
My older slackware install also needed ldconfig run after a from source install. Without that, I experienced the same errors. I note that ldconfig is suggested in the source install instructions currently on the web site, but never had to do it before. Ah, changes :)
Subject: Re: [clamav-users] error while loading shared libraries
Date: April 15, 2018 at 10:45:24 AM CDT
Post by Gary R. Schmidt
Post by Gary R. Schmidt
Hmm, I just built it on an OpenSUSE system (I mainly use Solaris), and
had the same problem. Which is interesting as /etc/ld.so.conf contains
/usr/local/lib64, so it should find libclammspack.so.0 there.
and youd did call "ldconfig"?
No, the OpenSUSE system is basically as it came out of the box, and
given that /etc/ld.so.conf contains /usr/local/lib64 by default I am
surprised that ldconfig would be needed.
hmmm, after a ldconfig freshclam and clamd are running again.
strange...
Andreas
--
PGP-Fingerprint: D392 5D21 0299 63D7 5BAE 4562 1E56 B2EA 81A2 59F1
_______________________________________________
clamav-users mailing list
http://lists.clamav.net/cgi-bin/mailman/listinfo/clamav-users
https://github.com/vrtadmin/clamav-faq
http://www.clamav.net/contact.html#ml
_______________________________________________
clamav-users mailing list
clamav-***@lists.clamav.net
http://lists.clamav.net/cgi-bin/mailman/listinfo/clamav-users


Help us build a comprehensive ClamAV guide:
https://github.com/vrtadmin/clamav-faq

http://www.clamav.net/contact.html#ml
Reindl Harald
2018-04-15 17:56:49 UTC
Permalink
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256
Post by Andreas Meyer
Post by Gary R. Schmidt
Post by Gary R. Schmidt
Hmm, I just built it on an OpenSUSE system (I mainly use
Solaris), and had the same problem. Which is interesting as
/etc/ld.so.conf contains /usr/local/lib64, so it should find
libclammspack.so.0 there.
and youd did call "ldconfig"?
No, the OpenSUSE system is basically as it came out of the box,
and given that /etc/ld.so.conf contains /usr/local/lib64 by
default I am surprised that ldconfig would be needed.
hmmm, after a ldconfig freshclam and clamd are running again.
strange...
there is nothing strange

https://fedoraproject.org/wiki/Changes/Removing_ldconfig_scriptlets

Summary
For many years, package maintainers were required to write scriptlets
which call ldconfig in %post/%postun if they package shared libraries

if you don't call it within a apckage after install you are supposed
to do it manually, that's nothing new and everything which works
without is just by luck

the ldconfig cache did not know about the file which was new after
"make install"

-----BEGIN PGP SIGNATURE-----

iQGzBAEBCAAdFiEEnStGzbwUCjZ1OuTXMxdNWliSt7gFAlrTkmEACgkQMxdNWliS
t7jAlwwAudKFWwSxkFuN2BSDNYnqQopmPFpqESiC8RzHl32R8USD1FOCKNc3+Qc5
7MQFzkXZxTfbU8Ohqfh7iaN54/ffD1N+C0C04m/Js8F3lx8PXP8Z0mnCcZ6IElrG
RBs72zgP/YueGxtGHL7MXfwt/Pa0OmKPa0mltJ1PgZXQ+ZdPJAqFK9wax0YOa1pB
CBBQJY0QlPMZT6UbjZR09hsNvtJ4OgGhF1BkBCTpUCzAg8cXHV/5yf0cGVUJX3+z
ILB3y85DNA5gZ+Y+VbNPoF1831l+B9+s4+5zbSHP0t/E6hUeFPpS9Xwq09hr+SzP
GdxAeOSrMT8ES86+MqIwlrzQx91CarNU/aF1QGj7dyOU50g9smttKXqRJf7yXj48
Cib6G2RX1c1bCUTNBcyFSeIvSW6g5htvs3IBfIYRwTDxrUfhTgoLRklwPQPk8tOG
t3Zi2085MDGwcaqaXtwgrqQPLojH1vsvDJaunvWQxKlCeVihCrNLzcHQlpdjTZ2o
cHUxB/fy
=PpqW
-----END PGP SIGNATURE-----
_______________________________________________
clamav-users mailing list
clamav-***@lists.clamav.net
http://lists.clamav.net/cgi-bin/mailman/listinfo/clamav-users


Help us build a comprehensive ClamAV guide:
https://github.com/vrtadmin/clamav-faq

http://www.clamav.net/contact.html#ml
Loading...