-
Notifications
You must be signed in to change notification settings - Fork 206
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
compiler-rt and libcxx contain reference to TMPDIR [buildpaths] #991
Comments
It appears that only files within $ strings ./tmp/work/bf133-vrag-linux/vrag-image/1.0/rootfs-dbg/usr/bin/.debug/llvm-ifs | grep -i ${PWD}
clang version 18.1.8 (/mnt/data/yocto/bf133/build/tmp/work-shared/llvm-project-source-18.1.8-r0/llvm-project-18.1.8.src/clang db87ca070c5a4790dcdb9601bcb35037603f6d7f)
.note.gnu.build-id This is the case for about all the binaries within the |
I think we need to find the place in llvm sources where the source path is being emitted into
|
Fixes Issue kraj#991 If this is not disabled, the build tries to use CMake magic to compute repository and sha1 its building, however in case of OE it gets it completely wrong when building from tarball, because its building under TMPDIR which maybe a directory under main repo checkout e.g. poky tree so it traverses up and finds the sha of poky and assumes that its building from a git tree instead of tarball and emits the version control info into clang -v output e.g. ❯ ../image/mnt/b/yoe/master/build/tmp/work/x86_64-linux/clang-native/20.0.0/recipe-sysroot-native/usr/bin/clang -v clang version 20.0.0 (/home/kraj/work/llvm-project f133c59b33a749dc6d5fa8fb9a2366b95ea45068) This can contain buildpaths since work-shared is where llvm sources will be and they will appear here. Therefore, avoid cmake trying to do this and we get good clean version info > ../recipe-sysroot-native/usr/bin/aarch64-yoe-linux/aarch64-yoe-linux-clang clang version 20.0.0 This will also avoid emitting buildpaths into debuginfo in some cases where compiler version is emitted into build.id info Signed-off-by: Khem Raj <[email protected]>
@fidelski Are you using tip of master branch or some other branch ? we have recently switched away from building the compiler from git checkout and resorted to tarballs but I see your build is coming out of a git tree which is in I think cmake's git version and repo url detection logic is getting triggerred and doing unwanted things here I have a patch here Please try it out and lemme know. |
Thanks a lot for your quick response and patch! I was using tip of master branch, no idea why it should build differently here 🤷♂️ [EDIT] I was too early here - I still get an error regarding to liblldb:
This puzzles me, the file inspected is within a path |
Fixes Issue kraj#991 If this is not disabled, the build tries to use CMake magic to compute repository and sha1 its building, however in case of OE it gets it completely wrong when building from tarball, because its building under TMPDIR which maybe a directory under main repo checkout e.g. poky tree so it traverses up and finds the sha of poky and assumes that its building from a git tree instead of tarball and emits the version control info into clang -v output e.g. ❯ ../image/mnt/b/yoe/master/build/tmp/work/x86_64-linux/clang-native/20.0.0/recipe-sysroot-native/usr/bin/clang -v clang version 20.0.0 (/home/kraj/work/llvm-project f133c59b33a749dc6d5fa8fb9a2366b95ea45068) This can contain buildpaths since work-shared is where llvm sources will be and they will appear here. Therefore, avoid cmake trying to do this and we get good clean version info > ../recipe-sysroot-native/usr/bin/aarch64-yoe-linux/aarch64-yoe-linux-clang clang version 20.0.0 This will also avoid emitting buildpaths into debuginfo in some cases where compiler version is emitted into build.id info Signed-off-by: Khem Raj <[email protected]>
Fixes Issue #991 If this is not disabled, the build tries to use CMake magic to compute repository and sha1 its building, however in case of OE it gets it completely wrong when building from tarball, because its building under TMPDIR which maybe a directory under main repo checkout e.g. poky tree so it traverses up and finds the sha of poky and assumes that its building from a git tree instead of tarball and emits the version control info into clang -v output e.g. ❯ ../image/mnt/b/yoe/master/build/tmp/work/x86_64-linux/clang-native/20.0.0/recipe-sysroot-native/usr/bin/clang -v clang version 20.0.0 (/home/kraj/work/llvm-project f133c59b33a749dc6d5fa8fb9a2366b95ea45068) This can contain buildpaths since work-shared is where llvm sources will be and they will appear here. Therefore, avoid cmake trying to do this and we get good clean version info > ../recipe-sysroot-native/usr/bin/aarch64-yoe-linux/aarch64-yoe-linux-clang clang version 20.0.0 This will also avoid emitting buildpaths into debuginfo in some cases where compiler version is emitted into build.id info Signed-off-by: Khem Raj <[email protected]>
should be fixed now. |
What is happening
In the current master the build of a system that requests
CLANGSDK = "1"
and adds the following toolchain host tasks:fails due to errors relating to QA Issues:
To Reproduce
Steps to reproduce the behavior:
CLANGSDK = "1"
in the build configurationbitbake {myimage}
Expected behavior
The build succeeds and the Clang SDK is built correctly.
Seen elsewhere
It seems related or at leas similar to #645
The text was updated successfully, but these errors were encountered: