Skip to content

ci: arm32 (glibc<=2.28) native-only build, remove other workflows#1

Merged
maikebing merged 6 commits into
release/10.0from
copilot/release100
Jun 3, 2026
Merged

ci: arm32 (glibc<=2.28) native-only build, remove other workflows#1
maikebing merged 6 commits into
release/10.0from
copilot/release100

Conversation

Copilot AI commented Jun 3, 2026

Copy link
Copy Markdown

Note

本 PR 的内容由 GitHub Copilot 编码代理生成。

目标

release/10.0 上保留 唯一一个 GitHub Actions workflow,交叉编译 linux-arm (arm32, armhf) 的 native 运行时,目标 glibc 锁在 Debian 10 buster = glibc 2.28。最终产物只打包 .so(含带版本号的软链),经 actions/upload-artifact@v4 上传。所有其它 workflow 已移除。

新 workflow:.github/workflows/build-linux-arm-lowglibc.yml

  • 触发push/pull_request 针对 release/10.0workflow_dispatch。runner ubuntu-22.04timeout-minutes: 240permissions: contents: read,并发组 build-arm-${{ github.ref }}cancel-in-progress)。
  • rootfsbuild-rootfs.sh arm buster --skipsigcheck 构建 armhf + Debian 10 (glibc 2.28) rootfs。
  • subset(native-only):自动检测 eng/Subsets.props,优先 clr.native+libs.native+host.native,否则 clr.native+libs.native,兜底 clr+libs+host.native 子集是纯 CMake 原生构建,不拉入 clr.tools,因此不再编译 CoreLib / crossgen2 / ILCompiler / R2RDump 等托管程序集(也消除了 ILCompiler 链接阶段的 __*_time64 undefined symbol)。
  • glibc 质量门:对所有 .soobjdump -T,取最高 GLIBC_x.y,要求 <= GLIBC_2.28,否则 job 失败。
  • 打包/上传tardotnet-runtime-linux-arm-glibc228-<UTC>.tar.gz,artifact dotnet-runtime-linux-arm-glibc228retention-days: 30。产物只含 .so 及软链。

删除的 workflows / 辅助文件

.github/workflows/ 下其余全部 33 个文件(含 shared/ 子目录)已删除,仅保留新增的 build-linux-arm-lowglibc.yml.github/ 其它目录(ISSUE_TEMPLATE/copilot-instructions.md 等)保持不变。

rootfs 修复(buster-security 404)

eng/common/cross/build-rootfs.shbuster 分支虽把源指向 archive.debian.org,但未清空默认 __UbuntuSuites="updates security backports",导致 apt 请求不存在的 buster-security404 → exit 100。修复为在回退到 archive.debian.org 时清空 __UbuntuSuites(与现有 armel 分支一致),__Suites 仅剩 buster

glibc 2.28 64 位 time_t 处理(方案 2)

弃用上一轮的 CLR_DISABLE_64BIT_TIME_T 环境开关,改为一处编译期门控,行为等价但更干净:

  • eng/native/configurecompiler.cmake:还原为 upstream 原样——无条件 -D_TIME_BITS=64(移除 env 开关)。glibc 2.28 不识别该宏,静默忽略,time_t 仍为 32 位。
  • src/native/libs/System.Security.Cryptography.Native/opensslshim.c:把 64 位 time_tstatic_assert 门控从 _TIME_BITS==64 改为 __USE_TIME_BITS64。该宏由 glibc 仅在 _TIME_BITS=64 真正生效时定义(见 features-time64.h_TIME_BITS==64 && _FILE_OFFSET_BITS==64 && __TIMESIZE==32,即 glibc ≥ 2.34):
    • glibc ≥ 2.34 arm32:宏已定义 → 断言生效,保留 sizeof(time_t)==8 护栏。
    • buster 2.28:features-time64.h 不存在 → 宏未定义 → 断言跳过 → 以 32 位 time_t 编译通过。
  • workflow 不再导出 CLR_DISABLE_64BIT_TIME_T
#if defined(TARGET_ARM) && defined(TARGET_LINUX)
#if defined(__USE_TIME_BITS64)
    c_static_assert_msg(sizeof(time_t) == 8, "Build requires 64-bit time_t.");
#endif

运行期 g_libSslUses32BitTime 自检保持自洽(buster 上我方与系统 libssl 均为 32 位 time_t)。

⚠️ 代价:该配置使用 32 位 time_t不具备 Y2038 安全性。这是锁定 glibc 2.28 的固有取舍;若目标设备 glibc 实际 ≥ 2.34,更稳妥的做法是把 rootfs 换成 bookworm(glibc 2.36)并保留 64 位 time_t

Buster EOL 风险

Debian 10 buster 已 EOL,build-rootfs.sh 默认回退到 archive.debian.org,其 Release 签名通常过期,故 workflow 显式传 --skipsigcheck。归档源若网络中断或丢包,rootfs 构建会失败——这是 buster EOL 的固有风险。

改动范围

.github/workflows/build-linux-arm-lowglibc.ymleng/common/cross/build-rootfs.sheng/native/configurecompiler.cmakesrc/native/libs/System.Security.Cryptography.Native/opensslshim.c,外加删除其余 33 个 workflow 文件。

Original prompt

目标

IoTSharp/runtimerelease/10.0 分支上,准备一份 极简的 CI —— 只保留 一个 GitHub Actions workflow,用来交叉编译 linux-arm (arm32, armhf) 的 native 运行时,并把目标 glibc 锁在尽可能低的版本(首选 Debian 10 buster = glibc 2.28)。所有其他 workflow 全部移除。构建产物只保留 .so 文件,打 tar.gz 上传为 GitHub Actions artifact。

注意:IoTSharp/runtimerelease/10.0 分支当前可能只是基于 main 的占位分支。你需要首先把它同步到 upstream dotnet/runtimerelease/10.0 最新 HEAD,然后再在其上做改动。


步骤

1. 同步 release/10.0 到 upstream

在工作目录里:

git remote add upstream https://github.com/dotnet/runtime.git
git fetch upstream release/10.0
# 用 upstream 的 release/10.0 强制重置 origin 的 release/10.0
git checkout -B release/10.0 upstream/release/10.0
git push --force-with-lease origin release/10.0

之后从同步好的 release/10.0 上切出工作分支进行后续修改,并将最终 PR 的 base 设为 release/10.0

2. 清空 .github/workflows/

删除 .github/workflows/所有 现有 workflow / 辅助文件(.yml, .lock.yml, .md, .ps1, .json),以及 shared/ 子目录(如还被其它已删 workflow 引用就一并删)。保留 .github/ 下其它目录(如 ISSUE_TEMPLATE/, copilot-instructions.md 等)不动。

3. 新增唯一 workflow

新增 .github/workflows/build-linux-arm-lowglibc.yml

  • 触发:pushrelease/10.0workflow_dispatchpull_request 针对 release/10.0
  • 单 job build-arm 跑在 ubuntu-22.04
  • permissions: { contents: read }concurrency: { group: 'build-arm-${{ github.ref }}', cancel-in-progress: true }timeout-minutes: 240
  • env: DOTNET_CLI_TELEMETRY_OPTOUT: 1, DOTNET_NOLOGO: 1
  • 步骤:
    1. actions/checkout@v4fetch-depth: 1
    2. 安装宿主依赖(apt):cmake clang lld llvm build-essential python3 debootstrap qemu-user-static binfmt-support libicu-dev libssl-dev libkrb5-dev zlib1g-dev libcurl4-openssl-dev libunwind-dev libnuma-dev liblttng-ust-dev tar gzip xz-utils unzip symlinks gnupg2 debian-archive-keyring file binutils-arm-linux-gnueabihf
    3. 构建 arm + buster rootfs:
      sudo ROOTFS_DIR="$PWD/.tools/rootfs/arm" \
          ./eng/common/cross/build-rootfs.sh arm buster --skipsigcheck
      sudo chown -R "$USER":"$USER" .tools
    4. 交叉编译 native(不要托管 tests,加速并减小产物):
      export ROOTFS_DIR="$PWD/.tools/rootfs/arm"
      ./build.sh --arch arm --cross --configuration Release \
                 --subset clr+libs+host.native
      先检查 eng/Subsets.props 确认子集名 host.native 在 release/10.0 上存在,否则回退到 clr+libs.nativeclr+libs+host。最终选择应保证生成所有 native .so(含 libcoreclr.so, libclrjit.so, System.*.Native.so, libhostfxr.so, libhostpolicy.so, libnethost.so 等)。
    5. 收集所有 .so*
      mkdir -p staging/linux-arm-lowglibc
      find artifacts/bin -type f \( -name '*.so' -o -name '*.so.*' \) \
          -exec cp -v --parents {} staging/linux-arm-lowglibc/ \;
      test -n "$(find staging/linux-arm-lowglibc -name libcoreclr.so -print -quit)" \
          || { echo 'libcoreclr.so missing'; exit 1; }
    6. glibc 版本质量门(必须 ≤ GLIBC_2.28):
      OBJDUMP=$(command -v arm-linux-gnueabihf-objdump || command -v llvm-objdump || command -v objdump)
      MAX=$(find staging/linux-arm-lowglibc -type f \( -name '*.so' -o -name '*.so.*' \) \
             -exec "$OBJDUMP" -T {} + 2>/dev/null | grep -oE 'GLIBC_[0-9.]+' | sort -Vu | tail -n1)
      echo "Highest required GLIBC = $MAX"
      LIMIT=GLIBC_2.28
      printf '%s\n%s\n' "$MAX" "$LIMIT" | sort -V | tail -n1 | grep -qx "$LIMIT" \
          || { echo "ERROR: 某些 .so 需要高于 $LIMIT 的 glibc"; exit 1; }
    7. 打包:
      VER=$(date -u +%Y%m%d-%H%M%S)
      tar -C staging -czf dotnet-runtime-linux-arm-glibc228-${VER}.tar.gz linux-arm-lowglibc
    8. actions/upload-artifact@v4:name=dotnet-runtime-linux-arm-glibc228, path=dotnet-runtime-linux-arm-glibc228-*.tar.gz, retention-days=30。

只上传 .so(含带版本号软链)。不要 上传 .dll / .pdb / .json / 托管程序集。

4. 不要修改其它源码

只动 .github/workflows/ 目录。

5. 验证

  • actionlint(如可用)或人工 review 检查 workflow 语法。
  • 确认 ./eng/common/cross/build-rootfs.sh 在 release/10.0 上支持 arm buster --skipsigcheck(应存在)。
  • 确认所选 subset 名在 eng/Subsets.props 中有效。

6. PR

  • base 必须是 release/10.0
  • 标题:ci: arm32 (glibc<=2.28) native-only build, remove other workflows
  • PR body 顶部:

    [!NOTE]
    本 PR 的内容由 GitHub Copilot 编码代理生成。

  • body 内列出:删除了哪些 workflow(清单),新 workflow 触发方式 / 产物名 / retention,以及 buster EOL 风险说明(从 archive.debian.org 拉取,需 --skipsigcheck)。
  • 只使用默认 GITHUB_TOKEN

The following is the prior conversation context from the user's chat exploration (may be truncated):

User: 能帮我构建一个编译 当前项目为 arm32 版本, glibc 是 2.28 或者更低的脚本或者 dockerfile 吗 ?

Assistant: 下面是为 dotnet/runtime 编译 linux-arm (arm32, armhf) 并把目标 glibc 锁在 2.28(即 Debian 10 "buster") 的一套完整方案。

核心思路

dotnet/runtime 官方支持交叉编译。targeting 的 glibc 版本由 rootfs(sysroot)里 libc 的版本决定。eng/common/cross/build-rootfs.sh 里已经内置了 buster(Debian 10,glibc 2.28)的支持,配合 arm 架构即可:

  • arm + buster → armhf + glibc 2.28(你要的目标) ✅
  • 想再低一点可以用 stretch (Debian 9, glibc 2.24),但 stretch 的归档源已比较老,buster 是更现实的“最低线”。

宿主机用 Ubuntu ...

This pull request was created from Copilot chat.

Copilot AI changed the title [WIP] Prepare minimal CI for linux-arm cross compilation ci: arm32 (glibc<=2.28) native-only build, remove other workflows Jun 3, 2026
Copilot AI requested a review from maikebing June 3, 2026 03:20
@maikebing

Copy link
Copy Markdown
Member

@copilot 开始 执行

@maikebing

Copy link
Copy Markdown
Member

@copilot 我看到 https://github.com/IoTSharp/runtime/blob/f93d97dce1889b524f87229df037314c6f7bd8ca/.github/workflows/build-linux-arm-lowglibc.yml 这个修改应该没问题?拿过来, 我们提交到当前pr中 , 或者我们核对我们的目标, 开始实现

Co-authored-by: maikebing <3445167+maikebing@users.noreply.github.com>

Copilot AI commented Jun 3, 2026

Copy link
Copy Markdown
Author

@copilot 我看到 https://github.com/IoTSharp/runtime/blob/f93d97dce1889b524f87229df037314c6f7bd8ca/.github/workflows/build-linux-arm-lowglibc.yml 这个修改应该没问题?拿�...

已按目标实现:把 f93d97d 中的 .github/workflows/build-linux-arm-lowglibc.yml 原样拿过来,并删除 .github/workflows/ 下其余全部文件(共 33 个,含 shared/ 目录),现在仅保留这一个 workflow。

已校验:

  • workflow YAML 语法通过 yaml.safe_load
  • eng/Subsets.props 存在 Host.Native / Libs.Native 子集。
  • eng/common/cross/build-rootfs.sh 支持 arm buster --skipsigcheck

CodeQL 0 告警。Code Review 仅给出版本固定的一致性建议(checkout@v4、upload-artifact@v4);由于其它 workflow 全部删除,已无需保持一致,故保留你认可的原文件内容。提交:见本次 push。

Copilot AI changed the title ci: arm32 (glibc<=2.28) native-only build, remove other workflows ci: arm32 (glibc&lt;=2.28) native-only build, remove other workflows Jun 3, 2026
@maikebing

Copy link
Copy Markdown
Member

@copilot W: The repository 'http://archive.debian.org/debian buster-security Release' does not have a Release file.
W: Skipping acquire of configured file 'universe/binary-armhf/Packages' as repository 'http://archive.debian.org/debian buster InRelease' doesn't have the component 'universe' (component misspelt in sources.list?)
W: Skipping acquire of configured file 'universe/i18n/Translation-en' as repository 'http://archive.debian.org/debian buster InRelease' doesn't have the component 'universe' (component misspelt in sources.list?)
W: Skipping acquire of configured file 'universe/binary-armhf/Packages' as repository 'http://archive.debian.org/debian buster-updates InRelease' doesn't have the component 'universe' (component misspelt in sources.list?)
W: Skipping acquire of configured file 'universe/i18n/Translation-en' as repository 'http://archive.debian.org/debian buster-updates InRelease' doesn't have the component 'universe' (component misspelt in sources.list?)
W: Skipping acquire of configured file 'universe/binary-armhf/Packages' as repository 'http://archive.debian.org/debian buster-backports InRelease' doesn't have the component 'universe' (component misspelt in sources.list?)
W: Skipping acquire of configured file 'universe/i18n/Translation-en' as repository 'http://archive.debian.org/debian buster-backports InRelease' doesn't have the component 'universe' (component misspelt in sources.list?)
E: Failed to fetch http://archive.debian.org/debian/dists/buster-security/main/binary-armhf/Packages 404 Not Found [IP: 151.101.194.132 80]
E: Some index files failed to download. They have been ignored, or old ones used instead.
Error: Process completed with exit code 100.

…security)

Co-authored-by: maikebing <3445167+maikebing@users.noreply.github.com>

Copilot AI commented Jun 3, 2026

Copy link
Copy Markdown
Author

@copilot W: The repository 'http://archive.debian.org/debian buster-security Release' does not have a Release file.
W: Skipping acquire of configured file 'universe/binary-armhf/Packages' as reposito...

已修复。根因:eng/common/cross/build-rootfs.shbuster CodeName 分支虽然把源指向 archive.debian.org,但未清空默认的 __UbuntuSuites="updates security backports",于是仍尝试拉取 buster-security。而 archive.debian.org/debian 下并没有 buster-security(安全更新在 debian-security),导致 buster-security/main/binary-armhf/Packages 返回 404 → exit 100。

修复:在默认回退到 archive.debian.org 时清空 __UbuntuSuites(与现有 armel 分支一致),使 __Suites 只剩 buster,不再请求 -security/-updates/-backportsbash -n 语法通过,suite 生成已验证为 [buster ]

注:日志里 universe component misspelt 仅为 W: 警告(Debian 无 universe 组件,包从 main 获取),非致命,不影响 rootfs 构建。提交见本次 push。

@maikebing

Copy link
Copy Markdown
Member

@copilot FAILED: [code=1] libs-native/System.Security.Cryptography.Native/CMakeFiles/objlib.dir/opensslshim.c.o
/usr/bin/clang-15 --target=arm-linux-gnueabihf --gcc-toolchain=/home/runner/work/runtime/runtime/.tools/rootfs/arm/usr --sysroot=/home/runner/work/runtime/runtime/.tools/rootfs/arm -DCLR_ARM_FPU_CAPABILITY=0x7 -DCOMPILER_SUPPORTS_W_RESERVED_IDENTIFIER -DDISABLE_CONTRACTS -DFEATURE_DISTRO_AGNOSTIC_SSL -DHOST_ARM -DHOST_UNIX -DNDEBUG -DOPENSSL_API_COMPAT=0x10100000L -DPALEXPORT=EXTERN_C -DTARGET_32BIT -DTARGET_ARM -DTARGET_LINUX -DTARGET_UNIX -DURTBLDENV_FRIENDLY=Retail -D_FILE_OFFSET_BITS=64 -D_TIME_BITS=64 -I/home/runner/work/runtime/runtime/artifacts/obj/coreclr/linux.arm.Release/libs-native/System.Security.Cryptography.Native -I/home/runner/work/runtime/runtime/src/native/libs/System.Security.Cryptography.Native -I/home/runner/work/runtime/runtime/src/native -I/home/runner/work/runtime/runtime/src/native/inc -std=gnu99 -Wno-declaration-after-statement -D_GNU_SOURCE -O3 -DNDEBUG -std=gnu11 -fPIC -mthumb -mfpu=vfpv3 -O3 -Wall -Wno-null-conversion -glldb -fno-omit-frame-pointer -fno-strict-overflow -fno-strict-aliasing -fstack-protector-strong -Werror -Wno-unused-variable -Wno-unused-value -Wno-unused-function -Wno-tautological-compare -Wno-unknown-pragmas -Wimplicit-fallthrough -Wno-unused-but-set-variable -ffp-contract=off -Wno-unknown-warning-option -ferror-limit=4096 -Wno-unused-private-field -Wno-constant-logical-operand -Wno-pragma-pack -Wno-incompatible-ms-struct -Wno-reserved-identifier -Wno-unsafe-buffer-usage -Wno-single-bit-bitfield-constant-conversion -Wno-cast-function-type-strict -Wno-switch-default -fsigned-char -fvisibility=hidden -ffunction-sections -fdata-sections -march=armv7-a -I/home/runner/work/runtime/runtime/src/native/libs/Common -I/home/runner/work/runtime/runtime/artifacts/obj/coreclr/linux.arm.Release/libs-native/Common -Weverything -Wno-format-nonliteral -Wno-disabled-macro-expansion -Wno-padded -Wno-empty-translation-unit -Wno-cast-align -Wno-typedef-redefinition -Wno-thread-safety-analysis -Wno-c11-extensions -Wno-reserved-id-macro -Wno-documentation -Wno-used-but-marked-unused -pthread -MD -MT libs-native/System.Security.Cryptography.Native/CMakeFiles/objlib.dir/opensslshim.c.o -MF libs-native/System.Security.Cryptography.Native/CMakeFiles/objlib.dir/opensslshim.c.o.d -o libs-native/System.Security.Cryptography.Native/CMakeFiles/objlib.dir/opensslshim.c.o -c /home/runner/work/runtime/runtime/src/native/libs/System.Security.Cryptography.Native/opensslshim.c
/home/runner/work/runtime/runtime/src/native/libs/System.Security.Cryptography.Native/opensslshim.c:199:5: error: static assertion failed due to requirement 'sizeof(long) == 8': Build requires 64-bit time_t.
c_static_assert_msg(sizeof(time_t) == 8, "Build requires 64-bit time_t.");
^ ~~~~~~~~~~~~~~~~~~~
/home/runner/work/runtime/runtime/src/native/libs/Common/pal_compiler.h:20:37: note: expanded from macro 'c_static_assert_msg'
#define c_static_assert_msg(e, msg) static_assert((e), msg)
^ ~
/home/runner/work/runtime/runtime/.tools/rootfs/arm/usr/include/assert.h:143:24: note: expanded from macro 'static_assert'

define static_assert _Static_assert

                     ^

1 error generated.
[1215/2198] Building C object shared_minipal/CMakeFiles/aotminipal.dir/descriptorlimit.c.o
[1216/2198] Building C object shared_minipal/CMakeFiles/aotminipal.dir/memorybarrierprocesswide.c.o
[1217/2198] Building C object libs-native/System.Security.Cryptography.Native/CMakeFiles/System.Security.Cryptography.Native.OpenSsl-Static.dir/entrypoints.c.o
ninja: build stopped: subcommand failed.
~/work/runtime/runtime/src/coreclr
Failed to build "CoreCLR component".
/home/runner/work/runtime/runtime/src/coreclr/runtime.proj(120,5): error MSB3073: The command ""/home/runner/work/runtime/runtime/src/coreclr/build-runtime.sh" -arm -release -cross -os linux -ninja -targetrid linux-arm -cmakeargs "-DCLR_DOTNET_RID=linux-arm" -cmakeargs "-DCLR_DOTNET_HOST_PATH='/home/runner/work/runtime/runtime/.dotnet/dotnet'" -cmakeargs "-DCDAC_BUILD_TOOL_BINARY_PATH=/home/runner/work/runtime/runtime/artifacts/bin/coreclr/linux.arm.Release/cdac-build-tool/cdac-build-tool.dll" -cmakeargs "-DFEATURE_DYNAMIC_CODE_COMPILED=1" " exited with code 1.

Build FAILED.

/home/runner/work/runtime/runtime/src/coreclr/runtime.proj(120,5): error MSB3073: The command ""/home/runner/work/runtime/runtime/src/coreclr/build-runtime.sh" -arm -release -cross -os linux -ninja -targetrid linux-arm -cmakeargs "-DCLR_DOTNET_RID=linux-arm" -cmakeargs "-DCLR_DOTNET_HOST_PATH='/home/runner/work/runtime/runtime/.dotnet/dotnet'" -cmakeargs "-DCDAC_BUILD_TOOL_BINARY_PATH=/home/runner/work/runtime/runtime/artifacts/bin/coreclr/linux.arm.Release/cdac-build-tool/cdac-build-tool.dll" -cmakeargs "-DFEATURE_DYNAMIC_CODE_COMPILED=1" " exited with code 1.
0 Warning(s)
1 Error(s)

Time Elapsed 00:08:00.75
Build failed with exit code 1. Check errors above.
Error: Process completed with exit code 1.

…_64BIT_TIME_T)

Co-authored-by: maikebing <3445167+maikebing@users.noreply.github.com>

Copilot AI commented Jun 3, 2026

Copy link
Copy Markdown
Author

@copilot FAILED: [code=1] libs-native/System.Security.Cryptography.Native/CMakeFiles/objlib.dir/opensslshim.c.o
/usr/bin/clang-15 --target=arm-linux-gnueabihf --gcc-toolchain=/hom...

已修复。

根因(非 workflow bug,是平台支持下限):.NET 10 在 ARM32 Linux 上强制要求 64 位 time_t(Y2038 安全),eng/native/configurecompiler.cmake 无条件 -D_TIME_BITS=64。而 _TIME_BITS=64 需要 glibc ≥ 2.34;Debian 10 buster 是 glibc 2.28,该宏被静默忽略,time_t 仍是 32 位,于是 opensslshim.c:199static_assert(sizeof(time_t)==8) 失败。换言之,官方 的 .NET 10 arm32 最低就是 glibc 2.34(Debian 12 / Ubuntu 22.04),buster/2.28 本不在支持范围内。

为兑现本 PR「glibc ≤ 2.28」的目标,新增可选退化开关,只影响显式启用它的构建:

  1. configurecompiler.cmake:当 CLR_DISABLE_64BIT_TIME_T=1 时跳过 -D_TIME_BITS=64(默认/未设置时行为不变)。
  2. opensslshim.c:把 64 位 time_tstatic_assert 包在 #if defined(_TIME_BITS) && _TIME_BITS==64 内;32 位模式下不再触发,原有 32/64 位 libssl 探测逻辑仍保留并自洽。
  3. workflow 构建步骤导出 CLR_DISABLE_64BIT_TIME_T=1,使 arm32 产物以 32 位 time_t 链接 glibc 2.28。

⚠️ 代价:该配置使用 32 位 time_t不具备 Y2038 安全性(2038-01-19 之后的时间/证书有效期会溢出)。这是锁定 glibc 2.28 的固有取舍。如果你的目标设备 glibc 实际 ≥ 2.34,更稳妥的做法是把 rootfs 从 buster 换成 bookworm(glibc 2.36)并保持 64 位 time_t——告诉我即可改。

校验:CodeQL 0 告警;cmake 条件已用 cmake -P 验证(未设置/=0 定义 _TIME_BITS=64=1 跳过);YAML 解析通过;确认 native 构建内无其它 64 位 time_t 硬性断言。

Copilot AI changed the title ci: arm32 (glibc&lt;=2.28) native-only build, remove other workflows ci: arm32 (glibc<=2.28) native-only build, remove other workflows Jun 3, 2026
@maikebing

Copy link
Copy Markdown
Member

@copilot roduct binaries are available at /home/runner/work/runtime/runtime/artifacts/bin/coreclr/linux.arm.Release/x64
runincontext -> /home/runner/work/runtime/runtime/artifacts/bin/coreclr/linux.arm.Release/runincontext.dll
tieringtest -> /home/runner/work/runtime/runtime/artifacts/bin/coreclr/linux.arm.Release/tieringtest.dll
ILCompiler.TypeSystem -> /home/runner/work/runtime/runtime/artifacts/bin/ILCompiler.TypeSystem/arm/Release/ILCompiler.TypeSystem.dll
ILCompiler.Diagnostics -> /home/runner/work/runtime/runtime/artifacts/bin/ILCompiler.Diagnostics/arm/Release/ILCompiler.Diagnostics.dll
ILCompiler.Reflection.ReadyToRun -> /home/runner/work/runtime/runtime/artifacts/bin/coreclr/linux.arm.Release/ILCompiler.Reflection.ReadyToRun.dll
R2RDump -> /home/runner/work/runtime/runtime/artifacts/bin/coreclr/linux.arm.Release/R2RDump/R2RDump.dll
dotnet-pgo -> /home/runner/work/runtime/runtime/artifacts/bin/coreclr/linux.arm.Release/dotnet-pgo/dotnet-pgo.dll
repro -> /home/runner/work/runtime/runtime/artifacts/bin/repro/arm/Release/repro.dll
R2RTest -> /home/runner/work/runtime/runtime/artifacts/bin/coreclr/linux.arm.Release/R2RTest/R2RTest.dll
PdbChecker -> /home/runner/work/runtime/runtime/artifacts/bin/coreclr/linux.arm.Release/PdbChecker/PdbChecker.dll
AssemblyChecker -> /home/runner/work/runtime/runtime/artifacts/bin/coreclr/linux.arm.Release/AssemblyChecker/AssemblyChecker.dll
ILVerify -> /home/runner/work/runtime/runtime/artifacts/bin/ILVerify/arm/Release/ILVerify.dll
ILVerification -> /home/runner/work/runtime/runtime/artifacts/bin/ILVerification/arm/Release/ILVerification.dll
ILCompiler.DependencyAnalysisFramework -> /home/runner/work/runtime/runtime/artifacts/bin/ILCompiler.DependencyAnalysisFramework/arm/Release/ILCompiler.DependencyAnalysisFramework.dll
ILTrim.Core -> /home/runner/work/runtime/runtime/artifacts/bin/ILTrim.Core/arm/Release/ILTrim.Core.dll
ILTrim -> /home/runner/work/runtime/runtime/artifacts/bin/ILTrim/arm/Release/ILTrim.dll
Microsoft.Diagnostics.DataContractReader.DataGenerator -> /home/runner/work/runtime/runtime/artifacts/bin/Microsoft.Diagnostics.DataContractReader.DataGenerator/Release/Microsoft.Diagnostics.DataContractReader.DataGenerator.dll
Microsoft.Diagnostics.DataContractReader.Abstractions -> /home/runner/work/runtime/runtime/artifacts/bin/Microsoft.Diagnostics.DataContractReader.Abstractions/Release/Microsoft.Diagnostics.DataContractReader.Abstractions.dll
Microsoft.Diagnostics.DataContractReader.Contracts -> /home/runner/work/runtime/runtime/artifacts/bin/Microsoft.Diagnostics.DataContractReader.Contracts/Release/Microsoft.Diagnostics.DataContractReader.Contracts.dll
Microsoft.Diagnostics.DataContractReader -> /home/runner/work/runtime/runtime/artifacts/bin/Microsoft.Diagnostics.DataContractReader/Release/Microsoft.Diagnostics.DataContractReader.dll
StressLogAnalyzer -> /home/runner/work/runtime/runtime/artifacts/bin/StressLogAnalyzer/Release/net11.0/StressLogAnalyzer.dll
ILCompiler.MetadataTransform -> /home/runner/work/runtime/runtime/artifacts/bin/ILCompiler.MetadataTransform/arm/Release/ILCompiler.MetadataTransform.dll
ILCompiler.Compiler -> /home/runner/work/runtime/runtime/artifacts/bin/ILCompiler.Compiler/arm/Release/ILCompiler.Compiler.dll
ILCompiler.RyuJit -> /home/runner/work/runtime/runtime/artifacts/bin/ILCompiler.RyuJit/arm/Release/ILCompiler.RyuJit.dll
ILCompiler_inbuild -> /home/runner/work/runtime/runtime/artifacts/bin/ILCompiler_inbuild/arm/Release/ilc.dll
Optimizing assemblies for size. This process might take a while.
ILCompiler_inbuild -> /home/runner/work/runtime/runtime/artifacts/bin/coreclr/linux.arm.Release/x64/ilc/
ILCompiler.ReadyToRun -> /home/runner/work/runtime/runtime/artifacts/bin/ILCompiler.ReadyToRun/arm/Release/ILCompiler.ReadyToRun.dll
crossgen2_inbuild -> /home/runner/work/runtime/runtime/artifacts/bin/crossgen2_inbuild/arm/Release/crossgen2.dll
Optimizing assemblies for size. This process might take a while.
crossgen2_inbuild -> /home/runner/work/runtime/runtime/artifacts/bin/coreclr/linux.arm.Release/x64/crossgen2/
DownlevelLibraryImportGenerator -> /home/runner/work/runtime/runtime/artifacts/bin/DownlevelLibraryImportGenerator/Release/netstandard2.0/Microsoft.Interop.LibraryImportGenerator.Downlevel.dll
ILCompiler.Build.Tasks -> /home/runner/work/runtime/runtime/artifacts/bin/coreclr/linux.arm.Release/ilc-published/netstandard/ILCompiler.Build.Tasks.dll
ILCompiler_publish -> /home/runner/work/runtime/runtime/artifacts/bin/ILCompiler_publish/arm/Release/ilc.dll
Generating native code
ld.lld : error : undefined symbol: __stat64_time64 [/home/runner/work/runtime/runtime/src/coreclr/tools/aot/ILCompiler/ILCompiler_publish.csproj]

referenced by pal_io.c:252 (/__w/1/s/src/runtime/src/native/libs/System.Native/pal_io.c:252)
pal_io.c.o:(SystemNative_Stat) in archive /home/runner/.nuget/packages/microsoft.netcore.app.runtime.nativeaot.linux-arm/11.0.0-preview.5.26227.104/runtimes/linux-arm/native/libSystem.Native.a

ld.lld : error : undefined symbol: __fstat64_time64 [/home/runner/work/runtime/runtime/src/coreclr/tools/aot/ILCompiler/ILCompiler_publish.csproj]

referenced by pal_io.c:266 (/__w/1/s/src/runtime/src/native/libs/System.Native/pal_io.c:266)
pal_io.c.o:(SystemNative_FStat) in archive /home/runner/.nuget/packages/microsoft.netcore.app.runtime.nativeaot.linux-arm/11.0.0-preview.5.26227.104/runtimes/linux-arm/native/libSystem.Native.a
referenced by pal_io.c:1547 (/__w/1/s/src/runtime/src/native/libs/System.Native/pal_io.c:1547)
pal_io.c.o:(SystemNative_CopyFile) in archive /home/runner/.nuget/packages/microsoft.netcore.app.runtime.nativeaot.linux-arm/11.0.0-preview.5.26227.104/runtimes/linux-arm/native/libSystem.Native.a

ld.lld : error : undefined symbol: __lstat64_time64 [/home/runner/work/runtime/runtime/src/coreclr/tools/aot/ILCompiler/ILCompiler_publish.csproj]

referenced by pal_io.c:279 (/__w/1/s/src/runtime/src/native/libs/System.Native/pal_io.c:279)
pal_io.c.o:(SystemNative_LStat) in archive /home/runner/.nuget/packages/microsoft.netcore.app.runtime.nativeaot.linux-arm/11.0.0-preview.5.26227.104/runtimes/linux-arm/native/libSystem.Native.a

ld.lld : error : undefined symbol: __fcntl_time64 [/home/runner/work/runtime/runtime/src/coreclr/tools/aot/ILCompiler/ILCompiler_publish.csproj]

referenced by pal_io.c:445 (/__w/1/s/src/runtime/src/native/libs/System.Native/pal_io.c:445)
pal_io.c.o:(SystemNative_MemfdCreate) in archive /home/runner/.nuget/packages/microsoft.netcore.app.runtime.nativeaot.linux-arm/11.0.0-preview.5.26227.104/runtimes/linux-arm/native/libSystem.Native.a
referenced by pal_io.c:713 (/__w/1/s/src/runtime/src/native/libs/System.Native/pal_io.c:713)
pal_io.c.o:(SystemNative_Pipe) in archive /home/runner/.nuget/packages/microsoft.netcore.app.runtime.nativeaot.linux-arm/11.0.0-preview.5.26227.104/runtimes/linux-arm/native/libSystem.Native.a
referenced by pal_io.c:728 (/__w/1/s/src/runtime/src/native/libs/System.Native/pal_io.c:728)
pal_io.c.o:(SystemNative_Pipe) in archive /home/runner/.nuget/packages/microsoft.netcore.app.runtime.nativeaot.linux-arm/11.0.0-preview.5.26227.104/runtimes/linux-arm/native/libSystem.Native.a
referenced 5 more times

ld.lld : error : undefined symbol: __ioctl_time64 [/home/runner/work/runtime/runtime/src/coreclr/tools/aot/ILCompiler/ILCompiler_publish.csproj]

referenced by pal_io.c:1473 (/__w/1/s/src/runtime/src/native/libs/System.Native/pal_io.c:1473)
pal_io.c.o:(SystemNative_CopyFile) in archive /home/runner/.nuget/packages/microsoft.netcore.app.runtime.nativeaot.linux-arm/11.0.0-preview.5.26227.104/runtimes/linux-arm/native/libSystem.Native.a
referenced by pal_console.c:27 (/__w/1/s/src/runtime/src/native/libs/System.Native/pal_console.c:27)
pal_console.c.o:(SystemNative_GetWindowSize) in archive /home/runner/.nuget/packages/microsoft.netcore.app.runtime.nativeaot.linux-arm/11.0.0-preview.5.26227.104/runtimes/linux-arm/native/libSystem.Native.a
referenced by ep-session-provider.c:188 (/__w/1/s/src/runtime/src/native/eventpipe/ep-session-provider.c:188)
unity_0_cxx.cxx.o:(session_disable_user_events(_EventPipeSession*)) in archive /home/runner/.nuget/packages/microsoft.netcore.app.runtime.nativeaot.linux-arm/11.0.0-preview.5.26227.104/runtimes/linux-arm/native/libeventpipe-enabled.a
referenced 3 more times

ld.lld : error : undefined symbol: __futimens64 [/home/runner/work/runtime/runtime/src/coreclr/tools/aot/ILCompiler/ILCompiler_publish.csproj]

referenced by pal_io.c:1557 (/__w/1/s/src/runtime/src/native/libs/System.Native/pal_io.c:1557)
pal_io.c.o:(SystemNative_CopyFile) in archive /home/runner/.nuget/packages/microsoft.netcore.app.runtime.nativeaot.linux-arm/11.0.0-preview.5.26227.104/runtimes/linux-arm/native/libSystem.Native.a

ld.lld : error : undefined symbol: __getrusage64 [/home/runner/work/runtime/runtime/src/coreclr/tools/aot/ILCompiler/ILCompiler_publish.csproj]

referenced by pal_time.c:122 (/__w/1/s/src/runtime/src/native/libs/System.Native/pal_time.c:122)
pal_time.c.o:(SystemNative_GetCpuUtilization) in archive /home/runner/.nuget/packages/microsoft.netcore.app.runtime.nativeaot.linux-arm/11.0.0-preview.5.26227.104/runtimes/linux-arm/native/libSystem.Native.a

ld.lld : error : undefined symbol: __clock_gettime64 [/home/runner/work/runtime/runtime/src/coreclr/tools/aot/ILCompiler/ILCompiler_publish.csproj]

referenced by pal_datetime.c:32 (/__w/1/s/src/runtime/src/native/libs/System.Native/pal_datetime.c:32)
pal_datetime.c.o:(SystemNative_GetSystemTimeAsTicks) in archive /home/runner/.nuget/packages/microsoft.netcore.app.runtime.nativeaot.linux-arm/11.0.0-preview.5.26227.104/runtimes/linux-arm/native/libSystem.Native.a
referenced by pal_threading.c:180 (/__w/1/s/src/runtime/src/native/libs/System.Native/pal_threading.c:180)
pal_threading.c.o:(SystemNative_LowLevelMonitor_TimedWait) in archive /home/runner/.nuget/packages/microsoft.netcore.app.runtime.nativeaot.linux-arm/11.0.0-preview.5.26227.104/runtimes/linux-arm/native/libSystem.Native.a
referenced by PalUnix.cpp:701 (/__w/1/s/src/runtime/src/coreclr/nativeaot/Runtime/unix/PalUnix.cpp:701)
PalUnix.cpp.o:(PalSleep(unsigned int)) in archive /home/runner/.nuget/packages/microsoft.netcore.app.runtime.nativeaot.linux-arm/11.0.0-preview.5.26227.104/runtimes/linux-arm/native/libRuntime.ServerGC.a
referenced 7 more times

ld.lld : error : undefined symbol: __pthread_cond_timedwait64 [/home/runner/work/runtime/runtime/src/coreclr/tools/aot/ILCompiler/ILCompiler_publish.csproj]

referenced by pal_threading.c:195 (/__w/1/s/src/runtime/src/native/libs/System.Native/pal_threading.c:195)
pal_threading.c.o:(SystemNative_LowLevelMonitor_TimedWait) in archive /home/runner/.nuget/packages/microsoft.netcore.app.runtime.nativeaot.linux-arm/11.0.0-preview.5.26227.104/runtimes/linux-arm/native/libSystem.Native.a
referenced by PalUnix.cpp:373 (/__w/1/s/src/runtime/src/coreclr/nativeaot/Runtime/unix/PalUnix.cpp:373)
PalUnix.cpp.o:(UnixEvent::Wait(unsigned int)) in archive /home/runner/.nuget/packages/microsoft.netcore.app.runtime.nativeaot.linux-arm/11.0.0-preview.5.26227.104/runtimes/linux-arm/native/libRuntime.ServerGC.a
referenced by events.cpp:175 (/__w/1/s/src/runtime/src/coreclr/gc/unix/events.cpp:175)
events.cpp.o:(GCEvent::Impl::Wait(unsigned int, bool)) in archive /home/runner/.nuget/packages/microsoft.netcore.app.runtime.nativeaot.linux-arm/11.0.0-preview.5.26227.104/runtimes/linux-arm/native/libRuntime.ServerGC.a

ld.lld : error : undefined symbol: __clock_nanosleep_time64 [/home/runner/work/runtime/runtime/src/coreclr/tools/aot/ILCompiler/ILCompiler_publish.csproj]

referenced by PalUnix.cpp:703 (/__w/1/s/src/runtime/src/coreclr/nativeaot/Runtime/unix/PalUnix.cpp:703)
PalUnix.cpp.o:(PalSleep(unsigned int)) in archive /home/runner/.nuget/packages/microsoft.netcore.app.runtime.nativeaot.linux-arm/11.0.0-preview.5.26227.104/runtimes/linux-arm/native/libRuntime.ServerGC.a

ld.lld : error : undefined symbol: __prctl_time64 [/home/runner/work/runtime/runtime/src/coreclr/tools/aot/ILCompiler/ILCompiler_publish.csproj]

referenced by PalCreateDump.cpp:288 (/__w/1/s/src/runtime/src/coreclr/nativeaot/Runtime/unix/PalCreateDump.cpp:288)
PalCreateDump.cpp.o:(CreateCrashDump(char const**, char*, int)) in archive /home/runner/.nuget/packages/microsoft.netcore.app.runtime.nativeaot.linux-arm/11.0.0-preview.5.26227.104/runtimes/linux-arm/native/libRuntime.ServerGC.a

ld.lld : error : undefined symbol: __nanosleep64 [/home/runner/work/runtime/runtime/src/coreclr/tools/aot/ILCompiler/ILCompiler_publish.csproj]

referenced by gcenv.unix.cpp:350 (/__w/1/s/src/runtime/src/coreclr/gc/unix/gcenv.unix.cpp:350)
gcenv.unix.cpp.o:(GCToOSInterface::Sleep(unsigned int)) in archive /home/runner/.nuget/packages/microsoft.netcore.app.runtime.nativeaot.linux-arm/11.0.0-preview.5.26227.104/runtimes/linux-arm/native/libRuntime.ServerGC.a
referenced by gcenv.unix.cpp:350 (/__w/1/s/src/runtime/src/coreclr/gc/unix/gcenv.unix.cpp:350)
gcenv.unix.cpp.o:(GCToOSInterface::Sleep(unsigned int)) in archive /home/runner/.nuget/packages/microsoft.netcore.app.runtime.nativeaot.linux-arm/11.0.0-preview.5.26227.104/runtimes/linux-arm/native/libRuntime.ServerGC.a
referenced by time.c:175 (/__w/1/s/src/runtime/src/native/minipal/time.c:175)
time.c.o:(minipal_microdelay) in archive /home/runner/.nuget/packages/microsoft.netcore.app.runtime.nativeaot.linux-arm/11.0.0-preview.5.26227.104/runtimes/linux-arm/native/libaotminipal.a
referenced 1 more times

ld.lld : error : undefined symbol: __recvmsg64 [/home/runner/work/runtime/runtime/src/coreclr/tools/aot/ILCompiler/ILCompiler_publish.csproj]

referenced by ds-ipc-pal-socket.c:1596 (/__w/1/s/src/runtime/src/native/eventpipe/ds-ipc-pal-socket.c:1596)
unity_0_cxx.cxx.o:(eventpipe_protocol_helper_collect_tracing(_EventPipeCollectTracingCommandPayload*, _DiagnosticsIpcStream*)) in archive /home/runner/.nuget/packages/microsoft.netcore.app.runtime.nativeaot.linux-arm/11.0.0-preview.5.26227.104/runtimes/linux-arm/native/libeventpipe-enabled.a

ld.lld : error : undefined symbol: __time64 [/home/runner/work/runtime/runtime/src/coreclr/tools/aot/ILCompiler/ILCompiler_publish.csproj]

referenced by ep-rt-aot.h:922 (/__w/1/s/src/runtime/src/coreclr/nativeaot/Runtime/./eventpipe/ep-rt-aot.h:922)
unity_0_cxx.cxx.o:(ep_file_alloc(_StreamWriter*, EventPipeSerializationFormat)) in archive /home/runner/.nuget/packages/microsoft.netcore.app.runtime.nativeaot.linux-arm/11.0.0-preview.5.26227.104/runtimes/linux-arm/native/libeventpipe-enabled.a
referenced by random.c:53 (/__w/1/s/src/runtime/src/native/minipal/random.c:53)
random.c.o:(minipal_get_non_cryptographically_secure_random_bytes) in archive /home/runner/.nuget/packages/microsoft.netcore.app.runtime.nativeaot.linux-arm/11.0.0-preview.5.26227.104/runtimes/linux-arm/native/libaotminipal.a

ld.lld : error : undefined symbol: __gettimeofday64 [/home/runner/work/runtime/runtime/src/coreclr/tools/aot/ILCompiler/ILCompiler_publish.csproj]

referenced by ep-rt-aot.h:924 (/__w/1/s/src/runtime/src/coreclr/nativeaot/Runtime/./eventpipe/ep-rt-aot.h:924)
unity_0_cxx.cxx.o:(ep_file_alloc(_StreamWriter*, EventPipeSerializationFormat)) in archive /home/runner/.nuget/packages/microsoft.netcore.app.runtime.nativeaot.linux-arm/11.0.0-preview.5.26227.104/runtimes/linux-arm/native/libeventpipe-enabled.a

ld.lld : error : undefined symbol: __gmtime64 [/home/runner/work/runtime/runtime/src/coreclr/tools/aot/ILCompiler/ILCompiler_publish.csproj]

referenced by ep-rt-aot.h:926 (/__w/1/s/src/runtime/src/coreclr/nativeaot/Runtime/./eventpipe/ep-rt-aot.h:926)
unity_0_cxx.cxx.o:(ep_file_alloc(_StreamWriter*, EventPipeSerializationFormat)) in archive /home/runner/.nuget/packages/microsoft.netcore.app.runtime.nativeaot.linux-arm/11.0.0-preview.5.26227.104/runtimes/linux-arm/native/libeventpipe-enabled.a
clang : error : linker command failed with exit code 1 (use -v to see invocation) [/home/runner/work/runtime/runtime/src/coreclr/tools/aot/ILCompiler/ILCompiler_publish.csproj]
/home/runner/.nuget/packages/microsoft.dotnet.ilcompiler/11.0.0-preview.5.26227.104/build/Microsoft.NETCore.Native.targets(370,5): error MSB3073: The command ""/usr/bin/clang-15" "/home/runner/work/runtime/runtime/artifacts/obj/coreclr/ILCompiler_publish/linux.arm.Release/native/ilc.o" -o "/home/runner/work/runtime/runtime/artifacts/bin/ILCompiler_publish/arm/Release/native/ilc" -Wl,--version-script="/home/runner/work/runtime/runtime/artifacts/obj/coreclr/ILCompiler_publish/linux.arm.Release/native/ilc.exports" -Wl,--export-dynamic -gz=zlib -fuse-ld=lld /home/runner/.nuget/packages/microsoft.netcore.app.runtime.nativeaot.linux-arm/11.0.0-preview.5.26227.104/runtimes/linux-arm/native/libSystem.Native.a /home/runner/.nuget/packages/microsoft.netcore.app.runtime.nativeaot.linux-arm/11.0.0-preview.5.26227.104/runtimes/linux-arm/native/libSystem.IO.Compression.Native.a /home/runner/.nuget/packages/microsoft.netcore.app.runtime.nativeaot.linux-arm/11.0.0-preview.5.26227.104/runtimes/linux-arm/native/libSystem.Net.S
Build FAILED.
ld.lld : error : undefined symbol: __stat64_time64 [/home/runner/work/runtime/runtime/src/coreclr/tools/aot/ILCompiler/ILCompiler_publish.csproj]
ld.lld : error : undefined symbol: __fstat64_time64 [/home/runner/work/runtime/runtime/src/coreclr/tools/aot/ILCompiler/ILCompiler_publish.csproj]
ld.lld : error : undefined symbol: __lstat64_time64 [/home/runner/work/runtime/runtime/src/coreclr/tools/aot/ILCompiler/ILCompiler_publish.csproj]
ld.lld : error : undefined symbol: __fcntl_time64 [/home/runner/work/runtime/runtime/src/coreclr/tools/aot/ILCompiler/ILCompiler_publish.csproj]
ld.lld : error : undefined symbol: __ioctl_time64 [/home/runner/work/runtime/runtime/src/coreclr/tools/aot/ILCompiler/ILCompiler_publish.csproj]
ld.lld : error : undefined symbol: __futimens64 [/home/runner/work/runtime/runtime/src/coreclr/tools/aot/ILCompiler/ILCompiler_publish.csproj]
ld.lld : error : undefined symbol: __getrusage64 [/home/runner/work/runtime/runtime/src/coreclr/tools/aot/ILCompiler/ILCompiler_publish.csproj]
ld.lld : error : undefined symbol: __clock_gettime64 [/home/runner/work/runtime/runtime/src/coreclr/tools/aot/ILCompiler/ILCompiler_publish.csproj]
ld.lld : error : undefined symbol: __pthread_cond_timedwait64 [/home/runner/work/runtime/runtime/src/coreclr/tools/aot/ILCompiler/ILCompiler_publish.csproj]
ld.lld : error : undefined symbol: __clock_nanosleep_time64 [/home/runner/work/runtime/runtime/src/coreclr/tools/aot/ILCompiler/ILCompiler_publish.csproj]
ld.lld : error : undefined symbol: __prctl_time64 [/home/runner/work/runtime/runtime/src/coreclr/tools/aot/ILCompiler/ILCompiler_publish.csproj]
ld.lld : error : undefined symbol: __nanosleep64 [/home/runner/work/runtime/runtime/src/coreclr/tools/aot/ILCompiler/ILCompiler_publish.csproj]
ld.lld : error : undefined symbol: __recvmsg64 [/home/runner/work/runtime/runtime/src/coreclr/tools/aot/ILCompiler/ILCompiler_publish.csproj]
ld.lld : error : undefined symbol: __time64 [/home/runner/work/runtime/runtime/src/coreclr/tools/aot/ILCompiler/ILCompiler_publish.csproj]
ld.lld : error : undefined symbol: __gettimeofday64 [/home/runner/work/runtime/runtime/src/coreclr/tools/aot/ILCompiler/ILCompiler_publish.csproj]
ld.lld : error : undefined symbol: __gmtime64 [/home/runner/work/runtime/runtime/src/coreclr/tools/aot/ILCompiler/ILCompiler_publish.csproj]
clang : error : linker command failed with exit code 1 (use -v to see invocation) [/home/runner/work/runtime/runtime/src/coreclr/tools/aot/ILCompiler/ILCompiler_publish.csproj]
/home/runner/.nuget/packages/microsoft.dotnet.ilcompiler/11.0.0-preview.5.26227.104/build/Microsoft.NETCore.Native.targets(370,5): error MSB3073: The command ""/usr/bin/clang-15" "/home/runner/work/runtime/runtime/artifacts/obj/coreclr/ILCompiler_publish/linux.arm.Release/native/ilc.o" -o "/home/runner/work/runtime/runtime/artifacts/bin/ILCompiler_publish/arm/Release/native/ilc" -Wl,--version-script="/home/runner/work/runtime/runtime/artifacts/obj/coreclr/ILCompiler_publish/linux.arm.Release/native/ilc.exports" -Wl,--export-dynamic -gz=zlib -fuse-ld=lld /home/runner/.nuget/packages/microsoft.netcore.app.runtime.nativeaot.linux-arm/11.0.0-preview.5.26227.104/runtimes/linux-arm/native/libSystem.Native.a /home/runner/.nuget/packages/microsoft.netcore.app.runtime.nativeaot.linux-arm/11.0.0-preview.5.26227.104/runtimes/linux-arm/native/libSystem.IO.Compression.Native.a /home/runner/.nuget/packages/microsoft.netcore.app.runtime.nativeaot.linux-arm/11.0.0-preview.5.26227.104/runtimes/linux-arm/native/libSystem.Net.S
0 Warning(s)
18 Error(s)
Time Elapsed 00:17:08.00
Build failed with exit code 1. Check errors above.
Error: Process completed with exit code 1.

…r arm32 lowglibc

Co-authored-by: maikebing <3445167+maikebing@users.noreply.github.com>

Copilot AI commented Jun 3, 2026

Copy link
Copy Markdown
Author

@copilot roduct binaries are available at /home/runner/work/runtime/runtime/artifacts/bin/coreclr/linux.arm.Release/x64
runincontext -> /home/runner/work/runtime/runtime/artifacts/bin/coreclr/linux...

日志里那些 .dll(ILCompiler / R2RDump / ILVerify / dotnet-pgo …)是 托管 程序集,来自 subset 中的裸 clr/libs——它们会把 CoreLib、crossgen2 和一堆托管工具全部编译,违背「native-only 只出 .so」的目标,也白白拉长构建时间。

已把 subset 检测改为优先用 .native 子集(release/10.0Clr.Native / Libs.Native / Host.Native 均存在):

  • 三者都在 → clr.native+libs.native+host.native
  • 仅前两者 → clr.native+libs.native
  • 兜底 → clr+libs+host

这样只编译原生 .so 组件,不再构建那些托管 .dll。提交:6298e54 的后续 commit。

@maikebing

Copy link
Copy Markdown
Member

@copilot 下面这些报错如果不能编译通过会不会有问题? 如果缺少这些符号, 我们是不是 也需要兼容一下? 在原生动态库里面
ld.lld : error : undefined symbol: __stat64_time64 [/home/runner/work/runtime/runtime/src/coreclr/tools/aot/ILCompiler/ILCompiler_publish.csproj]
ld.lld : error : undefined symbol: __fstat64_time64 [/home/runner/work/runtime/runtime/src/coreclr/tools/aot/ILCompiler/ILCompiler_publish.csproj]
ld.lld : error : undefined symbol: __lstat64_time64 [/home/runner/work/runtime/runtime/src/coreclr/tools/aot/ILCompiler/ILCompiler_publish.csproj]
ld.lld : error : undefined symbol: __fcntl_time64 [/home/runner/work/runtime/runtime/src/coreclr/tools/aot/ILCompiler/ILCompiler_publish.csproj]
ld.lld : error : undefined symbol: __ioctl_time64 [/home/runner/work/runtime/runtime/src/coreclr/tools/aot/ILCompiler/ILCompiler_publish.csproj]
ld.lld : error : undefined symbol: __futimens64 [/home/runner/work/runtime/runtime/src/coreclr/tools/aot/ILCompiler/ILCompiler_publish.csproj]
ld.lld : error : undefined symbol: __getrusage64 [/home/runner/work/runtime/runtime/src/coreclr/tools/aot/ILCompiler/ILCompiler_publish.csproj]
ld.lld : error : undefined symbol: __clock_gettime64 [/home/runner/work/runtime/runtime/src/coreclr/tools/aot/ILCompiler/ILCompiler_publish.csproj]
ld.lld : error : undefined symbol: __pthread_cond_timedwait64 [/home/runner/work/runtime/runtime/src/coreclr/tools/aot/ILCompiler/ILCompiler_publish.csproj]
ld.lld : error : undefined symbol: __clock_nanosleep_time64 [/home/runner/work/runtime/runtime/src/coreclr/tools/aot/ILCompiler/ILCompiler_publish.csproj]
ld.lld : error : undefined symbol: __prctl_time64 [/home/runner/work/runtime/runtime/src/coreclr/tools/aot/ILCompiler/ILCompiler_publish.csproj]
ld.lld : error : undefined symbol: __nanosleep64 [/home/runner/work/runtime/runtime/src/coreclr/tools/aot/ILCompiler/ILCompiler_publish.csproj]
ld.lld : error : undefined symbol: __recvmsg64 [/home/runner/work/runtime/runtime/src/coreclr/tools/aot/ILCompiler/ILCompiler_publish.csproj]
ld.lld : error : undefined symbol: __time64 [/home/runner/work/runtime/runtime/src/coreclr/tools/aot/ILCompiler/ILCompiler_publish.csproj]
ld.lld : error : undefined symbol: __gettimeofday64 [/home/runner/work/runtime/runtime/src/coreclr/tools/aot/ILCompiler/ILCompiler_publish.csproj]
ld.lld : error : undefined symbol: __gmtime64

Copilot AI commented Jun 3, 2026

Copy link
Copy Markdown
Author

@copilot 下面这些报错如果不能编译通过会不会有问题? 如果缺少这些符号, 我们是不是 也需要兼容一下? 在原生动态库里面
ld.lld : error : undefined...

不需要在原生动态库里兼容这些符号,这些报错不会影响我们的目标产物。

来源:这些 undefined symbol: __stat64_time64 / __clock_gettime64 / __fcntl_time64 … 都来自 ILCompiler_publish.csproj —— 即 NativeAOT 的 ILCompiler 编译器工具。它是被 clr.tools 子集构建的(旧 subset 里裸 clr = DefaultCoreClrSubsets 会拉进 clr.tools,见 eng/Subsets.props:110/489)。该日志来自上一次运行(commit 6298e54,仍用旧 subset clr+libs+host.native)。

这些符号是什么__*_time64 是 glibc ≥ 2.34 才导出的 64 位 time_t 入口点。NativeAOT 工具链里有部分对象按 _TIME_BITS=64 编译,再链接 buster 的 glibc 2.28(无这些符号)就报 undefined —— 这跟 opensslshim 的 64 位 time_t 是同一个根因。

为什么不用兼容

  1. 我们的运行时 .solibcoreclr.so 等)经 configurecompiler.cmake + CLR_DISABLE_64BIT_TIME_T=132 位 time_t 编译,根本不引用 *_time64 符号,链接 glibc 2.28 没问题。
  2. ILCompiler构建期工具,不是我们要打包的原生 .so;native-only 产物里不含它。

上一条已把 subset 改成 clr.native+libs.native+host.nativeclr.native 是纯 CMake 原生构建(ClrFullNativeBuild=trueeng/Subsets.props:318),不含 clr.tools,因此根本不会编译/链接 ILCompiler,这些 __*_time64 报错也就不会出现。

当前运行(commit f1d9f898,native-only subset)已通过 rootfs 构建并进入「Build native runtime」步骤,未再触发 ILCompiler。所以无需改动代码。

… on __USE_TIME_BITS64

Co-authored-by: maikebing <3445167+maikebing@users.noreply.github.com>
Copilot AI changed the title ci: arm32 (glibc<=2.28) native-only build, remove other workflows ci: arm32 (glibc&lt;=2.28) native-only build, remove other workflows Jun 3, 2026
@maikebing maikebing marked this pull request as ready for review June 3, 2026 09:40
Copilot AI review requested due to automatic review settings June 3, 2026 09:40
@maikebing maikebing merged commit e35107e into release/10.0 Jun 3, 2026
8 checks passed
@maikebing maikebing deleted the copilot/release100 branch June 3, 2026 09:41
Copilot AI review requested due to automatic review settings June 3, 2026 10:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants