Skip to content
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

libstdc++.so.6 => not found #2366

Open
spockfish opened this issue Oct 18, 2024 · 2 comments
Open

libstdc++.so.6 => not found #2366

spockfish opened this issue Oct 18, 2024 · 2 comments
Labels
bug Something isn't working triage Issue needs triage

Comments

@spockfish
Copy link

What happened?

A binary won't run because it can't find libstdc++.so.6.

The FAQ mentions this issue and suggests to run devbox add stdenv.cc.cc.lib
But that fails: it can't find that package.

Steps to reproduce

  1. build ccache
  2. try to run ccache
  3. ldd ccache will show the message.

Command

No response

devbox.json

{
  "$schema": "https://raw.githubusercontent.com/jetify-com/devbox/0.13.0/.schema/devbox.schema.json",
  "packages": [
    "perl@latest",
    "libxcrypt@latest",
    "flex@latest",
    "expat@latest",
    "xxd@latest",
    "rustup@latest",
    "gh@latest",
    "fakeroot@latest",
    "patch@latest",
    "cmake@latest",
    "ncurses5@latest",
    "glibc@latest",
    "stdenv@latest",
    "gcc@latest",
  ],
  "env": {},
  "shell": {
    "init_hook": [
      "echo 'Welcome to devbox!' > /dev/null",
      "export NIX_CFLAGS_COMPILE=\"$NIX_CFLAGS_COMPILE -Wno-error=format-security\"", // disable hardening (which does not work for BR)
    ],
    "scripts": {
      "test": [
        "echo \"Error: no test specified\" && exit 1",
      ],
    },
  },
}

Devbox version

0.13.5

Nix version

nix (Nix) 2.24.7

What system does this bug occur on?

Linux (x86-64)

Debug logs

No response

@spockfish spockfish added bug Something isn't working triage Issue needs triage labels Oct 18, 2024
@DerArkeN
Copy link
Contributor

try adding stdenv_32bit

@Bee-Mar
Copy link

Bee-Mar commented Nov 1, 2024

I've encountered this in the past and my resolution was to add 'gccXXStdEnv.cc.cc.lib' as a "package". 'XX' is the gcc version you're using (ie. gcc13StdEnv.cc.cc.lib). Additionally, I augmented the "env" to contain

"LD_LIBRARY_PATH": "$DEVBOX_PROJECT_ROOT/.devbox/nix/profile/default/lib"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working triage Issue needs triage
Development

No branches or pull requests

3 participants