summaryrefslogtreecommitdiffstats
path: root/meta-oe/recipes-support/pcp/pcp/0001-pcp-htop-fix-header-build-race-condition.patch
blob: 2c3cf696edd0c50e9ca769aa89c9c29635e56179 (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
From d04ea418c5fcfec2f6fbb2dd9f982ddf12c5be87 Mon Sep 17 00:00:00 2001
From: Yoann Congal <yoann.congal@smile.fr>
Date: Tue, 3 Jun 2025 10:02:58 +0200
Subject: [PATCH] pcp-htop: fix header build race condition

.c and .h files are soft-linked before being compiled. Under heavy load
or a build with a high CPU count, the compilation can start before
header files are softlinked, resulting in a build error:
| pcp-htop.c:13:10: fatal error: CommandLine.h: No such file or directory
|    13 | #include "CommandLine.h"
|       |          ^~~~~~~~~~~~~~~

Fix this by adding the make dependency between object files and the
headers.

Upstream-Status: Backport [https://github.com/performancecopilot/pcp/commit/0ca303467ce382127cd9676e288bf7690a93f084]
Signed-off-by: Yoann Congal <yoann.congal@smile.fr>
---
 src/pcp/htop/GNUmakefile | 1 +
 1 file changed, 1 insertion(+)

diff --git a/src/pcp/htop/GNUmakefile b/src/pcp/htop/GNUmakefile
index 3e29638d6..898f0b766 100644
--- a/src/pcp/htop/GNUmakefile
+++ b/src/pcp/htop/GNUmakefile
@@ -224,6 +224,7 @@ default:	build-me
 include $(BUILDRULES)
 
 ifeq "$(HAVE_NCURSESW)" "true"
+$(OBJECTS): $(HFILES)
 build-me: $(TOPXFILES) $(SUBXFILES) $(CFGXFILES) $(CMDTARGET) $(DISTLINKS) $(MAN_PAGES)
 
 install: default