mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-05-02 12:17:04 +00:00
lttng-modules: fix on kernel 3.2, 3.16, 3.17
This commit is contained in:
parent
a1217e5b1a
commit
9db2312a50
2 changed files with 9 additions and 40 deletions
|
@ -1,16 +1,18 @@
|
||||||
{ stdenv, fetchurl, kernel }:
|
{ stdenv, fetchgit, kernel }:
|
||||||
|
|
||||||
|
assert stdenv.lib.versionAtLeast kernel.version "3.4"; # fails on 3.2
|
||||||
|
|
||||||
stdenv.mkDerivation rec {
|
stdenv.mkDerivation rec {
|
||||||
pname = "lttng-modules-2.5.0";
|
pname = "lttng-modules-${rev}";
|
||||||
name = "${pname}-${kernel.version}";
|
name = "${pname}-${kernel.version}";
|
||||||
|
rev = "bf2ba318fff";
|
||||||
|
|
||||||
src = fetchurl {
|
src = fetchgit {
|
||||||
url = "https://lttng.org/files/lttng-modules/${pname}.tar.bz2";
|
url = "https://github.com/lttng/lttng-modules.git";
|
||||||
sha256 = "0ayqi974ibaybzm46nb2ij1avqm1gspd4mnkpfc4ajl34j02dyix";
|
sha256 = "0x70xp463g208rdz5b9b0wdwr2v8px1bwa589knvp4j7zi8d2gj9";
|
||||||
|
inherit rev;
|
||||||
};
|
};
|
||||||
|
|
||||||
patches = [ ./lttng-fix-build-error-on-linux-3.2.patch ];
|
|
||||||
|
|
||||||
preConfigure = ''
|
preConfigure = ''
|
||||||
export KERNELDIR="${kernel.dev}/lib/modules/${kernel.modDirVersion}/build"
|
export KERNELDIR="${kernel.dev}/lib/modules/${kernel.modDirVersion}/build"
|
||||||
export INSTALL_MOD_PATH="$out"
|
export INSTALL_MOD_PATH="$out"
|
||||||
|
|
|
@ -1,33 +0,0 @@
|
||||||
When building against linux 3.2, we get this build error:
|
|
||||||
|
|
||||||
building /tmp/nix-build-lttng-modules-2.2.0.drv-0/lttng-modules-2.2.0/probes/lttng-probe-ext3.o
|
|
||||||
CC [M] /tmp/nix-build-lttng-modules-2.2.0.drv-0/lttng-modules-2.2.0/probes/lttng-probe-ext3.o
|
|
||||||
In file included from /tmp/nix-build-lttng-modules-2.2.0.drv-0/lttng-modules-2.2.0/probes/../instrumentation/events/lttng-module/../../../probes/lttng-events.h:759:0,
|
|
||||||
from /tmp/nix-build-lttng-modules-2.2.0.drv-0/lttng-modules-2.2.0/probes/../instrumentation/events/lttng-module/../../../probes/define_trace.h:148,
|
|
||||||
from /tmp/nix-build-lttng-modules-2.2.0.drv-0/lttng-modules-2.2.0/probes/../instrumentation/events/lttng-module/ext3.h:868,
|
|
||||||
from /tmp/nix-build-lttng-modules-2.2.0.drv-0/lttng-modules-2.2.0/probes/lttng-probe-ext3.c:48:
|
|
||||||
/tmp/nix-build-lttng-modules-2.2.0.drv-0/lttng-modules-2.2.0/probes/../instrumentation/events/lttng-module/../../../probes/../instrumentation/events/lttng-module/ext3.h: In function '__event_probe__ext3__page_op':
|
|
||||||
/tmp/nix-build-lttng-modules-2.2.0.drv-0/lttng-modules-2.2.0/probes/../instrumentation/events/lttng-module/../../../probes/../instrumentation/events/lttng-module/ext3.h:240:1: error: dereferencing pointer to incomplete type
|
|
||||||
/tmp/nix-build-lttng-modules-2.2.0.drv-0/lttng-modules-2.2.0/probes/../instrumentation/events/lttng-module/../../../probes/../instrumentation/events/lttng-module/ext3.h:240:1: error: dereferencing pointer to incomplete type
|
|
||||||
/tmp/nix-build-lttng-modules-2.2.0.drv-0/lttng-modules-2.2.0/probes/../instrumentation/events/lttng-module/../../../probes/../instrumentation/events/lttng-module/ext3.h:240:1: error: dereferencing pointer to incomplete type
|
|
||||||
/tmp/nix-build-lttng-modules-2.2.0.drv-0/lttng-modules-2.2.0/probes/../instrumentation/events/lttng-module/../../../probes/../instrumentation/events/lttng-module/ext3.h: In function '__event_probe__ext3_invalidatepage':
|
|
||||||
/tmp/nix-build-lttng-modules-2.2.0.drv-0/lttng-modules-2.2.0/probes/../instrumentation/events/lttng-module/../../../probes/../instrumentation/events/lttng-module/ext3.h:298:1: error: dereferencing pointer to incomplete type
|
|
||||||
/tmp/nix-build-lttng-modules-2.2.0.drv-0/lttng-modules-2.2.0/probes/../instrumentation/events/lttng-module/../../../probes/../instrumentation/events/lttng-module/ext3.h:298:1: error: dereferencing pointer to incomplete type
|
|
||||||
/tmp/nix-build-lttng-modules-2.2.0.drv-0/lttng-modules-2.2.0/probes/../instrumentation/events/lttng-module/../../../probes/../instrumentation/events/lttng-module/ext3.h:298:1: error: dereferencing pointer to incomplete type
|
|
||||||
|
|
||||||
because a check for existing ext3/*h files in the kernel build tree is skipped
|
|
||||||
for linux < 3.4. Fix it by extending the ext3_dep_check thing to also be run
|
|
||||||
when building against linux >= 3.2 (not only linux >= 3.4).
|
|
||||||
|
|
||||||
diff -uNr lttng-modules-2.2.0.orig/probes/Makefile lttng-modules-2.2.0/probes/Makefile
|
|
||||||
--- lttng-modules-2.2.0.orig/probes/Makefile 2013-06-19 03:22:44.000000000 +0200
|
|
||||||
+++ lttng-modules-2.2.0/probes/Makefile 2013-07-06 13:22:15.902957717 +0200
|
|
||||||
@@ -59,7 +59,7 @@
|
|
||||||
ext3_dep_check = $(wildcard $(ext3_dep))
|
|
||||||
ext3 = $(shell \
|
|
||||||
if [ $(VERSION) -ge 3 -a $(PATCHLEVEL) -ge 1 ] ; then \
|
|
||||||
- if [ $(VERSION) -ge 3 -a $(PATCHLEVEL) -ge 4 -a \
|
|
||||||
+ if [ $(VERSION) -ge 3 -a $(PATCHLEVEL) -ge 2 -a \
|
|
||||||
-z "$(ext3_dep_check)" ] ; then \
|
|
||||||
echo "warn" ; \
|
|
||||||
exit ; \
|
|
Loading…
Add table
Reference in a new issue