tangled
alpha
login
or
join now
pyrox.dev
/
nixpkgs
0
fork
atom
lol
0
fork
atom
overview
issues
pulls
pipelines
eztrace: 1.1-11 -> 2.1.1, fix build, adopt
Sergei Zimmerman
10 months ago
21fcca99
1e4c23f5
+85
-19
2 changed files
expand all
collapse all
unified
split
pkgs
by-name
ez
eztrace
0001-otf2-backend-cross.patch
package.nix
+27
pkgs/by-name/ez/eztrace/0001-otf2-backend-cross.patch
···
1
1
+
diff --git a/cmake_modules/FindOTF2.cmake b/cmake_modules/FindOTF2.cmake
2
2
+
index 2853f92a..af1f3225 100644
3
3
+
--- a/cmake_modules/FindOTF2.cmake
4
4
+
+++ b/cmake_modules/FindOTF2.cmake
5
5
+
@@ -15,11 +15,11 @@ IF(NOT OTF2_CONFIG OR NOT EXISTS ${OTF2_CONFIG})
6
6
+
ELSE()
7
7
+
message(STATUS "OTF2 installation found. (using ${OTF2_CONFIG})")
8
8
+
9
9
+
- execute_process(COMMAND ${OTF2_CONFIG} "--cppflags" OUTPUT_VARIABLE OTF2_INCLUDE_PATH)
10
10
+
+ execute_process(COMMAND ${OTF2_CONFIG} "--cppflags" "--target" "backend" OUTPUT_VARIABLE OTF2_INCLUDE_PATH)
11
11
+
STRING(REPLACE "\n" "" OTF2_INCLUDE_PATH ${OTF2_INCLUDE_PATH})
12
12
+
STRING(REPLACE "-I" "" OTF2_INCLUDE_PATH ${OTF2_INCLUDE_PATH})
13
13
+
14
14
+
- execute_process(COMMAND ${OTF2_CONFIG} "--ldflags" OUTPUT_VARIABLE _LINK_LD_ARGS)
15
15
+
+ execute_process(COMMAND ${OTF2_CONFIG} "--ldflags" "--target" "backend" OUTPUT_VARIABLE _LINK_LD_ARGS)
16
16
+
STRING( REPLACE " " ";" _LINK_LD_ARGS ${_LINK_LD_ARGS} )
17
17
+
FOREACH( _ARG ${_LINK_LD_ARGS} )
18
18
+
IF(${_ARG} MATCHES "^-L")
19
19
+
@@ -29,7 +29,7 @@ ELSE()
20
20
+
ENDIF(${_ARG} MATCHES "^-L")
21
21
+
ENDFOREACH(_ARG)
22
22
+
23
23
+
- execute_process(COMMAND ${OTF2_CONFIG} "--libs" OUTPUT_VARIABLE _LINK_LD_ARGS)
24
24
+
+ execute_process(COMMAND ${OTF2_CONFIG} "--libs" "--target" "backend" OUTPUT_VARIABLE _LINK_LD_ARGS)
25
25
+
STRING( REPLACE " " ";" _LINK_LD_ARGS ${_LINK_LD_ARGS} )
26
26
+
FOREACH( _ARG ${_LINK_LD_ARGS} )
27
27
+
IF(${_ARG} MATCHES "^-l")
+58
-19
pkgs/by-name/ez/eztrace/package.nix
···
2
2
lib,
3
3
stdenv,
4
4
fetchFromGitLab,
5
5
+
cmake,
5
6
gfortran,
6
7
libelf,
7
8
libiberty,
8
8
-
zlib,
9
9
-
# Once https://gitlab.com/eztrace/eztrace/-/issues/41
10
10
-
# is released we can switch to latest binutils.
11
11
-
libbfd_2_38,
12
12
-
libopcodes_2_38,
13
13
-
autoreconfHook,
9
9
+
libbfd,
10
10
+
libopcodes,
11
11
+
otf2,
14
12
}:
15
13
16
16
-
stdenv.mkDerivation rec {
17
17
-
pname = "EZTrace";
18
18
-
version = "1.1-11";
14
14
+
stdenv.mkDerivation (finalAttrs: {
15
15
+
pname = "eztrace";
16
16
+
version = "2.1.1";
17
17
+
18
18
+
outputs = [
19
19
+
"out"
20
20
+
"lib"
21
21
+
"man"
22
22
+
];
19
23
20
24
src = fetchFromGitLab {
21
25
owner = "eztrace";
22
26
repo = "eztrace";
23
23
-
rev = "eztrace-${version}";
24
24
-
hash = "sha256-A6HMr4ib5Ka1lTbbTQOdq3kIdCoN/CwAKRdXdv9wpfU=";
27
27
+
tag = "${finalAttrs.version}";
28
28
+
hash = "sha256-ccW4YjEf++tkdIJLze2x8B/SWbBBXnYt8UV9OH8+KGU=";
25
29
};
26
30
31
31
+
patches = [
32
32
+
./0001-otf2-backend-cross.patch # To fix cross.
33
33
+
];
34
34
+
35
35
+
postPatch = ''
36
36
+
substituteInPlace src/eztrace-lib/eztrace_otf2.c \
37
37
+
--replace-fail "/bin/rm" "rm"
38
38
+
substituteInPlace cmake_modules/FindOTF2.cmake \
39
39
+
--replace-fail "find_program(OTF2_CONFIG otf2-config REQUIRED)" \
40
40
+
"find_program(OTF2_CONFIG "${lib.getExe' otf2 "otf2-config"}" REQUIRED)" \
41
41
+
--replace-fail "find_program(OTF2_PRINT otf2-print REQUIRED)" \
42
42
+
"find_program(OTF2_PRINT "${lib.getExe' otf2 "otf2-print"}" REQUIRED)"
43
43
+
patchShebangs test
44
44
+
'';
45
45
+
46
46
+
strictDeps = true;
47
47
+
48
48
+
cmakeFlags = [
49
49
+
(lib.cmakeBool "EZTRACE_ENABLE_MEMORY" true)
50
50
+
# This test is somewhat flaky and fails once per several rebuilds.
51
51
+
(lib.cmakeFeature "CMAKE_CTEST_ARGUMENTS" "--exclude-regex;memory_tests")
52
52
+
];
53
53
+
27
54
nativeBuildInputs = [
55
55
+
cmake
28
56
gfortran
29
29
-
autoreconfHook
30
57
];
58
58
+
31
59
buildInputs = [
32
60
libelf
33
61
libiberty
34
34
-
zlib
35
35
-
libbfd_2_38
36
36
-
libopcodes_2_38
62
62
+
libbfd
63
63
+
libopcodes
64
64
+
otf2
37
65
];
38
66
39
39
-
meta = with lib; {
67
67
+
doCheck = true;
68
68
+
nativeCheckInputs = [
69
69
+
otf2 # `otf2-print` needed by compiler_instrumentation_tests,pthread_tests,posixio_tests
70
70
+
];
71
71
+
72
72
+
meta = {
40
73
description = "Tool that aims at generating automatically execution trace from HPC programs";
41
41
-
license = licenses.cecill-b;
42
42
-
maintainers = [ ];
74
74
+
license = lib.licenses.cecill-b;
75
75
+
maintainers = [ lib.maintainers.xokdvium ];
76
76
+
mainProgram = "eztrace";
77
77
+
badPlatforms = [
78
78
+
# Undefined symbols for architecture x86_64:
79
79
+
# > "___cyg_profile_func_enter", referenced from:
80
80
+
lib.systems.inspect.patterns.isDarwin
81
81
+
];
43
82
};
44
44
-
}
83
83
+
})