Description
The problem is that NativeAOT references OpenSSL in two different ways, depending on whether we're doing a portable build or not.
When portable, the Native AOT runtime uses lazy loading (dlopen) to load the installed OpenSSL shared library. This means that the final linking command for a Native AOT app doesn't need the OpenSSL dev shared library to be passed when linking, since it will not try to statically resolve symbols.
This is not true for non-portable builds. In this case, Native AOT is built directly against OpenSSL headers/SOs. This means that Native AOT apps have to pass the appropriate SO to the linker during final linking of NativeAOT apps.
This means that the linking of Native AOT apps depends on whether it was originally compiled with a portable build. We could also try to remove this difference at the root by choosing one way to reference OpenSSL consistently.
More broadly, the feature of a "non-portable" AOT build is questionable. This would produce a Native AOT compiler which can only compiler for the exact platform (e.g. Ubuntu 22.04) that the compiler was built for. This is generally an anti-pattern in compilers.
Metadata
Metadata
Assignees
Labels
Type
Projects
Status