Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Failure loading frameworks on macOS 11 #1215

Closed
dkocher opened this issue Jun 28, 2020 · 0 comments · Fixed by #1216
Closed

Failure loading frameworks on macOS 11 #1215

dkocher opened this issue Jun 28, 2020 · 0 comments · Fixed by #1216

Comments

@dkocher
Copy link
Contributor

dkocher commented Jun 28, 2020

See the following note in the macOS 11 beta release notes

New in macOS Big Sur 11 beta, the system ships with a built-in dynamic linker cache of all system-provided libraries. As part of this change, copies of dynamic libraries are no longer present on the filesystem. Code that attempts to check for dynamic library presence by looking for a file at a path or enumerating a directory will fail. Instead, check for library presence by attempting to dlopen() the path, which will correctly check for the library in the cache. (62986286)

Thus loading frameworks using Native.loadLibrary("Foundation") no longer works because the code has checks using java.io.File.exists to locate the framework.

dkocher added a commit to iterate-ch/jna that referenced this issue Jun 28, 2020
> New in macOS Big Sur 11 beta, the system ships with a built-in dynamic linker cache of all system-provided libraries. As part of this change, copies of dynamic libraries are no longer present on the filesystem. Code that attempts to check for dynamic library presence by looking for a file at a path or enumerating a directory will fail. Instead, check for library presence by attempting to dlopen() the path, which will correctly check for the library in the cache. (62986286)

Fix java-native-access#1215.

Signed-off-by: David Kocher <dkocher@iterate.ch>
dkocher added a commit to iterate-ch/jna that referenced this issue Jun 30, 2020
> New in macOS Big Sur 11 beta, the system ships with a built-in dynamic linker cache of all system-provided libraries. As part of this change, copies of dynamic libraries are no longer present on the filesystem. Code that attempts to check for dynamic library presence by looking for a file at a path or enumerating a directory will fail. Instead, check for library presence by attempting to dlopen() the path, which will correctly check for the library in the cache. (62986286)

Fix java-native-access#1215.

Signed-off-by: David Kocher <dkocher@iterate.ch>
dbwiddis pushed a commit to dbwiddis/jna that referenced this issue Jul 15, 2020
> New in macOS Big Sur 11 beta, the system ships with a built-in dynamic linker cache of all system-provided libraries. As part of this change, copies of dynamic libraries are no longer present on the filesystem. Code that attempts to check for dynamic library presence by looking for a file at a path or enumerating a directory will fail. Instead, check for library presence by attempting to dlopen() the path, which will correctly check for the library in the cache. (62986286)

Fix java-native-access#1215.

Signed-off-by: David Kocher <dkocher@iterate.ch>
facebook-github-bot pushed a commit to facebook/buck that referenced this issue Sep 29, 2020
Summary:
# Context

macOS 11 adopts the [dyld shared cache](https://iphonedevwiki.net/index.php/Dyld_shared_cache) which means that the system libraries do not actually exist on the filesystem. This broke JNA and it was fixed in late June 2020 ([issue#1215](java-native-access/jna#1215)).

# Changes

Because we have other third-party JARs which depend on JNA, we had to update those. In summary, we updated all of the following modules:

- JNA
- nailgun
- NuProcess
- oshi
- Java Obj-C Bridge

Reviewed By: blackm00n

fbshipit-source-id: f29c775912ac3a84ec5615f6999b7bccf212ead7
rajyengi pushed a commit to facebook/buck that referenced this issue Jan 12, 2021
* Update JNA to resolve framework loading issue on Big Sur

java-native-access/jna#1215

* Remove workaround initializing JNA early

java-native-access/jna#652

This issue was resolved and property SIZE does not exist with JNA version 5.6.0.

* Update NuProcess to 2.0.1 for compatibility with JNA

* Build NuProcess with openjdk version "1.8.0_275"

jetty/jetty.project#3244

* Cherry pick a2912b9

a2912b9
Bencodes pushed a commit to lyft/buck that referenced this issue Feb 10, 2021
* Update JNA to resolve framework loading issue on Big Sur

java-native-access/jna#1215

* Remove workaround initializing JNA early

java-native-access/jna#652

This issue was resolved and property SIZE does not exist with JNA version 5.6.0.

* Update NuProcess to 2.0.1 for compatibility with JNA

* Build NuProcess with openjdk version "1.8.0_275"

jetty/jetty.project#3244

* Cherry pick a2912b9

facebook@a2912b9
shepting pushed a commit to airbnb/buck that referenced this issue Nov 11, 2021
* Update JNA to resolve framework loading issue on Big Sur

java-native-access/jna#1215

* Remove workaround initializing JNA early

java-native-access/jna#652

This issue was resolved and property SIZE does not exist with JNA version 5.6.0.

* Update NuProcess to 2.0.1 for compatibility with JNA

* Build NuProcess with openjdk version "1.8.0_275"

jetty/jetty.project#3244

* Cherry pick a2912b9

facebook@a2912b9
shepting pushed a commit to airbnb/buck that referenced this issue Nov 11, 2021
* Update JNA to resolve framework loading issue on Big Sur

java-native-access/jna#1215

* Remove workaround initializing JNA early

java-native-access/jna#652

This issue was resolved and property SIZE does not exist with JNA version 5.6.0.

* Update NuProcess to 2.0.1 for compatibility with JNA

* Build NuProcess with openjdk version "1.8.0_275"

jetty/jetty.project#3244

* Cherry pick a2912b9

facebook@a2912b9
shepting pushed a commit to airbnb/buck that referenced this issue Nov 12, 2021
* Update JNA to resolve framework loading issue on Big Sur

java-native-access/jna#1215

* Remove workaround initializing JNA early

java-native-access/jna#652

This issue was resolved and property SIZE does not exist with JNA version 5.6.0.

* Update NuProcess to 2.0.1 for compatibility with JNA

* Build NuProcess with openjdk version "1.8.0_275"

jetty/jetty.project#3244

* Cherry pick a2912b9

facebook@a2912b9
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 a pull request may close this issue.

1 participant