Closed cbueche closed 3 years ago
ok I found a workaround by adding -R...
option in JSON_C_LIBS
:
export JSON_C_LIBS="-L/opt/libfastjson/lib64 -R/opt/libfastjson/lib64 -lfastjson"
and now I get what I want, lognorm using my libfastjson instead of SLES's one :
ldd /opt/lognorm/bin/lognormalizer
linux-vdso.so.1 (0x00007fff3a3ce000)
libfastjson.so.4 => /opt/libfastjson/lib64/libfastjson.so.4 (0x00007fa196b84000)
liblognorm.so.5 => /opt/lognorm/lib64/liblognorm.so.5 (0x00007fa19695e000)
libestr.so.0 => /usr/lib64/libestr.so.0 (0x00007fa19675a000)
libc.so.6 => /lib64/libc.so.6 (0x00007fa1963b5000)
libpcre.so.1 => /usr/lib64/libpcre.so.1 (0x00007fa196146000)
/lib64/ld-linux-x86-64.so.2 (0x00007fa196d8f000)
libpthread.so.0 => /lib64/libpthread.so.0 (0x00007fa195f29000)
On SUSE Linux Enterprise Server 12.5, I'm trying to compile rsyslogd to use a "modern" libfastjson, as the included one is problematic. So I compile the chain
libfastjson
, thenliblognorm
, and at the endrsyslogd
. I give these packages my own%{name}
and prefix (/opt/XXX) so they do not collide with the SLES ones. I do use the RPM packaging with *:spec files so I end up with installable packages.Unfortunately, while building
liblognorm
, and despite setting JSON_C_CFLAGS / JSON_C_LIBS :The configure/Make process still links with
/usr/lib64/libfastjson.so.4
. Interestingly, and for whatever reason, there is noliblognorm5-devel
in my repository sojson.h
is not available andJSON_C_CFLAGS
is used to find it, and it works... Only, I end up with my shared libs and binary to be linked against/usr/lib64/libfastjson.so.4
:Anyone has an idea ? I just can't get my head around the multiple Makefiles and why the order of the proposed lib is wrong.
Notes : I cannot remove the existing rsyslogd package and dependencies (used by system-admins). My own rsyslogd runs as distinct process and is used for network-only traffic sorting, filtering, etc.