Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Mac OS DllNotFoundException (.NET Core) #243

Open
7Grok opened this issue Dec 24, 2019 · 6 comments
Open

Mac OS DllNotFoundException (.NET Core) #243

7Grok opened this issue Dec 24, 2019 · 6 comments

Comments

@7Grok
Copy link

7Grok commented Dec 24, 2019

Hi

I am trying to load a managed DLL that wraps an unmanaged .so or .dylib on Mac OS

If I create a CLI app using dotnet I can get it to work if I copy to DLL and the .dylib into the output folder. As an FYI I have to rename the .so to .dylib

If I create a simple test script in ifSharp

#r "managed_wrapper.dll"
open System
open LibraryName

let main =
    Library.some_init_function(0) |> ignore
    printfn "Hello World from F#!"
    0

main

I get DllNotFoundException even though the DLL and the .dylib are in the same folder where I execute jupyter notebook

I have tried

Related information

  • Operating system: Mac OS 10.14.6
  • jupyter core : 4.6.1
  • jupyter-notebook : 6.0.2
  • jupyter client : 5.3.4
  • jupyter lab : 1.2.3
  • dotnet: 2.1.401
@cgravill
Copy link
Member

Interesting, OK so first thing the .NET Core version is still very experimental I've never actually tried using native libraries with it myself.

I have been able to do something similar using Mono on macOS:
https://github.com/cgravill/interactiveComputingFSharpJupyter/blob/master/FOSDEM/07_TensorflowSharp.ipynb

Just to repeat, I've not done this on .NET Core at all Windows or macOS. Now there's a new LTS version of .NET Core out I'll try upgrading /master to that and see how things are.

@cgravill cgravill changed the title Mac OS DllNotFoundException Mac OS DllNotFoundException (.NET Core) Dec 24, 2019
@cgravill
Copy link
Member

Yes it looks to work fine on Windows with the present version:
image

macOS I run into issues. This will probably need a volunteer with more experience in debugging macOS and .NET Core interactions.

I'm working on an update to .NET Core 3.1 here: #244

@cgravill
Copy link
Member

Another option is the new general .NET Kernel: https://www.hanselman.com/blog/AnnouncingNETJupyterNotebooks.aspx

I'm working on this with others there. It doesn't yet have all the features this implementation has but the .NET Core support is much more stable, and has a much nicer way to install packages (including native).

@7Grok
Copy link
Author

7Grok commented Dec 24, 2019

The new general .NET Kernel works. Thanks !! :)

When you say its missing features is there someplace I can see whats missing? I don't really need much, charting, displaying images and loading a few packages.

Also for anyone that finds this, I also posted a StackOverflow with what I had to do to get a console app working.

Once Again Thanks.

--

@cartermp
Copy link

It'd be good to see the the feature diff - A big one missing is a nicer way to do LaTeX that is prototyped here: dotnet/try#692

@cgravill
Copy link
Member

This will be incomplete... the big things I'm aware of:

In IFSharp but not the .NET Kernel:

Conversely in .NET Kernel

  • new syntax to #r dependencies, this is so much better
  • Solid .NET Core support, I believe cross-platform
  • Cross language connections e.g. to JavaScript and C#

There's no plans to stop IFSharp but I'd really like to transition efforts over time to the shared .NET Kernel. The main thing for me is basic code completion which we're talking about - I had a mini prototype, and I understand others have done more, but the current code editor experience (CodeMirror) in the .NET Kernel isn't great in either F# or C#.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants