diff options
author | Mingli Yu <mingli.yu@windriver.com> | 2020-09-09 05:55:40 +0000 |
---|---|---|
committer | Khem Raj <raj.khem@gmail.com> | 2020-09-10 01:18:11 -0700 |
commit | 5d763e17e7ca65fb8b2a88d45103518115995a7e (patch) | |
tree | 8678bb097ec382fdce45349d48068349d1c7420a | |
parent | 329049c7f2999285df164eb92e2df800a9c935cc (diff) | |
download | meta-clang-5d763e17e7ca65fb8b2a88d45103518115995a7e.tar.gz |
bcc: override the PY_CMD_ESCAPED
Override the PY_CMD_ESCAPED as the PY_CMD_ESCAPED is constructed by
the full path of the python3. In some cases, the path is so long and
result in the PY_CMD_ESCAPED exceeds 255 characters and comes below
do_configure error:
| CMake Error at src/python/CMakeLists.txt:18 (configure_file):
| configure_file Problem configuring file
|
| CMake Error: Could not open file for write in copy operation /buildarea1/test/wr_build/wr1020_20200909_bcc/bcc_long_Kernel/auto-standalone_next/200827/lxbuilds/Intel-Snow-Ridge-NS_platform_up/intel-x86-64-standard-glibc-std/wrlinux/build/tmp-glibc/work/corei7-64-wrs-linux/bcc/0.15.0-r0/build/src/python/bcc--buildarea1-test-wr_build-wr1020_20200909_bcc-bcc_long_Kernel-auto-standalone_next-200827-lxbuilds-Intel-Snow-Ridge-NS_platform_up-intel-x86-64-standard-glibc-std-wrlinux-build-tmp-glibc-work-corei7-64-wrs-linux-bcc-0.15.0-r0-recipe-sysroot-native-usr-bin-python3-native-python3/bcc/version.py.tmp
Signed-off-by: Mingli Yu <mingli.yu@windriver.com>
2 files changed, 47 insertions, 0 deletions
diff --git a/dynamic-layers/openembedded-layer/recipes-devtools/bcc/bcc/0001-CMakeLists.txt-override-the-PY_CMD_ESCAPED.patch b/dynamic-layers/openembedded-layer/recipes-devtools/bcc/bcc/0001-CMakeLists.txt-override-the-PY_CMD_ESCAPED.patch new file mode 100644 index 0000000..a08c109 --- /dev/null +++ b/dynamic-layers/openembedded-layer/recipes-devtools/bcc/bcc/0001-CMakeLists.txt-override-the-PY_CMD_ESCAPED.patch | |||
@@ -0,0 +1,46 @@ | |||
1 | From 4f64ed40e1ffea7ea278627f30a01018e57dcbcf Mon Sep 17 00:00:00 2001 | ||
2 | From: Mingli Yu <mingli.yu@windriver.com> | ||
3 | Date: Wed, 9 Sep 2020 05:48:19 +0000 | ||
4 | Subject: [PATCH] CMakeLists.txt: override the PY_CMD_ESCAPED | ||
5 | |||
6 | Override the PY_CMD_ESCAPED as the PY_CMD_ESCAPED is constructed by | ||
7 | the full path of the python3. In some cases, the path is so long and | ||
8 | result in the PY_CMD_ESCAPED exceeds 255 characters and comes below | ||
9 | do_configure error: | ||
10 | | CMake Error at src/python/CMakeLists.txt:18 (configure_file): | ||
11 | | configure_file Problem configuring file | ||
12 | | | ||
13 | | CMake Error: Could not open file for write in copy operation /buildarea1/test/wr_build/wr1020_20200909_bcc/bcc_long_Kernel/auto-standalone_next/200827/lxbuilds/Intel-Snow-Ridge-NS_platform_up/intel-x86-64-standard-glibc-std/wrlinux/build/tmp-glibc/work/corei7-64-wrs-linux/bcc/0.15.0-r0/build/src/python/bcc--buildarea1-test-wr_build-wr1020_20200909_bcc-bcc_long_Kernel-auto-standalone_next-200827-lxbuilds-Intel-Snow-Ridge-NS_platform_up-intel-x86-64-standard-glibc-std-wrlinux-build-tmp-glibc-work-corei7-64-wrs-linux-bcc-0.15.0-r0-recipe-sysroot-native-usr-bin-python3-native-python3/bcc/version.py.tmp | ||
14 | |||
15 | Upstream-Status: Pending | ||
16 | |||
17 | Signed-off-by: Mingli Yu <mingli.yu@windriver.com> | ||
18 | --- | ||
19 | src/python/CMakeLists.txt | 4 ++-- | ||
20 | 1 file changed, 2 insertions(+), 2 deletions(-) | ||
21 | |||
22 | diff --git a/src/python/CMakeLists.txt b/src/python/CMakeLists.txt | ||
23 | index 797e0d14..8afa6ffa 100644 | ||
24 | --- a/src/python/CMakeLists.txt | ||
25 | +++ b/src/python/CMakeLists.txt | ||
26 | @@ -12,7 +12,7 @@ file(GLOB_RECURSE PYTHON_INCLUDES RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} | ||
27 | |||
28 | foreach(PY_CMD ${PYTHON_CMD}) | ||
29 | string(REPLACE "/" "-" PY_CMD_ESCAPED ${PY_CMD}) | ||
30 | - set(PY_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/bcc-${PY_CMD_ESCAPED}) | ||
31 | + set(PY_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/bcc-python3) | ||
32 | |||
33 | foreach(PY_SRC ${PYTHON_SOURCES}) | ||
34 | configure_file(${PY_SRC} ${PY_DIRECTORY}/${PY_SRC} COPYONLY) | ||
35 | @@ -31,7 +31,7 @@ foreach(PY_CMD ${PYTHON_CMD}) | ||
36 | DEPENDS ${PYTHON_SOURCES} ${PYTHON_INCLUDES} | ||
37 | COMMENT "Building sdist for ${PY_CMD}" | ||
38 | ) | ||
39 | - add_custom_target(bcc_py_${PY_CMD_ESCAPED} ALL DEPENDS ${PIP_INSTALLABLE}) | ||
40 | + add_custom_target(bcc_py_python3 ALL DEPENDS ${PIP_INSTALLABLE}) | ||
41 | |||
42 | install( | ||
43 | CODE " | ||
44 | -- | ||
45 | 2.26.2 | ||
46 | |||
diff --git a/dynamic-layers/openembedded-layer/recipes-devtools/bcc/bcc_0.15.0.bb b/dynamic-layers/openembedded-layer/recipes-devtools/bcc/bcc_0.15.0.bb index a9ae91e..0d4748d 100644 --- a/dynamic-layers/openembedded-layer/recipes-devtools/bcc/bcc_0.15.0.bb +++ b/dynamic-layers/openembedded-layer/recipes-devtools/bcc/bcc_0.15.0.bb | |||
@@ -19,6 +19,7 @@ SRC_URI = "gitsm://github.com/iovisor/bcc \ | |||
19 | file://0001-tools-opensnoop-snoop-do_sys_openat2-for-kernel-v5.6.patch \ | 19 | file://0001-tools-opensnoop-snoop-do_sys_openat2-for-kernel-v5.6.patch \ |
20 | file://0001-Replace-kprobe-function-blk_account_io_completion-to.patch \ | 20 | file://0001-Replace-kprobe-function-blk_account_io_completion-to.patch \ |
21 | file://0001-tools-trace.py-Fix-failing-to-exit.patch \ | 21 | file://0001-tools-trace.py-Fix-failing-to-exit.patch \ |
22 | file://0001-CMakeLists.txt-override-the-PY_CMD_ESCAPED.patch \ | ||
22 | " | 23 | " |
23 | 24 | ||
24 | SRCREV = "e41f7a3be5c8114ef6a0990e50c2fbabea0e928e" | 25 | SRCREV = "e41f7a3be5c8114ef6a0990e50c2fbabea0e928e" |