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
LD_LIBRARY_PATH not taken into account #2456
Comments
Hmm, syslog-ng might be compiled in a mode where it does change
LD_LIBRARY_PATH, the PE version uses that, but unless you are using that,
you shouldn't be affected.
If that's not the case, LD_LIBRARY_PATH should be taken into account.
To troubleshoot you could always check /proc/<pid>/env like this:
```
$ cat /proc/<pid>/env | xargs -0 echo
```
And check if the environment variable is there.
…On Mon, Dec 10, 2018, 10:14 Wernfried ***@***.*** wrote:
I am referring to this topic: #2424
<#2424>
In order to use latest SQLite features I replaced file
/usr/lib64/libsqlite3.so.0.8.6 with latest compiled version of sqlite
source code. In general everything is working fine.
Problem is shared object /usr/lib64/libsqlite3.so.0.8.6 might be replaced
again by outdated version if the admin applies any standard Linux patches.
So I decided to move the latest shared object to private location
/opt/mediation/lib and change LD_LIBRARY_PATH accordingly. However,
syslog-ng does not use the new version, it seems to be hard-linked to
/usr/lib64/libsqlite3.so.0.8.6
***@***.*** ~]$ echo $LD_LIBRARY_PATH
/opt/mediation/lib:/opt/app/oracle/product/11.2.0/client_1/lib
***@***.*** ~]$ ls -l /opt/mediation/lib/libsqlite3*
lrwxrwxrwx. 1 mediation mediation 19 Dec 10 08:20 /opt/mediation/lib/libsqlite3.so -> libsqlite3.so.0.8.6
lrwxrwxrwx. 1 mediation mediation 19 Dec 10 08:20 /opt/mediation/lib/libsqlite3.so.0 -> libsqlite3.so.0.8.6
-rwxr-xr-x. 1 mediation mediation 959345 Dec 10 07:59 /opt/mediation/lib/libsqlite3.so.0.8.6
***@***.*** ~]$ lsof -p 27965 | grep libsqlite3*
syslog-ng 27965 mediation mem REG 253,0 753232 83909662 /usr/lib64/libsqlite3.so.0.8.6
I run also a Perl script which uses SQLite, This perl script uses correct
version /opt/mediation/lib/libsqlite3.so.0.8.6, so LD_LIBRARY_PATH is set
properly.
I can force the correct file with
LD_PRELOAD=/opt/mediation/lib/libsqlite3.so.0.8.6, however I wonder if
this behavior is intended by syslog-ng or whether it should work with
LD_LIBRARY_PATH only.
My impression is that LD_PRELOAD is more used for debugging and
developing but less suitable for production code (but I might be wrong)
Best Regards
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#2456>, or mute the thread
<https://github.com/notifications/unsubscribe-auth/AArldj9ys7yyCtJ4LQXJ81vpuOOhiVY1ks5u3iXTgaJpZM4ZK8OP>
.
|
Yes,
|
I would check whether /usr/lib64/dbd/libdbdsqlite3.so is force-linked to /usr/lib64/libsqlite3.so.0.8.6, for example:
Please reopen this issue if you think it's an issue with syslog-ng, or you have further questions. |
I am referring to this topic: #2424
In order to use latest SQLite features I replaced file /usr/lib64/libsqlite3.so.0.8.6 with latest compiled version of sqlite source code. In general everything is working fine.
Problem is shared object /usr/lib64/libsqlite3.so.0.8.6 might be replaced again by outdated version if the admin applies any standard Linux patches. So I decided to move the latest shared object to private location /opt/mediation/lib and change
LD_LIBRARY_PATH
accordingly. However, syslog-ng does not use the new version, it seems to be hard-linked to /usr/lib64/libsqlite3.so.0.8.6I run also a Perl script which uses SQLite, This perl script uses correct version
/opt/mediation/lib/libsqlite3.so.0.8.6
, soLD_LIBRARY_PATH
is set properly.I can force the correct file with
LD_PRELOAD=/opt/mediation/lib/libsqlite3.so
, however I wonder if this behavior is intended by syslog-ng or whether it should work withLD_LIBRARY_PATH
only.My impression is that
LD_PRELOAD
is more used for debugging and developing but less suitable for production code (but I might be wrong)Best Regards
The text was updated successfully, but these errors were encountered: