RFR: 8300111: Add rpath for common lib locations for jpackageapplauncher
Magnus Ihse Bursie
ihse at openjdk.org
Fri Jan 13 13:41:13 UTC 2023
On Tue, 10 Jan 2023 09:57:19 GMT, David <duke at openjdk.org> wrote:
> This patch adds the `-headerpad_max_install_names` linker argument to the build of the `jpackageapplauncher` binary (osx only)
>
> Adding this argument allows the user to use the `install_name_tool` to add search paths for the dynamic linker to the launcher binary. This is required for certain use cases where a native library loads other dynamic native libraries via `dlopen`.
>
> The change has been successfully tested on osx on aarch64:
>
> make jdk.jpackage
> install_name_tool -add_rpath @executable_path/../Frameworks/ jpackageapplauncher
> otool -l jpackageapplauncher
>
> Load command 19
> cmd LC_RPATH
> cmdsize 48
> path @executable_path/../Frameworks/ (offset 12)
> > Also, if you ever is going to want to contribute addition PRs to OpenJDK, please see [the bot's advice above](https://github.com/openjdk/jdk/pull/11922#issuecomment-1377005320). Otherwise you are entering a world of pain.
>
> Thanks for your feedback! Will do, overlooked that part in the contribution guide
It might even be missing from the contribution guide. Updating and expanding it is an ever ongoing project. *checking*
It says: "The recommendation is to always create a new branch for any change you intend to implement. By doing that you can easily work on many different changes in parallel in the same code repository." The recommendation is correct, but should be worded more definitely: Things will break if you do *not* create a branch. I'll propose an update to the guide. Thanks for your assistance in making OpenJDk more approachable for new developers.
-------------
PR: https://git.openjdk.org/jdk/pull/11922
More information about the build-dev
mailing list