Closed Therzok closed 7 years ago
The current native binaries package puts the binaries in a known location and uses a dllmap to point to the file.
Given that this is the default scenario that the packages are set up to support, I assume you're talking about some other scenario here? Can you explain what you'd be doing where relying on the package defaults wouldn't be enough?
Yeah, it seems like the dllmap scenario is good enough for the mono loader. I misjudged some initial results in some code which ended up making me think it was a native library resolution issue rather than a use-after-dispose-crash-in-native. Issue can be closed.
Thanks for clarifying @therzok. I do still think that it's worth stripping our build path out of the library. (There's no reason for it to be there.) But I don't think it's critical.
Currently, doing
otool -L
on the native library gives us this output:That means that the library will fail to resolve if it's copied to the output directory without special DYLD_* env vars.
Stripping the path at build time or using
@loader_path
(CMAKE_INSTALL_RPATH @loader_path
) would fix this or post-build withinstall_name_tool -id
would allow the library to be used out of the box on Mono on OS X.