Issue with LD_LIBRARY_PATH

Daniel Kasak d.j.kasak.dk at gmail.com
Tue Dec 4 03:49:16 UTC 2018


I have an app that needs some libraries that are linked against some
strange version of a lib ... it's a long story ... anyway the *official*
advice from the vendor is to create a symbolic link pointing to whatever
version of libcom_err I have, so:

lrwxrwxrwx 1 dkasak dkasak       39 Dec  4 14:07 libcom_err.so.3 ->
/usr/lib/x86_64-linux-gnu/libcom_err.so

I've currently packaged this symbolic link inside the drivers package for
the vendor, so it ends up in /app/opt/nz/lib64

Then I have:

---

#!/bin/bash
export LD_LIBRARY_PATH=/app/opt/nz/lib64
cd /app/gui
perl -I . main.pl

---

 ... which is my flatpak startup script.

This script works fine if I don't need that driver ( drivers are
dynamically loaded as needed ). If I do load it, I get errors about not
being able to open the lib that's linked to the strange version of
libcom_err. However if I run a debug session:

flatpak run -d --command=bash <app_name>

 ... and *then* run the startup script, loading that driver works fine, and
it's usable, etc.

I've also tried injecting the environment variable in others ways, eg
inside the app:

$ENV{LD_LIBRARY_PATH} = '/app/opt/nz/lib64';

 ... early in the perl app - way before the driver would be dynamically
loaded. Doesn't work here either.

What do I need to do to get my LD_LIBARARY_PATH changed?

Thanks.

Dan
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/flatpak/attachments/20181204/9fc480ef/attachment.html>


More information about the Flatpak mailing list