Skip to content
This repository has been archived by the owner on Nov 19, 2018. It is now read-only.

OS X: System.DllNotFoundException: /Library/Frameworks/SDL.framework/SDL at at (wrapper managed-to-native) Tao.Sdl.Sdl:__SDL_InitSubSystem (int) #225

Open
deathcap opened this issue Dec 13, 2015 · 4 comments

Comments

@deathcap
Copy link

Hello, I am attempting to run TrueCraft.Client on OS X, it builds from git (latest revision, 100b119) but fails to run with this error:

System.DllNotFoundException: /Library/Frameworks/SDL.framework/SDL
  at at (wrapper managed-to-native) Tao.Sdl.Sdl:__SDL_InitSubSystem (int)
  at Tao.Sdl.Sdl.SDL_InitSubSystem (Int32 flags) [0x0003b] in <filename unknown>:0
  at Microsoft.Xna.Framework.OpenTKGamePlatform..ctor (Microsoft.Xna.Framework.Game game) [0x00044] in <filename unknown>:0
  at Microsoft.Xna.Framework.GamePlatform.Create (Microsoft.Xna.Framework.Game game) [0x00000] in <filename unknown>:0
  at Microsoft.Xna.Framework.Game..ctor () [0x001fb] in <filename unknown>:0
  at TrueCraft.Client.TrueCraftGame..ctor (TrueCraft.Client.MultiplayerClient client, System.Net.IPEndPoint endPoint) [0x00000] in /Users/admin/minecraft/TrueCraft/TrueCraft.Client/TrueCraftGame.cs:74
  at TrueCraft.Client.Program.Main_Thread (System.String[] args) [0x00036] in /Users/admin/minecraft/TrueCraft/TrueCraft.Client/Program.cs:54
  at TrueCraft.Client.Program.Main (System.String[] args) [0x00029] in /Users/admin/minecraft/TrueCraft/TrueCraft.Client/Program.cs:21

As stated on https://truecraft.io/download#osx "TrueCraft is not currently supported on OS X. If you are a developer and wish to change that, we'd love your pull request. It should be easy to port, we just need someone with access to OS X to do it.", so I gave it a shot, but this is where I got stuck. See also: #182 Add Mac OSX Support

Configuration:

Launched Xamarin Studio, opened TrueCraft.sln, Run > Start Debugging - this successfully launches the TrueCraft server ("TrueCraft" project) and I can connect with the official Minecraft 1.7.3 beta client.

However if I run the client by setting Project > Solution Options > Run > Startup Project > TrueCraft.Client, then choosing Run, it fails with the above System.DllNotFoundException: /Library/Frameworks/SDL.framework/SDL error. Sure enough, on my system /Library/Frameworks/SDL.framework does not exist.

As described in the readme, I restored the NuGet packages (in Xamarin Studio: Project > Update NuGet Packages, Restore NuGet Packages), and it succeeds with no error. I believe I followed the instructions correctly, but am new to Mono so I apologize in advance if I'm missing something obvious.

Maybe a step in the build instructions is missing? There are several other references to other libraries in /Library/Frameworks on OS X (SDL, SDL_image, SDL_mixer, SDL_ttf, SDL_net, SDL_gfx, and smpeg). Looks like SDL.framework can be downloaded from http://libsdl.org/download-1.2.php (not http://libsdl.org/download-2.0.php which provides SDL2.framework) and copied to /Library/Frameworks, which fixes this particular error but then SDL_mixer etc. is missing. Is it possible to have these frameworks bundled within TrueCraft?

@ddevault
Copy link
Owner

Bundling these with TrueCraft is less than ideal. Maybe once the project is more stable and ready for a release.

@flibitijibibo
Copy link
Contributor

Can you give this branch a try?

#228

You can find all the native libraries here:

http://www.flibitijibibo.com/fnalibs.tar.bz2

For TrueCraft you'll need libSDL2-2.0.0.dylib, libSDL2_image-2.0.0.dylib, libopenal.1.dylib, and libmojoshader.dylib. It should just work from Xamarin Studio if those libs are in the output folder, but worst case: Just add the osx/ lib folder to the DYLD_LIBRARY_PATH.

@fyr77
Copy link

fyr77 commented Apr 1, 2016

@flibitijibibo Hey, could you reupload the native libraries? It appears the link is offline...

You can find all the native libraries here:

http://www.flibitijibibo.com/fnalibs.tar.bz2

@flibitijibibo
Copy link
Contributor

The archive moved:

http://fna.flibitijibibo.com/archive/fnalibs.tar.bz2

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

No branches or pull requests

4 participants