Skip to content

ncurses is unusable in ld.so.cache (buildFHSUserEnv) #218534

@viric

Description

@viric

Describe the bug

When we want a FHS User Env we often want to be able to run commands without LD_LIBRARY_PATH. That requires ldconfig, like buildFHSUserEnvBubblewrap.
But ldconfig builds ld.so.cache only by looking at the declared soname in so objects.

Therefore, the tricks in the ncurses expression to save space (symlinks of postFixup) break this; therefore those ncurses libraries only work through LD_LIBRARY_PATH.

Also, the --with-termlib is required if we want libtinfo.so.5 without the symlink tricks.

Steps To Reproduce

Try to use ncurses in a buildFHSUserEnvBubblewrap without using LD_LIBRARY_PATH.

Expected behavior

The ncurses libs are found. That includes libtinfo.so.5 (requires the not provided --with-termlib in expression).

Additional context

I'm using a FHSUserEnv to build lineageos.

Notify maintainers

@edolstra @vcunat ?

Metadata

[user@system:~]$ nix-shell -p nix-info --run "nix-info -m"
 - system: `"x86_64-linux"`
 - host os: `Linux 5.15.91, NixOS, 22.11 (Raccoon), 22.11beta-297654.gfedcba`
 - multi-user?: `yes`
 - sandbox: `yes`
 - version: `nix-env (Nix) 2.11.1`
 - nixpkgs: `/nix/var/nix/profiles/per-user/root/channels/nixos`

Metadata

Metadata

Assignees

No one assigned

    Labels

    0.kind: bugSomething is broken2.status: stalehttps://github.com/NixOS/nixpkgs/blob/master/.github/STALE-BOT.md
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions