eitsupi commented on code in PR #3844:
URL: https://github.com/apache/arrow-adbc/pull/3844#discussion_r2653336439
##########
rust/driver_manager/src/lib.rs:
##########
@@ -382,7 +385,23 @@ impl ManagedDriver {
let entrypoint = entrypoint.unwrap_or(default_entrypoint.as_bytes());
let library = unsafe {
-
libloading::Library::new(filename.as_ref()).map_err(libloading_error_to_adbc_error)?
+ // By default, go builds the libraries with '-Wl -z nodelete'
which does not
+ // unload the go runtime. This isn't respected on mac (
https://github.com/golang/go/issues/11100#issuecomment-932638093 )
+ // so we need to explicitly load the library with RTLD_NODELETE(
which prevents unloading )
+ if cfg!(target_os = "macos") {
Review Comment:
I suppose the cfg attribute `#[cfg(...)]` is better than `cfg!` here.
(In this case, it will compile on any OS.)
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]