From: Changqing Li <[email protected]>

Run following commands:
bitbake nativesdk-apt
bitbake nativesdk-apt -c install -f

The second command's do_install will fail with following error:
| 
/build/tmp-glibc/work/x86_64-nativesdk-wrlinuxsdk-linux/nativesdk-apt/2.4.5-r0/recipe-sysroot-native/usr/bin/x86_64-wrlinuxsdk-linux/x86_64-wrlinuxsdk-linux-g++
 -D_WITH_GETLINE=1 -Dapt_pkg_EXPORTS 
-I/build/tmp-glibc/work/x86_64-nativesdk-wrlinuxsdk-linux/nativesdk-apt/2.4.5-r0/build/include
 
-I/build/tmp-glibc/work/x86_64-nativesdk-wrlinuxsdk-linux/nativesdk-apt/2.4.5-r0/build/include/apt-pkg
 
--sysroot=/build/tmp-glibc/work/x86_64-nativesdk-wrlinuxsdk-linux/nativesdk-apt/2.4.5-r0/recipe-sysroot
  -O2 -pipe 
-fmacro-prefix-map=/build/tmp-glibc/work/x86_64-nativesdk-wrlinuxsdk-linux/nativesdk-apt/2.4.5-r0=/usr/src/debug/nativesdk-apt/2.4.5-r0
                      
-fdebug-prefix-map=/build/tmp-glibc/work/x86_64-nativesdk-wrlinuxsdk-linux/nativesdk-apt/2.4.5-r0=/usr/src/debug/nativesdk-apt/2.4.5-r0
                      
-fdebug-prefix-map=/build/tmp-glibc/work/x86_64-nativesdk-wrlinuxsdk-linux/nativesdk-apt/2.4.5-r0/recipe-sysroot=
                      
-fdebug-prefix-map=/build/tmp-glibc/work/x86_64-nativesdk-wrlinuxsdk-linux/nativesdk-apt/2.4.5-r0/recipe-sysroot-native=
  -fPIC -fvisibility=hidden -fvisibility-inlines-hidden -Wall -Wextra 
-Wcast-align -Wlogical-op -Wredundant-decls -Wmissing-declarations 
-Wunsafe-loop-optimizations -Wctor-dtor-privacy -Wdisabled-optimization 
-Winit-self -Wmissing-include-dirs -Wnoexcept -Wsign-promo -Wundef 
-Wdouble-promotion -Wsuggest-override -Werror=suggest-override 
-Werror=return-type -std=gnu++17 -MD -MT 
apt-pkg/CMakeFiles/apt-pkg.dir/tagfile-keys.cc.o -MF 
apt-pkg/CMakeFiles/apt-pkg.dir/tagfile-keys.cc.o.d -o 
apt-pkg/CMakeFiles/apt-pkg.dir/tagfile-keys.cc.o -c 
/build/tmp-glibc/work/x86_64-nativesdk-wrlinuxsdk-linux/nativesdk-apt/2.4.5-r0/build/apt-pkg/tagfile-keys.cc
| 
/build/tmp-glibc/work/x86_64-nativesdk-wrlinuxsdk-linux/nativesdk-apt/2.4.5-r0/build/apt-pkg/tagfile-keys.cc:1:10:
 fatal error: /include/apt-pkg/tagfile-keys.h: No such file or directory
|     1 | #include "/include/apt-pkg/tagfile-keys.h"
0/build/tmp-glibc/work/x86_64-nativesdk-wrlinuxsdk-linux/nativesdk-apt/2.4.5-r0/build/apt-pkg/tagfile-keys.cc

During the first command, do_install task changed tagfile-keys.cc, this
will make tagfile-keys.cc is newer than the built tagfile-keys.cc.o. So the 
second
do_install will rebuild tagfile-keys.cc.o. But the header path is
replaced wrongly, so fix the header path

Signed-off-by: Changqing Li <[email protected]>
Signed-off-by: Alexandre Belloni <[email protected]>
(cherry picked from commit 3e18bd4dbddacfd878317ebcf0a039b46d6d6342)
Signed-off-by: Steve Sakoman <[email protected]>
---
 meta/recipes-devtools/apt/apt_2.4.5.bb | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/meta/recipes-devtools/apt/apt_2.4.5.bb 
b/meta/recipes-devtools/apt/apt_2.4.5.bb
index 95c25e3036..b5ada2ef55 100644
--- a/meta/recipes-devtools/apt/apt_2.4.5.bb
+++ b/meta/recipes-devtools/apt/apt_2.4.5.bb
@@ -132,5 +132,5 @@ do_install:append:class-target() {
 
 do_install:append() {
        # Avoid non-reproducible -src package
-       sed -i -e "s,${B},,g" ${B}/apt-pkg/tagfile-keys.cc
+       sed -i -e "s,${B}/include/,,g" ${B}/apt-pkg/tagfile-keys.cc
 }
-- 
2.25.1

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#169757): 
https://lists.openembedded.org/g/openembedded-core/message/169757
Mute This Topic: https://lists.openembedded.org/mt/93215885/21656
Group Owner: [email protected]
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-

Reply via email to