Skip to content

[2.x] Fix #8441: Allow system JNA on OpenBSD by making jna.nosys conditional#8452

Merged
eed3si9n merged 1 commit intosbt:developfrom
calm329:fix/8441-jna-nosys-conditional
Jan 9, 2026
Merged

[2.x] Fix #8441: Allow system JNA on OpenBSD by making jna.nosys conditional#8452
eed3si9n merged 1 commit intosbt:developfrom
calm329:fix/8441-jna-nosys-conditional

Conversation

@calm329
Copy link
Copy Markdown
Contributor

@calm329 calm329 commented Jan 8, 2026

Fix #8441: Allow system JNA on OpenBSD

Problem

On OpenBSD 7.8+, sbt fails with undefined symbol '__sF' because the bundled JNA native library (libjnidispatch.so) is incompatible with recent OpenBSD ABI changes.

sbt unconditionally sets jna.nosys=true which prevents users from using a system-installed JNA library as a workaround.

Solution

Only set jna.nosys=true if not already specified by the user. This allows OpenBSD users (and others with similar issues) to use -Djna.nosys=false to load JNA from the system path instead of the bundled version.

Changes

  • Main.scala: Added conditional check at the start of xMain.run (before bootServerSocket triggers JNA initialization)
  • Main.scala: Changed StandardMain.initialState to conditional
  • Scripted.scala: Changed to conditional
  • RunFromSourceMain.scala: Changed to conditional

Usage

OpenBSD 7.8+ users can now work around the issue with:

sbt -Djna.nosys=false

Contribution by Gittensor, see my contribution statistics at https://gittensor.io/miners/details?githubId=148254234

@calm329 calm329 force-pushed the fix/8441-jna-nosys-conditional branch from 670584d to 1054ee8 Compare January 8, 2026 23:19
@eed3si9n eed3si9n changed the title Fix #8441: Allow system JNA on OpenBSD by making jna.nosys conditional [2.x] Fix #8441: Allow system JNA on OpenBSD by making jna.nosys conditional Jan 8, 2026
@eed3si9n eed3si9n merged commit b537afe into sbt:develop Jan 9, 2026
14 checks passed
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.

sbt leads to undefined symbol '__sF' on OpenBSD 7.8

2 participants