Skip to main content
Topic: [BUG REPORT] syslog-ng: Missing dependency (Read 631 times) previous topic - next topic
0 Members and 2 Guests are viewing this topic.

[BUG REPORT] syslog-ng: Missing dependency

Hi all!

Seems like the syslog-ng package misses a dependency to pcre. On a fresh install, I installed syslog-ng (before any desktop environment or anything, right after rebooting), and it won't start due to the missing pcre lib:
Code: [Select]
# /etc/init.d/syslog-ng start
 * Checking your configfile (/etc/syslog-ng/syslog-ng.conf) ...
syslog-ng: error while loading shared libraries: libpcre.so.1: cannot open shared object file: No such file or directory
 * Configuration error. Please fix your configfile (/etc/syslog-ng/syslog-ng.conf)            [ !! ]
 * ERROR: syslog-ng failed to start
Installing pcre by hand makes it start. Anyway, I think this should be pulled as a dependency, shouldn't it?

Re: [BUG REPORT] syslog-ng: Missing dependency

Reply #1
Looks like you're right. It links to libpcre.so.1 It also links to libpcre.so.2. I have a feeling that one of syslog-ng's dependencies is missing one of those and those libraries get pulled in transiently while building. Would require some investigation.

Re: [BUG REPORT] syslog-ng: Missing dependency

Reply #2
I've had a play around with with this.

Building syslog-ng in a clean chroot generated with
Code: [Select]
mkchroot $CHROOT/root base-devel
results in a syslog-ng linked as follows
Quote
[Artix /]# ldd /usr/bin/syslog-ng
        linux-vdso.so.1 (0x00007ffcbdddf000)
        libsyslog-ng-3.38.so.0 => /usr/lib/libsyslog-ng-3.38.so.0 (0x00007ff486533000)
        libglib-2.0.so.0 => /usr/lib/libglib-2.0.so.0 (0x00007ff4863f4000)
        libc.so.6 => /usr/lib/libc.so.6 (0x00007ff48620d000)
        libm.so.6 => /usr/lib/libm.so.6 (0x00007ff486125000)
        libevtlog-3.38.so.0 => /usr/lib/libevtlog-3.38.so.0 (0x00007ff48611e000)
        libcap.so.2 => /usr/lib/libcap.so.2 (0x00007ff486112000)
        libpcre.so.1 => /usr/lib/libpcre.so.1 (0x00007ff486096000)
        libsecret-storage.so.0 => /usr/lib/libsecret-storage.so.0 (0x00007ff486090000)
        libgmodule-2.0.so.0 => /usr/lib/libgmodule-2.0.so.0 (0x00007ff486089000)
        libgthread-2.0.so.0 => /usr/lib/libgthread-2.0.so.0 (0x00007ff486084000)
        libssl.so.3 => /usr/lib/libssl.so.3 (0x00007ff485fe4000)
        libcrypto.so.3 => /usr/lib/libcrypto.so.3 (0x00007ff485a00000)
        /lib64/ld-linux-x86-64.so.2 => /usr/lib64/ld-linux-x86-64.so.2 (0x00007ff486638000)
        libpcre2-8.so.0 => /usr/lib/libpcre2-8.so.0 (0x00007ff485f47000)

Still in the chroot (everything in this post is)
Code: [Select]
[Artix /]# pacman -Qi pcre
Name            : pcre
Version         : 8.45-3
Description     : A library that implements Perl 5-style regular expressions
Architecture    : x86_64
URL             : https://www.pcre.org/
Licenses        : BSD
Groups          : None
Provides        : libpcre.so=1-64  libpcre16.so=0-64  libpcre32.so=0-64  libpcreposix.so=0-64  libpcrecpp.so=0-64
Depends On      : gcc-libs  readline  zlib  bzip2  bash
Optional Deps   : None
Required By     : net-snmp
Optional For    : None
Conflicts With  : None
Replaces        : None
Installed Size  : 3.49 MiB
Packager        : Artix Build Bot <[email protected]>
Build Date      : Fri Sep 23 14:34:10 2022
Install Date    : Tue Jan 3 19:10:41 2023
Install Reason  : Installed as a dependency for another package
Install Script  : No
Validated By    : Signature
Code: [Select]
[Artix /]# pacman -Qi pcre2
Name            : pcre2
Version         : 10.40-3
Description     : A library that implements Perl 5-style regular expressions. 2nd version
Architecture    : x86_64
URL             : https://www.pcre.org/
Licenses        : BSD
Groups          : None
Provides        : libpcre2-8.so=0-64  libpcre2-16.so=0-64  libpcre2-32.so=0-64  libpcre2-posix.so=3-64
Depends On      : gcc-libs  readline  zlib  bzip2  bash
Optional Deps   : None
Required By     : glib2  grep  less
Optional For    : None
Conflicts With  : None
Replaces        : None
Installed Size  : 6.16 MiB
Packager        : Artix Build Bot <[email protected]>
Build Date      : Fri Sep 23 14:35:45 2022
Install Date    : Tue Jan 3 19:03:59 2023
Install Reason  : Installed as a dependency for another package
Install Script  : No
Validated By    : Signature

Looking at pcre2's 'Required by' I think it's sure to be installed up the chain ?
But pcre is only required by net-snmp which is only 'makedepends' of syslog-ng.
So pcre will be present when built but not necessarily when syslog is later installed on a users machine. At least that's how it's looking to me.

I force removed both in turn and ran ./configure just to check. Both are hard dependencies of syslog-ng.
Quote
configure: error: Cannot find pcre version >= 6.1 it is a hard dependency from syslog-ng 3.6 onwards
Quote
grep: error while loading shared libraries: libpcre2-8.so.0: cannot open shared object file: No such file or directory
configure: error: cannot find required auxiliary files: compile missing

Arch maybe has something systemd related which requires pcre ? Otherwise I suspect this is a bug there as well ?

Re: [BUG REPORT] syslog-ng: Missing dependency

Reply #3
Yeah syslog-ng on Arch depends on systemd so I'm going to just assume somewhere there it pulls it in. Anyways, I've just added pcre to the depends.

 

Re: [BUG REPORT] syslog-ng: Missing dependency

Reply #4
Thanks a lot for fixing this this fast :-)