Closed maun closed 4 years ago
Thanks for the report. You can get the directory in which it's compiling code, by running :last_compile_dir
. If you cd into that directory while evcxr is still running, you can run cargo rustc -- -C prefer-dynamic
. That's what evcxr runs to compile the module. Experimenting here might give some clue as to what's going on. e.g. if you switch it to compiling a binary instead of a shared library, can it run?
Unfortunately given the nature of the problem it's likely that switching to compiling a binary will make the problem not reproduce. At that stage, if you're keen, you could try switching back to compiling a shared library and writing a little Rust program to dlopen the shared library. Evcxr uses the libloading
crate to open shared objects. So it might look something like the following:
fn main() {
libloading::Library::new("/somewhere/target/debug/deps/libcode_8.dylib").unwrap();
}
Good luck and let me know if you need any more details on anything.
I'll close this for now, but feel free to reopen if the problem still reproduces and you have any more information
Thought I'd offer this info as it may be helpful to some. Had the exact same issue as this but on windows OS. Realised that I only ever got it when running my notebook whilst in nightly mode. The exact same code ran fine when I set it back to stable. Am able to remain working in stable mode so didn't follow up on any further debugging of the nightly issue..
On macOS 10.15.5 the following fails:
With this error:
The referenced dylib is present:
Afterwards evcxr is broken, executing any cell, even after removing the tch dependency leads to this error with the number increased by one.
Restarting and only removing the
use
statement works fine.What can I do to get at the real error?
tch are bindings for pytorch's libtorch c++ library. It is downloaded in the build script.