Skip to content

Fix freebsd-arm64 build#130800

Merged
janvorli merged 2 commits into
dotnet:mainfrom
am11:feature/port/freebsd-arm64-fixes
Jul 16, 2026
Merged

Fix freebsd-arm64 build#130800
janvorli merged 2 commits into
dotnet:mainfrom
am11:feature/port/freebsd-arm64-fixes

Conversation

@am11

@am11 am11 commented Jul 15, 2026

Copy link
Copy Markdown
Member

It was failing:

 [55/243] Building CXX object nativeaot/Runtime/Full/CMakeFiles/Runtime.PrivateLibunwind.dir/__/unix/UnwindHelpers.cpp.o
  FAILED: nativeaot/Runtime/Full/CMakeFiles/Runtime.PrivateLibunwind.dir/__/unix/UnwindHelpers.cpp.o 
  /usr/local/bin/clang++ --target=aarch64-unknown-freebsd14 --sysroot=/crossrootfs/arm64 -DBUILDENV_CHECKED=1 -DCOMPILER_SUPPORTS_W_RESERVED_IDENTIFIER -DDEBUG -DDISABLE_CONTRACTS -DFEATURE_CONSERVATIVE_GC -DFEATURE_EVENT_TRACE -DFEATURE_GC_STRESS -DFEATURE_HIJACK -DFEATURE_JAVAMARSHAL -DFEATURE_MANUALLY_MANAGED_CARD_BUNDLES -DFEATURE_NATIVEAOT -DFEATURE_PERFTRACING -DFEATURE_READONLY_GS_COOKIE -DFEATURE_RX_THUNKS -DFEATURE_USE_SOFTWARE_WRITE_WATCH_FOR_GC_HEAP -DGC_DESCRIPTOR -DHOST_64BIT -DHOST_ARM64 -DHOST_UNIX -DNATIVEAOT -DTARGET_64BIT -DTARGET_ARM64 -DTARGET_FREEBSD -DTARGET_UNIX -DURTBLDENV_FRIENDLY=Checked -DVERIFY_HEAP -D_DBG -D_DEBUG -D_FILE_OFFSET_BITS=64 -D_LIB -D_LIBUNWIND_DISABLE_ZERO_COST_APIS=1 -D_LIBUNWIND_IS_NATIVE_ONLY -D_TIME_BITS=64 -I/runtime/artifacts/obj/coreclr/freebsd.arm64.Checked/nativeaot/Runtime/Full -I/runtime/src/coreclr/nativeaot/Runtime/Full -I/runtime/src/native/external/llvm-libunwind/include -I/runtime/src/native -I/runtime/src/native/inc -I/runtime/src/coreclr/pal/prebuilt/inc -I/runtime/artifacts/obj -I/runtime/src/coreclr/nativeaot/Runtime/inc -I/runtime/src/coreclr/nativeaot/Runtime/. -I/runtime/src/coreclr/nativeaot/Runtime/../../gc -I/runtime/src/coreclr/nativeaot/Runtime/../../gc/env -I/runtime/artifacts/obj/coreclr/freebsd.arm64.Checked/nativeaot/Runtime/eventpipe/inc -I/runtime/src/coreclr/runtime -I/runtime/src/coreclr/nativeaot/Runtime/unix -I/runtime/src/coreclr/nativeaot/Runtime/../../pal/inc/rt -I/runtime/src/coreclr/nativeaot/Runtime/arm64 -I/runtime/artifacts/obj/coreclr/freebsd.arm64.Checked/nativeaot/Runtime -std=gnu++17 -fPIC -O2 -g -Wall -Wno-null-conversion -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 -Wvla -Wno-invalid-offsetof -Wno-unused-but-set-variable -ffp-contract=off -fno-rtti -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 -Wno-nontrivial-memaccess -fsigned-char -fvisibility=hidden -ffunction-sections -fdata-sections -fno-exceptions -fno-asynchronous-unwind-tables -nostdlib -MD -MT nativeaot/Runtime/Full/CMakeFiles/Runtime.PrivateLibunwind.dir/__/unix/UnwindHelpers.cpp.o -MF nativeaot/Runtime/Full/CMakeFiles/Runtime.PrivateLibunwind.dir/__/unix/UnwindHelpers.cpp.o.d -o nativeaot/Runtime/Full/CMakeFiles/Runtime.PrivateLibunwind.dir/__/unix/UnwindHelpers.cpp.o -c /runtime/src/coreclr/nativeaot/Runtime/unix/UnwindHelpers.cpp
  In file included from /runtime/src/coreclr/nativeaot/Runtime/unix/UnwindHelpers.cpp:17:
  In file included from /runtime/src/coreclr/nativeaot/Runtime/unix/UnwindHelpers.h:8:
  In file included from /runtime/src/native/external/llvm-libunwind/src/AddressSpace.hpp:23:
  In file included from /runtime/src/native/external/llvm-libunwind/src/EHHeaderParser.hpp:17:
  In file included from /runtime/src/native/external/llvm-libunwind/src/DwarfParser.hpp:22:
  /runtime/src/native/external/llvm-libunwind/src/Registers.hpp:2090:28: error: use of undeclared identifier 'getauxval'
   2090 |     unsigned long hwcap2 = getauxval(AT_HWCAP2);
        |                            ^~~~~~~~~
  1 error generated.
  [56/243] Building CXX object nativeaot/Runtime/Full/CMakeFiles/Runtime.PrivateLibunwind.dir/__/unix/UnixNativeCodeManager.cpp.o
  FAILED: nativeaot/Runtime/Full/CMakeFiles/Runtime.PrivateLibunwind.dir/__/unix/UnixNativeCodeManager.cpp.o 
  /usr/local/bin/clang++ --target=aarch64-unknown-freebsd14 --sysroot=/crossrootfs/arm64 -DBUILDENV_CHECKED=1 -DCOMPILER_SUPPORTS_W_RESERVED_IDENTIFIER -DDEBUG -DDISABLE_CONTRACTS -DFEATURE_CONSERVATIVE_GC -DFEATURE_EVENT_TRACE -DFEATURE_GC_STRESS -DFEATURE_HIJACK -DFEATURE_JAVAMARSHAL -DFEATURE_MANUALLY_MANAGED_CARD_BUNDLES -DFEATURE_NATIVEAOT -DFEATURE_PERFTRACING -DFEATURE_READONLY_GS_COOKIE -DFEATURE_RX_THUNKS -DFEATURE_USE_SOFTWARE_WRITE_WATCH_FOR_GC_HEAP -DGC_DESCRIPTOR -DHOST_64BIT -DHOST_ARM64 -DHOST_UNIX -DNATIVEAOT -DTARGET_64BIT -DTARGET_ARM64 -DTARGET_FREEBSD -DTARGET_UNIX -DURTBLDENV_FRIENDLY=Checked -DVERIFY_HEAP -D_DBG -D_DEBUG -D_FILE_OFFSET_BITS=64 -D_LIB -D_LIBUNWIND_DISABLE_ZERO_COST_APIS=1 -D_LIBUNWIND_IS_NATIVE_ONLY -D_TIME_BITS=64 -I/runtime/artifacts/obj/coreclr/freebsd.arm64.Checked/nativeaot/Runtime/Full -I/runtime/src/coreclr/nativeaot/Runtime/Full -I/runtime/src/native/external/llvm-libunwind/include -I/runtime/src/native -I/runtime/src/native/inc -I/runtime/src/coreclr/pal/prebuilt/inc -I/runtime/artifacts/obj -I/runtime/src/coreclr/nativeaot/Runtime/inc -I/runtime/src/coreclr/nativeaot/Runtime/. -I/runtime/src/coreclr/nativeaot/Runtime/../../gc -I/runtime/src/coreclr/nativeaot/Runtime/../../gc/env -I/runtime/artifacts/obj/coreclr/freebsd.arm64.Checked/nativeaot/Runtime/eventpipe/inc -I/runtime/src/coreclr/runtime -I/runtime/src/coreclr/nativeaot/Runtime/unix -I/runtime/src/coreclr/nativeaot/Runtime/../../pal/inc/rt -I/runtime/src/coreclr/nativeaot/Runtime/arm64 -I/runtime/artifacts/obj/coreclr/freebsd.arm64.Checked/nativeaot/Runtime -std=gnu++17 -fPIC -O2 -g -Wall -Wno-null-conversion -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 -Wvla -Wno-invalid-offsetof -Wno-unused-but-set-variable -ffp-contract=off -fno-rtti -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 -Wno-nontrivial-memaccess -fsigned-char -fvisibility=hidden -ffunction-sections -fdata-sections -fno-exceptions -fno-asynchronous-unwind-tables -nostdlib -MD -MT nativeaot/Runtime/Full/CMakeFiles/Runtime.PrivateLibunwind.dir/__/unix/UnixNativeCodeManager.cpp.o -MF nativeaot/Runtime/Full/CMakeFiles/Runtime.PrivateLibunwind.dir/__/unix/UnixNativeCodeManager.cpp.o.d -o nativeaot/Runtime/Full/CMakeFiles/Runtime.PrivateLibunwind.dir/__/unix/UnixNativeCodeManager.cpp.o -c /runtime/src/coreclr/nativeaot/Runtime/unix/UnixNativeCodeManager.cpp
  In file included from /runtime/src/coreclr/nativeaot/Runtime/unix/UnixNativeCodeManager.cpp:11:
  In file included from /runtime/src/coreclr/nativeaot/Runtime/unix/UnixNativeCodeManager.h:9:
  In file included from /runtime/src/native/external/llvm-libunwind/src/AddressSpace.hpp:23:
  In file included from /runtime/src/native/external/llvm-libunwind/src/EHHeaderParser.hpp:17:
  In file included from /runtime/src/native/external/llvm-libunwind/src/DwarfParser.hpp:22:
  /runtime/src/native/external/llvm-libunwind/src/Registers.hpp:2090:28: error: use of undeclared identifier 'getauxval'
   2090 |     unsigned long hwcap2 = getauxval(AT_HWCAP2);
        |                            ^~~~~~~~~
  1 error generated.
  ninja: build stopped: subcommand failed.
  /runtime/src/coreclr

@am11
am11 requested a review from MichalStrehovsky as a code owner July 15, 2026 16:40
@dotnet-policy-service dotnet-policy-service Bot added the community-contribution Indicates that the PR has been added by a community member label Jul 15, 2026
@am11
am11 requested a review from jkotas July 15, 2026 16:41
@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
Successfully started running 4 pipeline(s).
11 pipeline(s) were filtered out due to trigger conditions.
There may be pipelines that require an authorized user to comment /azp run to run.

@am11

am11 commented Jul 15, 2026

Copy link
Copy Markdown
Member Author

cc @Thefrank, @sec, it regressed in #126155.

@dotnet-policy-service

Copy link
Copy Markdown
Contributor

Tagging subscribers to this area: @agocke, @dotnet/ilc-contrib
See info in area-owners.md if you want to be subscribed.

@am11

am11 commented Jul 16, 2026

Copy link
Copy Markdown
Member Author

cc @janvorli, this fixes the build error and #130901 fixes the runtime error, both net11.0 regressions. Would be nice to get them in before the p7/RC cut. Thanks!

@janvorli janvorli left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

LGTM, thank you!

@janvorli
janvorli merged commit d0eee82 into dotnet:main Jul 16, 2026
190 checks passed
@am11
am11 deleted the feature/port/freebsd-arm64-fixes branch July 16, 2026 20:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

arch-arm64 area-NativeAOT-coreclr community-contribution Indicates that the PR has been added by a community member os-freebsd FreeBSD OS

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants