Skip to content

Link libgssapi.so.9.0 on OpenBSD for AOT libs#129580

Merged
MichalStrehovsky merged 3 commits into
dotnet:mainfrom
am11:patch-53
Jun 19, 2026
Merged

Link libgssapi.so.9.0 on OpenBSD for AOT libs#129580
MichalStrehovsky merged 3 commits into
dotnet:mainfrom
am11:patch-53

Conversation

@am11

@am11 am11 commented Jun 18, 2026

Copy link
Copy Markdown
Member

When building full libs.tests subset, log checker was failing:

root [ /runtime ]# ./build.sh libs.tests --cross --os openbsd --arch x64 --use-bootstrap -c Release -p:ArchiveTests=true
...
  XUnitLogChecker -> /runtime/artifacts/tests/coreclr/openbsd.x64.Release/Common/XUnitLogChecker/XUnitLogChecker/XUnitLogChecker.dll
  Generating native code
ld.lld : error : undefined symbol: krb5_cc_get_lifetime [/runtime/src/tests/Common/XUnitLogChecker/XUnitLogChecker.csproj]
  >>> referenced by acquire_cred.c
  >>>               acquire_cred.o:(__gsskrb5_ccache_lifetime) in archive /crossrootfs/x64/usr/local/heimdal/lib/libgssapi.a
  >>> referenced by acquire_cred.c
  >>>               acquire_cred.o:(acquire_cred_with_password) in archive /crossrootfs/x64/usr/local/heimdal/lib/libgssapi.a
  >>> referenced by acquire_cred.c
  >>>               acquire_cred.o:(acquire_initiator_cred) in archive /crossrootfs/x64/usr/local/heimdal/lib/libgssapi.a
  >>> referenced 4 more times

This is something we are using in libs.native subset, so I just aligned with it. Of course we can't link pure static executable / library with .so reference. The working version for static is:

      <LinkerArg Include="-L&quot;$(SysRoot)/usr/local/heimdal/lib&quot; -L&quot;$(SysRoot)/usr/local/lib&quot; -Wl,--start-group -lgssapi -lheimntlm -lkrb5 -lhx509 -lhcrypto -lasn1 -lwind -lroken -lheimbase -lheimsqlite -lcom_err -Wl,--end-group -lcrypto" Condition="'$(_targetOS)' == 'openbsd'" />

but our current rootfs lacks libcom_err (e2fsprogs package), so lets visit it later once other things are sorted out. For now this works.

Contributes to #124911.

@am11 am11 requested a review from MichalStrehovsky as a code owner June 18, 2026 15:49
@dotnet-policy-service dotnet-policy-service Bot added the community-contribution Indicates that the PR has been added by a community member label Jun 18, 2026
@am11 am11 added the os-openbsd OpenBSD OS, currently not officially supported label Jun 18, 2026
@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.

@MichalStrehovsky MichalStrehovsky merged commit 5bad087 into dotnet:main Jun 19, 2026
113 checks passed
@am11 am11 deleted the patch-53 branch June 19, 2026 12:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area-NativeAOT-coreclr community-contribution Indicates that the PR has been added by a community member os-openbsd OpenBSD OS, currently not officially supported

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants