I've had a play around with with this.
Building syslog-ng in a clean chroot generated with mkchroot $CHROOT/root base-devel
results in a syslog-ng linked as follows
Still in the chroot (everything in this post is)
[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
[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.
Arch maybe has something systemd related which requires pcre ? Otherwise I suspect this is a bug there as well ?