Repository navigation
Conversation
dbwiddis
force-pushed
the
fix/dragonflybsd-library-loading
branch
from
May 26, 2026 17:04
11d5ced to
85b7567
Compare
DragonFlyBSD platform support was added in java-native-access#1593 but the NativeLibrary fallback paths for versioned .so resolution, libc special-case loading, and 64-bit library search paths were not updated to include it. This causes NoClassDefFoundError when loading libc on DragonFlyBSD because the matchLibrary() fallback and the mapSharedLibraryName() handling only trigger for Linux and FreeBSD.
dbwiddis
force-pushed
the
fix/dragonflybsd-library-loading
branch
from
May 26, 2026 17:17
85b7567 to
08628c0
Compare
matthiasblaesing
approved these changes
May 26, 2026
matthiasblaesing
left a comment
Member
There was a problem hiding this comment.
Makes sense to me. Thanks
markharding
pushed a commit
to futo-org/Harbor
that referenced
this pull request
Oct 23, 2026
This PR contains the following updates: | Package | Change | [Age](https://docs.renovatebot.com/merge-confidence/) | [Confidence](https://docs.renovatebot.com/merge-confidence/) | |---|---|---|---| | [net.java.dev.jna:jna](https://github.com/java-native-access/jna) | `5.18.1` → `5.19.1` |  |  | --- ### Release Notes <details> <summary>java-native-access/jna (net.java.dev.jna:jna)</summary> ### [`v5.19.1`](https://github.com/java-native-access/jna/blob/HEAD/CHANGES.md#Release-5191) [Compare Source](java-native-access/jna@5.19.0...5.19.1) \============== ## Bug Fixes - [#​1730](java-native-access/jna#1730): Replace usage of `MethodHandle` with reflection to restore support for older Android releases - [@​matthiasblaesing](https://github.com/matthiasblaesing). ### [`v5.19.0`](https://github.com/java-native-access/jna/blob/HEAD/CHANGES.md#Release-5190) [Compare Source](java-native-access/jna@5.18.1...5.19.0) \============== ## Features - [#​1696](java-native-access/jna#1696): Add `LARGE_INTEGER.ByValue` to `LARGE_INTEGER` in `WinNT.java` - [@​baier233](https://github.com/baier233). - [#​1697](java-native-access/jna#1697): Add WlanApi module - [@​eranl](https://github.com/eranl). - [#​1718](java-native-access/jna#1718): Add `Cups` to `c.s.j.p.unix` providing CUPS printing system bindings for destinations, jobs, options, and server configuration - [@​dbwiddis](https://github.com/dbwiddis). - [#​1720](java-native-access/jna#1720): Add `groupCount` and `groupMasks` fields to `CACHE_RELATIONSHIP` in `c.s.j.p.win32.WinNT`, matching the updated Windows struct layout - [@​dbwiddis](https://github.com/dbwiddis). - [#​1719](java-native-access/jna#1719): Add `CoreGraphics` to `c.s.j.p.mac` with Quartz Window Services and Display Services bindings; implement `getAllWindows()` in `MacWindowUtils` - [@​dbwiddis](https://github.com/dbwiddis). - [#​1723](java-native-access/jna#1723): Add `ProcFdInfo`, `InSockInfo`, `TcpSockInfo`, `proc_pidfdinfo`, `statfs64`, and `vm_deallocate` to `c.s.j.p.mac.SystemB` - [@​dbwiddis](https://github.com/dbwiddis). - [#​1725](java-native-access/jna#1725): Add `BluetoothApis` to `c.s.j.p.win32` providing Bluetooth device and radio enumeration via `BluetoothFindFirstRadio`, `BluetoothFindFirstDevice`, and related functions - [@​dbwiddis](https://github.com/dbwiddis). ## Bug Fixes - [#​1644](java-native-access/jna#1644): Fix bug in VARDESC and TYPEDESC causing an illegal memory access - [@​lwahonen](https://github.com/lwahonen) - [#​1715](java-native-access/jna#1715): Fix `UdevDevice.getSysname()` calling `udev_device_get_syspath` instead of `udev_device_get_sysname` - [@​dbwiddis](https://github.com/dbwiddis). - [#​1721](java-native-access/jna#1721): Fix switched `serverName`/`domainName` arguments in `Netapi32Util#getDCName` - [@​dbwiddis](https://github.com/dbwiddis). - [#​1722](java-native-access/jna#1722): Fix `Advapi32#RegisterServiceCtrlHandler` using wrong `Handler` type - [@​dbwiddis](https://github.com/dbwiddis). - [#​1636](java-native-access/jna#1636): Drop hard dependency on java.lang.SecurityManager/java.security.AccessController - [@​matthiasblaesing](https://github.com/matthiasblaesing). - [#​1724](java-native-access/jna#1724): Fix `host_page_size` in `c.s.j.p.mac.SystemB` and `getxattr`/`setxattr`/`listxattr` in `c.s.j.p.mac.XAttr` using `long` instead of pointer-sized types for `size_t`/`ssize_t` parameters - [@​dbwiddis](https://github.com/dbwiddis). - [#​1727](java-native-access/jna#1727): Include DragonFlyBSD in `NativeLibrary` versioned library resolution, libc special-case loading, and 64-bit search paths - [@​dbwiddis](https://github.com/dbwiddis). - [#​1709](java-native-access/jna#1709): Rebuild native library for OpenBSD 7.9 x86-64, drop OpenBSD x86 - [@​matthiasblaesing](https://github.com/matthiasblaesing). </details> --- ### Configuration 📅 **Schedule**: (UTC) - Branch creation - "before 9am on tuesday" - Automerge - At any time (no schedule defined) 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box --- This PR has been generated by [Mend Renovate CLI](https://github.com/renovatebot/renovate). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiI0NC4xMzMuMCIsInVwZGF0ZWRJblZlciI6IjQ0LjE3NS4xIiwidGFyZ2V0QnJhbmNoIjoiZGV2ZWxvcCIsImxhYmVscyI6WyJkZXBlbmRlbmNpZXMiLCJyZW5vdmF0ZSJdfQ==--> Reviewed-on: https://code.futo.org/harbor/harbor/pulls/1820 Reviewed-by: Mark Harding <[email protected]>
markharding
pushed a commit
to futo-org/Harbor
that referenced
this pull request
Oct 29, 2026
This PR contains the following updates: | Package | Change | [Age](https://docs.renovatebot.com/merge-confidence/) | [Confidence](https://docs.renovatebot.com/merge-confidence/) | |---|---|---|---| | [net.java.dev.jna:jna](https://github.com/java-native-access/jna) | `5.18.1` → `5.19.1` |  |  | --- ### Release Notes <details> <summary>java-native-access/jna (net.java.dev.jna:jna)</summary> ### [`v5.19.1`](https://github.com/java-native-access/jna/blob/HEAD/CHANGES.md#Release-5191) [Compare Source](java-native-access/jna@5.19.0...5.19.1) \============== ## Bug Fixes - [#​1730](java-native-access/jna#1730): Replace usage of `MethodHandle` with reflection to restore support for older Android releases - [@​matthiasblaesing](https://github.com/matthiasblaesing). ### [`v5.19.0`](https://github.com/java-native-access/jna/blob/HEAD/CHANGES.md#Release-5190) [Compare Source](java-native-access/jna@5.18.1...5.19.0) \============== ## Features - [#​1696](java-native-access/jna#1696): Add `LARGE_INTEGER.ByValue` to `LARGE_INTEGER` in `WinNT.java` - [@​baier233](https://github.com/baier233). - [#​1697](java-native-access/jna#1697): Add WlanApi module - [@​eranl](https://github.com/eranl). - [#​1718](java-native-access/jna#1718): Add `Cups` to `c.s.j.p.unix` providing CUPS printing system bindings for destinations, jobs, options, and server configuration - [@​dbwiddis](https://github.com/dbwiddis). - [#​1720](java-native-access/jna#1720): Add `groupCount` and `groupMasks` fields to `CACHE_RELATIONSHIP` in `c.s.j.p.win32.WinNT`, matching the updated Windows struct layout - [@​dbwiddis](https://github.com/dbwiddis). - [#​1719](java-native-access/jna#1719): Add `CoreGraphics` to `c.s.j.p.mac` with Quartz Window Services and Display Services bindings; implement `getAllWindows()` in `MacWindowUtils` - [@​dbwiddis](https://github.com/dbwiddis). - [#​1723](java-native-access/jna#1723): Add `ProcFdInfo`, `InSockInfo`, `TcpSockInfo`, `proc_pidfdinfo`, `statfs64`, and `vm_deallocate` to `c.s.j.p.mac.SystemB` - [@​dbwiddis](https://github.com/dbwiddis). - [#​1725](java-native-access/jna#1725): Add `BluetoothApis` to `c.s.j.p.win32` providing Bluetooth device and radio enumeration via `BluetoothFindFirstRadio`, `BluetoothFindFirstDevice`, and related functions - [@​dbwiddis](https://github.com/dbwiddis). ## Bug Fixes - [#​1644](java-native-access/jna#1644): Fix bug in VARDESC and TYPEDESC causing an illegal memory access - [@​lwahonen](https://github.com/lwahonen) - [#​1715](java-native-access/jna#1715): Fix `UdevDevice.getSysname()` calling `udev_device_get_syspath` instead of `udev_device_get_sysname` - [@​dbwiddis](https://github.com/dbwiddis). - [#​1721](java-native-access/jna#1721): Fix switched `serverName`/`domainName` arguments in `Netapi32Util#getDCName` - [@​dbwiddis](https://github.com/dbwiddis). - [#​1722](java-native-access/jna#1722): Fix `Advapi32#RegisterServiceCtrlHandler` using wrong `Handler` type - [@​dbwiddis](https://github.com/dbwiddis). - [#​1636](java-native-access/jna#1636): Drop hard dependency on java.lang.SecurityManager/java.security.AccessController - [@​matthiasblaesing](https://github.com/matthiasblaesing). - [#​1724](java-native-access/jna#1724): Fix `host_page_size` in `c.s.j.p.mac.SystemB` and `getxattr`/`setxattr`/`listxattr` in `c.s.j.p.mac.XAttr` using `long` instead of pointer-sized types for `size_t`/`ssize_t` parameters - [@​dbwiddis](https://github.com/dbwiddis). - [#​1727](java-native-access/jna#1727): Include DragonFlyBSD in `NativeLibrary` versioned library resolution, libc special-case loading, and 64-bit search paths - [@​dbwiddis](https://github.com/dbwiddis). - [#​1709](java-native-access/jna#1709): Rebuild native library for OpenBSD 7.9 x86-64, drop OpenBSD x86 - [@​matthiasblaesing](https://github.com/matthiasblaesing). </details> --- ### Configuration 📅 **Schedule**: (UTC) - Branch creation - "before 9am on tuesday" - Automerge - At any time (no schedule defined) 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box --- This PR has been generated by [Mend Renovate CLI](https://github.com/renovatebot/renovate). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiI0NC4xMzMuMCIsInVwZGF0ZWRJblZlciI6IjQ0LjE3NS4xIiwidGFyZ2V0QnJhbmNoIjoiZGV2ZWxvcCIsImxhYmVscyI6WyJkZXBlbmRlbmNpZXMiLCJyZW5vdmF0ZSJdfQ==--> Reviewed-on: https://code.futo.org/harbor/harbor/pulls/1820 Reviewed-by: Mark Harding <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
DragonFlyBSD platform support was added in #1593 but
NativeLibrarywas not updated to include DragonFlyBSD in the fallback paths that FreeBSD already uses.Problem
When loading
libc(or any library by short name) on DragonFlyBSD, the following fails withUnsatisfiedLinkError/NoClassDefFoundError:.sofallback (matchLibrary()) only triggers for Linux and FreeBSDmapSharedLibraryName()handling for.sofiles only covers Linux and FreeBSDFix
Add
Platform.isDragonFlyBSD()to all four locations inNativeLibrary.javawherePlatform.isFreeBSD()is checked. DragonFlyBSD is a FreeBSD derivative and uses the same library naming conventions.Testing
Discovered while porting OSHI to DragonFlyBSD. Verified that the workaround (using
"c"instead of"libc") resolves the loading issue, confirming the root cause is in these fallback paths.