summaryrefslogtreecommitdiff
path: root/packaging/Fix-build-breakage-on-high-processsor-machines-12114.patch
blob: 47b7f7c86fc2f7decfb7c036be0eebef9b57a505 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
From f14cffc86b49cb803a6ed8e5a864f8c0c7b87f33 Mon Sep 17 00:00:00 2001
From: Omair Majid <omair.majid@gmail.com>
Date: Wed, 7 Jun 2017 00:19:48 -0400
Subject: [PATCH] Fix build breakage on high-processsor machines (#12114)

The build calls `make -j $NumProc`. This breaks on machines with a high
number of procesors (such as 25).

To reproduce this on any machine, edit build.sh and change

    buildTool install -j $NumProc

to

    buildTool install -j 100

The error trace looks like this:

    In file included from coreclr/bin/obj/Linux.x64.Debug/Generated/eventpipe/dotnetruntime.cpp:12:
    In file included from coreclr/src/vm/common.h:306:
    In file included from coreclr/src/vm/eepolicy.h:15:
    In file included from coreclr/src/vm/vars.hpp:70:
    In file included from coreclr/src/vm/eeprofinterfaces.h:19:
    In file included from coreclr/src/inc/profilepriv.h:128:
    In file included from coreclr/src/inc/profilepriv.inl:18:
    In file included from coreclr/src/vm/eetoprofinterfaceimpl.h:23:
    coreclr/src/inc/eventtracebase.h:306:10: fatal error: 'clretwallmain.h' file not found

It turns out that the eventpipe code has a dependency on
clretwallmain.h. src/CMakeLists.txt points out that clretwallmain.h is a
generated file. But there's no actual dependency between the eventpipe
target and the header file(s).

Fix that by fixing the generator script to insert an explicit dependency
between 'eventpipe' module and 'GeneratedEventingFiles' module.
---
 src/scripts/genEventPipe.py | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/src/scripts/genEventPipe.py b/src/scripts/genEventPipe.py
index a00511d..4c802ac 100644
--- a/src/scripts/genEventPipe.py
+++ b/src/scripts/genEventPipe.py
@@ -262,6 +262,8 @@ def generateEventPipeCmakeFile(etwmanifest, eventpipe_directory):
         topCmake.write('            "eventpipehelpers.cpp"\n')
         topCmake.write("""        )
 
+        add_dependencies(eventpipe GeneratedEventingFiles)
+
         # Install the static eventpipe library
         install(TARGETS eventpipe DESTINATION lib)
         """)
-- 
1.9.1