ShadowTheAge / yafc

Powerful Factorio calculator/analyser that works with mods
GNU General Public License v3.0
176 stars 56 forks source link

[BUG][macOS] System.DllNotFoundException: Unable to load shared library 'System.Native #159

Open Agrrox opened 2 years ago

Agrrox commented 2 years ago

Hello, I'm having an issue running YAFC beta v0.5.8 on macOS. I'm using macOS High Sierra 10.13.6.

error message:

``` mac:~ macpro$ dotnet /Users/macpro/Downloads/OSX/YAFC.dll Unhandled exception. System.DllNotFoundException: Unable to load shared library 'System.Native' or one of its dependencies. In order to help diagnose loading problems, consider setting the DYLD_PRINT_LIBRARIES environment variable: dlopen(libSystem.Native, 1): image not found at Interop.Sys.GetCwd(Byte* buffer, Int32 bufferLength) at Interop.Sys.GetCwdHelper(Byte* ptr, Int32 bufferSize) at Interop.Sys.GetCwd() at System.Environment.get_CurrentDirectory() at System.IO.Directory.GetCurrentDirectory() at YAFC.YafcLib.Init() at YAFC.Program.Main(String[] args) Abort trap: 6 mac:~ macpro$ ```

installed frameworks and libraries:

`dotnet-sdk-6.0.202-osx-x64` `dotnet-runtime-3.1.24-osx-x64` ``` mac:~ macpro$ dotnet --list-sdks 6.0.202 [/usr/local/share/dotnet/sdk] mac:~ macpro$ dotnet --list-runtimes Microsoft.AspNetCore.App 6.0.4 [/usr/local/share/dotnet/shared/Microsoft.AspNetCore.App] Microsoft.NETCore.App 3.1.24 [/usr/local/share/dotnet/shared/Microsoft.NETCore.App] Microsoft.NETCore.App 6.0.4 [/usr/local/share/dotnet/shared/Microsoft.NETCore.App] ``` SDL2: `2.0.22` SDL2_image: `2.0.5` sdl2_ttf: `2.0.18` ``` mac:~ macpro$ brew info SDL2 sdl2: stable 2.0.22, HEAD Low-level access to audio, keyboard, mouse, joystick, and graphics https://www.libsdl.org/ /usr/local/Cellar/sdl2/2.0.22 (92 files, 5.6MB) * Built from source on 2022-04-30 at 20:39:40 From: https://github.com/Homebrew/homebrew-core/blob/HEAD/Formula/sdl2.rb License: Zlib ==> Options --HEAD Install HEAD version ==> Analytics install: 108,929 (30 days), 322,026 (90 days), 1,202,815 (365 days) install-on-request: 9,836 (30 days), 27,423 (90 days), 108,003 (365 days) build-error: 2 (30 days) mac:~ macpro$ brew info SDL2_image sdl2_image: stable 2.0.5 (bottled), HEAD Library for loading images as SDL surfaces and textures https://www.libsdl.org/projects/SDL_image/ /usr/local/Cellar/sdl2_image/2.0.5 (10 files, 279.1KB) * Poured from bottle on 2022-04-30 at 20:47:02 From: https://github.com/Homebrew/homebrew-core/blob/HEAD/Formula/sdl2_image.rb License: Zlib ==> Dependencies Build: pkg-config ✔ Required: jpeg ✔, libpng ✔, libtiff ✔, sdl2 ✔, webp ✔ ==> Options --HEAD Install HEAD version ==> Analytics install: 2,013 (30 days), 6,151 (90 days), 27,743 (365 days) install-on-request: 1,273 (30 days), 4,151 (90 days), 20,397 (365 days) build-error: 1 (30 days) mac:~ macpro$ brew info SDL2_ttf sdl2_ttf: stable 2.0.18, HEAD Library for using TrueType fonts in SDL applications https://github.com/libsdl-org/SDL_ttf /usr/local/Cellar/sdl2_ttf/2.0.18_1 (10 files, 137.9KB) * Built from source on 2022-04-30 at 21:44:56 From: https://github.com/Homebrew/homebrew-core/blob/HEAD/Formula/sdl2_ttf.rb License: Zlib ==> Dependencies Build: pkg-config ✔ Required: freetype ✔, harfbuzz ✔, sdl2 ✔ ==> Options --HEAD Install HEAD version ==> Analytics install: 2,061 (30 days), 8,577 (90 days), 24,610 (365 days) install-on-request: 1,818 (30 days), 7,568 (90 days), 21,883 (365 days) build-error: 1 (30 days) ```
ArcheCraft commented 2 years ago

For me (On Linux) installing dotnet 3.1 worked, installing 6.0 didn't work. Dotnet ist smart enough to choose the correct version if multiple are installed, but YAFC requires 3.1

Maybe this helps?

ShadowTheAge commented 2 years ago

Hello, I have read the issue and will check how it works on macos again, but unfortunately, due to personal issues, I am unable to work on yafc for some time.

Also, is your device an x86 device or an m1 device?

Agrrox commented 2 years ago

Hello, I have read the issue and will check how it works on macos again, but unfortunately, due to personal issues, I am unable to work on yafc for some time.

Also, is your device an x86 device or an m1 device?

its x86 (2 x E5462 Quad-Core Intel Xeon)