Commit 8144a3fa authored by Valentin Reis's avatar Valentin Reis
Browse files

Merge branch '26-build-chain-bug-pynrm-so-needs-lhsrts-ghc8-6-5' into 'master'

Resolve "Build chain bug: pynrm.so needs -lHSrts-ghc8.6.5"

Closes #26

See merge request !74
parents af47f85f 0e530434
Pipeline #12294 passed with stages
in 23 minutes and 15 seconds
......@@ -30,6 +30,7 @@ in { stages = [ "source", "build", "test", "deploy" ]
, nix/libnrm = mkNixB "libnrm"
, nix/stream = mkNixB "stream"
, tests/kvm = mkT "tests-kvm"
, tests/pyupstream = mkT "tests-pyupstream"
, tests/apps = mkT "app-tests"
, tests/rapl = mkT "tests-rapl" ⫽ { tags = [ "chimera" ] }
, tests/perf = mkT "tests-perf" ⫽ { tags = [ "chimera" ] }
......
......@@ -139,6 +139,12 @@ tests/perf:
stage: test
tags:
- chimera
tests/pyupstream:
script: "nix-shell -p gnumake --run 'make tests-pyupstream'"
stage: test
tags:
- nix
- kvm
tests/rapl:
script: "nix-shell -p gnumake --run 'make tests-rapl'"
stage: test
......
......@@ -48,7 +48,17 @@ app-tests:
'
tests-%:
@nix-shell --pure -p procps nrm haskellPackages.shelltestrunner --run '
@nix-shell --pure -E '
with (import <nixpkgs> {});
mkShell {
buildInputs = [
(pythonPackages.python.withPackages (ps: with ps; [pynrm]))
procps
nrm
haskellPackages.shelltestrunner
];
shellHook = "export PYNRMSO=$${haskellPackages.hsnrm-extra}/bin/pynrm.so";
} ' --run bash <<< '
shelltest -a --execdir -o50 tests/$*
'
......
......@@ -14,15 +14,16 @@ NIX_PATH := nixpkgs=./.
all: bin/nrm bin/nrm.so bin/pynrm.so
.PHONY: bin/nrm
bin/nrm.so bin/nrm: hsnrm-extra/hsnrm-extra.cabal hsnrm-static/hsnrm-static.cabal hsnrm-bin/hsnrm-bin.cabal hsnrm/hsnrm.cabal
bin/nrm.so bin/nrm: hsnrm-extra/hsnrm-extra.cabal hsnrm-static/hsnrm-static.cabal hsnrm-bin/hsnrm-bin.cabal hsnrm/hsnrm.cabal
@nix-shell --pure --run bash <<< '
cabal v2-install hsnrm-bin --installdir=./bin --overwrite-policy=always
'
.PHONY: bin/pynrm.so
bin/pynrm.so: hsnrm-extra/hsnrm-extra.cabal hsnrm-static/hsnrm-static.cabal hsnrm-bin/hsnrm-bin.cabal hsnrm/hsnrm.cabal
bin/pynrm.so: hsnrm-extra/hsnrm-extra.cabal hsnrm-static/hsnrm-static.cabal hsnrm-bin/hsnrm-bin.cabal hsnrm/hsnrm.cabal
ln -s $$GHCRTSPATH hsnrm-extra/lHSrts
@nix-shell --pure --run bash <<< '
cabal v2-install hsnrm-extra --installdir=./bin --overwrite-policy=always
cabal v2-install hsnrm-extra:pynrm.so --installdir=./bin --overwrite-policy=always
'
.PHONY: ghcid
......@@ -91,6 +92,7 @@ hlint:
.PHONY:clean
clean:
rm -f hsnrm-extra/lHSrts/
rm -rf dist-newstyle
rm -f hsnrm.cabal
rm -f hsnrm.nix
......
......@@ -39,7 +39,8 @@ executable pynrm.so
-Wmissing-local-signatures -Wmissing-exported-signatures
-Wmissing-export-lists -Wmissing-home-modules -Widentities
-Wredundant-constraints -Wpartial-fields -Wmissed-specialisations
-Wall-missed-specialisations -fPIC -shared -no-hs-main -dynamic
-Wall-missed-specialisations -fPIC -shared -no-hs-main -dynamic -lHSrts-ghc8.6.5
extra-lib-dirs: ./lHSrts
build-depends:
hsnrm -any,
base -any,
......
......@@ -17,5 +17,6 @@ haskellPackages.shellFor {
shellHook = ''
export LOCALE_ARCHIVE=${glibcLocales}/lib/locale/locale-archive
export LANG=en_US.UTF-8
export GHCRTSPATH="${haskellPackages.ghc}/lib/ghc-$(ghc --numeric-version)/rts/"
'';
}
......@@ -128,6 +128,7 @@ pkgs // rec {
paths = [
haskellPackages.hsnrm
haskellPackages.hsnrm-bin
haskellPackages.hsnrm-extra
pynrm
pkgs.linuxPackages.perf
pkgs.hwloc
......
......@@ -107,7 +107,7 @@ in mkShell {
export NRMSO=${pwd}/hsnrm/bin/nrm.so
export PATH=:${pwd}/pynrm/bin:${pwd}/hsnrm/bin:$PATH
export PYTHONPATH=${pwd}/pynrm/:$PYTHONPATH
export NIX_GHC="${haskellPackages.hsnrm.env.NIX_GHC}"
export GHCRTSPATH="${haskellPackages.ghc}/lib/ghc-$(ghc --numeric-version)/rts/"
export NIX_GHCPKG="${haskellPackages.hsnrm.env.NIX_GHCPKG}"
export NIX_GHC_DOCDIR="${haskellPackages.hsnrm.env.NIX_GHC_DOCDIR}"
export NIX_GHC_LIBDIR="${haskellPackages.hsnrm.env.NIX_GHC_LIBDIR}"
......
#!/usr/bin/env python
import nrm.tooling as nrm
with nrm.nrmd('') as d:
print("success")
$ ./spawn.py
> /success/
>= 0
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment