[GH-ISSUE #1938] fldd returns different output from ldd #1295

Open
opened 2026-05-05 07:48:50 -06:00 by gitea-mirror · 5 comments
Owner

Originally created by @chiraag-nataraj on GitHub (May 10, 2018).
Original GitHub issue: https://github.com/netblue30/firejail/issues/1938

So after using the script in #1920, I got Viber working well enough. Keen to reduce the horrendous list of libraries that is displayed everywhere (obscuring the name of the executable!), I tried using --private-lib= with just the libraries I manually added, assuming fldd would find the rest. Surprisingly, Viber failed to start, saying it couldn't find a specific library. After digging deeper, I realized it was because ldd was resolving the libraries stored in /opt/viber/lib, whereas fldd was not. The libraries in /opt/viber/lib depend on various sundry things which aren't picked up by fldd, leading to the error message.

Originally created by @chiraag-nataraj on GitHub (May 10, 2018). Original GitHub issue: https://github.com/netblue30/firejail/issues/1938 So after using the script in #1920, I got `Viber` working well enough. Keen to reduce the horrendous list of libraries that is displayed everywhere (obscuring the name of the executable!), I tried using `--private-lib=` with _just_ the libraries I manually added, assuming `fldd` would find the rest. Surprisingly, `Viber` failed to start, saying it couldn't find a specific library. After digging deeper, I realized it was because `ldd` was resolving the libraries stored in `/opt/viber/lib`, whereas `fldd` was not. The libraries in `/opt/viber/lib` depend on various sundry things which aren't picked up by `fldd`, leading to the error message.
gitea-mirror added the
bug
label 2026-05-05 07:48:50 -06:00
Author
Owner

@topimiettinen commented on GitHub (May 13, 2018):

fldd does not read /etc.ld.so.conf, which is where nonstandard paths like /opt/viber/lib can be specified. Of course fldd could be enhanced, but it could just use LD_TRACE_LOADED_OBJECTS=1 ld-linux.so $program like ldd does and parse the output.

<!-- gh-comment-id:388622807 --> @topimiettinen commented on GitHub (May 13, 2018): `fldd` does not read `/etc.ld.so.conf`, which is where nonstandard paths like `/opt/viber/lib` can be specified. Of course `fldd` could be enhanced, but it could just use `LD_TRACE_LOADED_OBJECTS=1 ld-linux.so $program` like `ldd` does and parse the output.
Author
Owner

@chiraag-nataraj commented on GitHub (May 13, 2018):

The interesting thing is that /opt/viber/lib isn't specified anywhere in /etc/ld.so.conf or /etc/ld.so.conf.d (that's the first thing I checked). But yes, I think we should use LD_TRACE_LOADED_OBJECTS=1 as ldd does.

<!-- gh-comment-id:388639088 --> @chiraag-nataraj commented on GitHub (May 13, 2018): The interesting thing is that `/opt/viber/lib` isn't specified anywhere in `/etc/ld.so.conf` or `/etc/ld.so.conf.d` (that's the first thing I checked). But yes, I think we should use `LD_TRACE_LOADED_OBJECTS=1` as `ldd` does.
Author
Owner

@chiraag-nataraj commented on GitHub (May 30, 2018):

@netblue30 Is there any reason we aren't just using ldd's method of setting the environment variable?

<!-- gh-comment-id:393323754 --> @chiraag-nataraj commented on GitHub (May 30, 2018): @netblue30 Is there any reason we aren't just using `ldd`'s method of setting the environment variable?
Author
Owner

@chiraag-nataraj commented on GitHub (Jul 9, 2018):

I don't trust myself enough to work on fldd, but I think we should switch to using the same method as ldd to enumerate the libraries needed.

<!-- gh-comment-id:403507112 --> @chiraag-nataraj commented on GitHub (Jul 9, 2018): I don't trust myself enough to work on `fldd`, but I think we should switch to using the same method as `ldd` to enumerate the libraries needed.
Author
Owner

@chiraag-nataraj commented on GitHub (May 21, 2019):

@netblue30, is this fixable? If not, I'll go ahead and close, since I've found a workaround which works.

<!-- gh-comment-id:494203811 --> @chiraag-nataraj commented on GitHub (May 21, 2019): @netblue30, is this fixable? If not, I'll go ahead and close, since I've found a workaround which works.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: github-starred/firejail#1295
No description provided.