Skip to content

Conversation

am11
Copy link
Member

@am11 am11 commented Dec 22, 2024

Upstream dotnet/arcade#15370

Fixes #856

@am11 am11 force-pushed the feature/porting/linux-loongach64 branch 28 times, most recently from f9ebf17 to ccbff87 Compare December 22, 2024 22:04
@am11 am11 force-pushed the feature/porting/linux-loongach64 branch 9 times, most recently from 57c2ede to 43ee082 Compare December 31, 2024 02:42
@am11 am11 force-pushed the feature/porting/linux-loongach64 branch 3 times, most recently from 783baad to 14362d7 Compare December 31, 2024 22:56
@am11 am11 force-pushed the feature/porting/linux-loongach64 branch from 14362d7 to 0d79bbc Compare January 3, 2025 09:58
@am11 am11 marked this pull request as ready for review January 3, 2025 09:58
@am11 am11 requested review from a team as code owners January 3, 2025 09:58
Copy link
Member

@akoeplinger akoeplinger left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Awesome, thank you!

@akoeplinger akoeplinger enabled auto-merge (squash) January 3, 2025 11:29
@akoeplinger
Copy link
Member

@am11 FYI there's this warning in the log:

/scripts/eng/common/cross/install-debs.py:273: DeprecationWarning: Python 3.14 will, by default, filter extracted tar archives and reject files or modify their metadata. Use the filter argument to control this behavior.
   tar.extractall(path=extract_dir, filter=None)

@akoeplinger akoeplinger merged commit 7859d6a into dotnet:main Jan 3, 2025
11 checks passed
@am11
Copy link
Member Author

am11 commented Jan 3, 2025

The old behavior was:

  • no warning
  • extract whatever (in-tree, outside of the destination tree)

new behavior:

  • warn when outside of the destination tree
  • safe extraction (not sure if it is effective but I'll confirm once the image is built)

We want the old behavior because we are essentially extracting in /etc/usr/bin etc. which requires outside of the destination tree extraction.

Thank you! I spend my holidays working on it. Hopefully it will be enough to cross-build runtime/diagnostics. Soon we will find out. 😅

@am11 am11 deleted the feature/porting/linux-loongach64 branch January 3, 2025 11:58
@am11
Copy link
Member Author

am11 commented Jan 3, 2025

Fixed by dotnet/arcade#15372. Note python3.14 will be released next week and currently in rc2. This warning is coming from 3.12 so it's harmless as of today. 🙂

@am11
Copy link
Member Author

am11 commented Jan 3, 2025

@xen0n @SixWeining, for dotnet runtime, we build our own copy of llvm-toolchain for the required components and architectures. For riscv64, all we had to do was to add this line https://github.com/dotnet/dotnet-buildtools-prereqs-docker/pull/1098/files#diff-6523ee70a4b5d768c077dad5e944e632e502c99fe47c807809946e44b5f2e13a to light up the arch support with clang/llvm-config.

I updated the line similarly for LoongArach in this PR, and the logs (https://dev.azure.com/dnceng-public/public/_build/results?buildId=905886&view=logs&j=9aada89a-2e24-5acb-2807-6900158b9cce&t=6f3c41b4-0b5c-55eb-81af-364314aaa449) seem to have built all the default targets, but clang -print-targets is not showing us LoongArch:

$ docker run --rm \
    mcr.microsoft.com/dotnet-buildtools/prereqs:azurelinux-3.0-net10.0-cross-loongarch64-musl \
    clang --print-targets

  Registered Targets:
    aarch64    - AArch64 (little endian)
    aarch64_32 - AArch64 (little endian ILP32)
    aarch64_be - AArch64 (big endian)
    arm        - ARM
    arm64      - ARM64 (little endian)
    arm64_32   - ARM64 (little endian ILP32)
    armeb      - ARM (big endian)
    ppc32      - PowerPC 32
    ppc32le    - PowerPC 32 LE
    ppc64      - PowerPC 64
    ppc64le    - PowerPC 64 LE
    riscv32    - 32-bit RISC-V
    riscv64    - 64-bit RISC-V
    systemz    - SystemZ
    thumb      - Thumb
    thumbeb    - Thumb (big endian)
    x86        - 32-bit X86: Pentium-Pro and above
    x86-64     - 64-bit X86: EM64T and AMD64

and

$ docker run --rm \
    mcr.microsoft.com/dotnet-buildtools/prereqs:azurelinux-3.0-net10.0-cross-loongarch64-musl \
    llvm-config --targets-built

X86 AArch64 ARM PowerPC RISCV SystemZ

Any ideas what's going on? This is llvm 19, we can switch to llvm 20 if you think that would help.

@am11
Copy link
Member Author

am11 commented Jan 3, 2025

Ah never mind this is a caching issue with the layers. The builder layer mcr.microsoft.com/dotnet-buildtools/prereqs:azurelinux-3.0-net10.0-crossdeps-builder-amd64 does show loongarch. But since the wrapper layer azurelinux-3.0-net10.0-crossdeps-llvm-amd64 is not built, we get this weird old+new state.

@mthalman are we happy with the current layering? I think I'd need to just touch azurelinux-3.0-crossdeps-llvm-net10.0-local to trigger its rebuild.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

add LoongArch64’s docker image

2 participants