Hi I have a shell and trying to build a bazel project with buildFHSEnv, but I’m missing /lib/ld-linux.so.2
, I do have /lib/ld-linux-x86-64.so.2
in my environment though, I’m not sure what packages should actually provide the ld-linux.so.2 since
I already have the x86 one. The issue seems to related to WINE failing to find the ld-linux.so2
Here is the nix shell
{
description = "dev shell";
inputs = {
nixpkgs.url = "github:nixos/nixpkgs/nixpkgs-unstable";
};
outputs =
{
self,
nixpkgs,
flake-utils,
...
}:
flake-utils.lib.eachDefaultSystem (
system:
let
pkgs = import nixpkgs {
inherit system;
# Zerotierone
config.allowUnfree = true;
};
in
{
devShells.default =
(pkgs.buildFHSEnv {
name = "fhs-shell";
targetPkgs =
pkgs:
(with pkgs; [
# Tools
gcc_multi
git
git-lfs
ffmpeg
jq
nfs-utils
nodePackages.npm
pkg-config
postgresql
python3
tree
unzip
zstd
zsh
# Embedded
openocd
# Aws
awscli2
# Bazel
bazel_7
# Includes buildifier, buildozer, and unused_deps
bazel-buildtools
# Libs
libxml2.dev
libz.dev
libpqxx
glibc_multi
gmp
alsa-lib.dev
jack2.dev
curl.dev
xorg.libXcursor.dev
libGL.dev
libsndfile
portaudio
]);
runScript = "zsh";
}).env;
}
);
}
And the bazel error if relevant
ERROR: /home/xgroleau/Documents/bazel-project/bazel-project/fw/projects/neptune/8300/apps/mars/BUILD:47:22: Executing genrule //bazel-project/fw/projects/neptune/8300/apps/mars:mars_hear_hct failed: (Exit 1): bash failed: error
executing Genrule command (from target //bazel-project/fw/projects/neptune/8300/apps/mars:mars_hear_hct)
(cd /home/xgroleau/.cache/bazel/_bazel_xgroleau/a5abfee8284e02e2b768fe3ae970db28/execroot/_main && \
exec env - \
PATH=/bin:/usr/bin:/usr/local/bin:/opt/homebrew/bin \
/nix/store/832dnfv9ffw5744ncjfcn7z9y85450sn-bash/bin/bash -c 'source external/bazel_tools/tools/genrule/genrule-setup.sh; DIR=$PWD SDK=$PWD/external/neptune_8300_sdk SRC=$PWD/bazel-project/fw/projects/neptune/8300/app
s/mars/hear/microcode.hct OBJ=$PWD/bazel-out/k8-opt-ST-50e0e0b4fc5c/bin/bazel-project/fw/projects/neptune/8300/apps/mars/microcode.tmp.o EXE=$PWD/external/neptune_8300_sdk/bin/hct.exe WINE=$PWD/external/wine-crossover-l
inux/bin/wine64 && cd /tmp && WINEDEBUG=-all WINEPATH=$SDK/bin $WINE $EXE -bsk5c101c --toolchain=gnu -s -L$SDK/lib/cfx -I$SDK/include/cfx -I$DIR -I$DIR/bazel-project/fw/projects/neptune/8300/apps/mars -lhearlib.hcl $SR
C -o $DIR/bazel-out/k8-opt-ST-50e0e0b4fc5c/bin/bazel-project/fw/projects/neptune/8300/apps/mars/microcode.tmp.o -i $DIR/bazel-out/k8-opt-ST-50e0e0b4fc5c/bin/bazel-project/fw/projects/neptune/8300/apps/mars/microcode.tmp.h 2
>&1 | awk "!/preloader|wineserver|FreeType|freetype|or equal to 2.0.5/" >&2')
# Configuration: 8767de74956ae8aa967ddfe1073385dbb6131a0222fdbfdf32e0bb3db092b264
# Execution platform: @@local_config_platform//:host
/lib/ld-linux.so.2: could not open
Application could not be started, or no application associated with the specified file.
ShellExecuteEx failed: Internal error