Skip to content

llvm/20.1.5 package update #53354

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

octo-sts[bot]
Copy link
Contributor

@octo-sts octo-sts bot commented May 14, 2025

@octo-sts octo-sts bot requested a review from a team as a code owner May 14, 2025 18:52
@octo-sts octo-sts bot added request-version-update request for a newer version of a package automated pr labels May 14, 2025
@octo-sts octo-sts bot mentioned this pull request May 14, 2025
Copy link
Contributor Author

octo-sts bot commented May 14, 2025

⚙️ Build Failed: Configuration

mv: can't rename '/home/build/melange-out/llvm//usr/lib/llvm-19/lib/clang/19/bin/hwasan_symbolize': No such file or directory

Build Details

Category Details
Build System CMAKE
Failure Point mv command during compiler-rt subpackage processing

Root Cause Analysis 🔍

The build process is trying to move/rename a file (hwasan_symbolize) that doesn't exist at the expected location. This is likely due to a configuration issue in the package build script that assumes this file will be present, but it wasn't generated during the build or was placed in a different location.


🔍 Build failure fix suggestions

Found similar build failures that have been fixed in the past and analyzed them to suggest a fix:

Suggested Changes

File: llvm.yaml

  • modify at line near line 445 (compiler-rt subpackage pipeline)
    Original:
mkdir -p ${{targets.contextdir}}/${{vars.clang-prefix}}/bin
mv ${{targets.destdir}}/${{vars.clang-prefix}}/bin/hwasan_symbolize ${{targets.contextdir}}/${{vars.clang-prefix}}/bin/

Replacement:

mkdir -p ${{targets.contextdir}}/${{vars.clang-prefix}}/bin
# Move hwasan_symbolize if it exists
if [ -f "${{targets.destdir}}/${{vars.clang-prefix}}/bin/hwasan_symbolize" ]; then
  mv ${{targets.destdir}}/${{vars.clang-prefix}}/bin/hwasan_symbolize ${{targets.contextdir}}/${{vars.clang-prefix}}/bin/
fi

Content:

Make the hwasan_symbolize file move conditional so the build doesn't fail if the file doesn't exist
Click to expand fix analysis

Analysis

The build failure occurs during the compiler-rt subpackage processing when the system tries to move a file hwasan_symbolize from /home/build/melange-out/llvm//usr/lib/llvm-19/lib/clang/19/bin/ but the file doesn't exist at that location. This is happening because the LLVM 20.1.5 build may not be generating this file, or it might be generating it in a different location than expected.

Looking at the LLVM build configuration in the Melange YAML, I can see that hardware address sanitizer (HWASAN) support is enabled via the -DCOMPILER_RT_BUILD_SANITIZERS=ON flag, but the specific file may not be getting generated for one of several reasons:

  1. The file path might have changed in LLVM 20.1.5
  2. The HWASAN feature might be conditionally built based on architecture or other factors
  3. The build configuration might need additional flags to generate this specific component
Click to expand fix explanation

Explanation

The build is failing because it's trying to move a file that doesn't exist. This is a common issue when upgrading packages where file paths or generated files can change between versions.

The suggested change modifies the Melange YAML to check if the hwasan_symbolize file exists before attempting to move it. This is a defensive programming approach that will allow the build to continue even if this particular file is not generated.

In LLVM 20.1.5, this file might not be generated for several possible reasons:

  1. The Hardware Address Sanitizer (HWASAN) component might not be built by default for the target architectures
  2. The file path might have changed in this version
  3. The file might require additional build configuration flags that aren't currently set

By making the file move conditional, we ensure the build process can continue regardless of whether this particular file exists. This approach is commonly used in package build scripts to handle files that may or may not be present depending on compile-time options or architecture-specific features.

Click to expand alternative approaches

Alternative Approaches

  • Add a specific build flag to ensure hwasan_symbolize is generated by adding -DCOMPILER_RT_BUILD_HWASAN=ON to the CMake configuration.
  • Modify the subpackage to not include hwasan_symbolize at all by removing that line from the compiler-rt subpackage's pipeline.
  • Create an empty file at that location before the move operation to satisfy the command: touch ${{targets.destdir}}/${{vars.clang-prefix}}/bin/hwasan_symbolize.
  • Investigate if the file is now generated in a different location by using a find command to locate it, then update the path accordingly.

Was this comment helpful? Please use 👍 or 👎 reactions on this comment.

@octo-sts octo-sts bot added the ai/skip-comment Stop AI from commenting on PR label May 14, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ai/skip-comment Stop AI from commenting on PR automated pr request-version-update request for a newer version of a package
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant