-
Notifications
You must be signed in to change notification settings - Fork 139
Open
Description
When running make check after ./bootstrap and ./configure many tests fail to run on NixOS.
Example failure log excerpt:
FAIL: check-globals.sh
======================
../../test-driver: ./check-globals.sh: /bin/bash: bad interpreter: No such file or directory
FAIL check-globals.sh (exit status: 126)
This issue is caused by the scripts wrongly assuming that bash is at /bin/bash. This is not the case for all unix operating systems. The solution for that is to use /usr/bin/env bash instead of hardcoding the path, because the former finds the bash executable in user's PATH, wherever it may be.
Steps to reproduce on NixOS with flakes enabled:
git clone https://github.com/OpenDataPlane/odp.git && cd odpnix flake init- replace contents of
./flake.nixwith the following
{
description = "A very basic flake";
inputs = {
nixpkgs.url = "github:nixos/nixpkgs?ref=nixos-unstable";
};
outputs =
{ self, nixpkgs }:
let
system = "x86_64-linux";
pkgs = import nixpkgs {
inherit system;
};
in
{
devShells.${system} = {
default = pkgs.mkShell {
packages = with pkgs; [
libtool
automake
autoconf
asciidoctor
mscgen
cunit
graphviz
valgrind
libcli
pkg-config
libconfig
libpcap
openssl
doxygen
onnxruntime
binutils
gcc
];
NIX_ENFORCE_NO_NATIVE = 0;
};
};
};
}
- Enter nix shell using
nix develop, then
./bootstrap
./configure
make check
- You will get the said error
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels