On Tue, 10 Jan 2023 09:57:19 GMT, David <d...@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)

What additional paths except "@executable_path/../Frameworks/" your application 
requires? If you just need @executable_path/../Frameworks/, then I think we 
should just add this to rpath permanently, instead of using 
-headerpad_max_install_names and install_name_tool. "Frameworks" and "PlugIns" 
are two standard folders to keep additional dynamic libraries, so I think we 
need to add both of them and do not use -headerpad_max_install_names.

Looks good. You will need to file a JBS issue for this.

-------------

PR: https://git.openjdk.org/jdk/pull/11922

Reply via email to