urho icon indicating copy to clipboard operation
urho copied to clipboard

Linux support?

Open simendsjo opened this issue 9 years ago • 21 comments

UrhoSharp is a lightweight Game Engine suitable for using with C# and F# to create games that run on Android, iOS, Mac, Windows and Unix.

Isn't GNU/Linux supported? It says both Mac and Unix, but I cannot see anything in the Makefile or other places that reference GNU/Linux. It doesn't seem to be referencing other Unices than Mac either. Am I missing something, or is the documentation wrong? And if the latter, is GNU/Linux support planned?

simendsjo avatar May 08 '16 12:05 simendsjo

Unfortunately it's not supported yet, but it should not be that difficult to add.

EgorBo avatar May 12 '16 10:05 EgorBo

The problem with Linux is always "Which Linux?", given all the different distributions and ABIs.

To properly handle this, we have requested features in NuGet that do not exist today. I suggest we revisit this topic when the NuGet team implements that support,.

migueldeicaza avatar May 17 '16 15:05 migueldeicaza

Hi, I'm interested in running Urho on a Linux Desktop.

What would it take to just say, just clone master and make UrhoSharp run on Ubuntu?

define-private-public avatar Jun 24 '16 02:06 define-private-public

It should not take much, you just need to build the native libraries.

See MakeMac file for details on how this is done, a similar setup is needed.

migueldeicaza avatar Jun 29 '16 13:06 migueldeicaza

I've been trying to do a little work on this, but I've having some issues trying to figure out how to "translate," the OS X stuff to linux (e.g. xcodebuild commands, dylib, -framework etc). Do you have a resource I could look at? I'm not too familiar with the OS X development environment outside of running clang & make in a terminal window.

define-private-public avatar Jul 06 '16 00:07 define-private-public

So at this moment UrhoSharp will not work with MonoDevelop? Even headless deployments (for network game servers only) would be great. I guess it would work with plain Urho3d linux builds in c++ or angelscript, but keeping c# syntax would be nice. (Also,networking sample 17_SceneReplication is suspiciously missing, hopefully it's not due to technical limitations. :)

lukajandric avatar Aug 15 '16 10:08 lukajandric

The issue is that someone needs to build the native libraries that go with UrhoSharp, it has nothing to do with Mono or MonoDevelop. We just do not have the Linux binaries built.

We could provide those, but we depend on the NuGet team to address the fundamental problem with NuGet:

https://github.com/NuGet/Home/issues/3114

migueldeicaza avatar Sep 01 '16 15:09 migueldeicaza

I've been trying to go though on Ubuntu Linux and get a build working. I've started with the OS X build steps. I'm right now at make PchMac and the build is failing with this error:

Bindings/Native/all-urho.cpp:1:10: fatal error: 'stdint.h' file not found
#include <stdint.h>
         ^
1 error generated.
Makefile:73: recipe for target 'PchMac' failed

I'm a little lost since stdint.h should be a standard C include.

define-private-public avatar Sep 24 '16 04:09 define-private-public

@define-private-public did you do xcode-select --install then try some simple app like git so you trigger the license acceptance?

Therzok avatar Sep 24 '16 18:09 Therzok

@Therzok I'm trying to run through the build steps on Ubuntu so I can get UrhoSharp working on a Linux system. xcode-select wouldn't be found on one. @migueldeicaza told me to look through the Mac build instructions as a starting point.

define-private-public avatar Sep 24 '16 20:09 define-private-public

~~Alright, I was able to get past the stdint.h issue. For the PchMac instruction in Makefile, I had to add -stdlib=libstdc++ after the -cc1 flag.~~

False alarm, I accidentally built the Android targets instead of PchMac...

I think the issue revolves around that -cc1 flag & PCH. I found something in the clang FAQ about this: http://clang.llvm.org/docs/FAQ.html#i-get-errors-about-some-headers-being-missing-stddef-h-stdarg-h

I altered the Makefile to download clang 3.7.0 for ubuntu 14.04, and it was successfully "installed," in my UrhoSharp repo copy. When I added an -Iclang+llvm-3.7.0-x86_64-linux-gnu-ubuntu-14.04/lib/clang/3.7.0/include to the PchMac target the stdint.h issue when away, but then I got cstddef not found error.

The clang documentation (for builtin includes) says it should be relative to the clang executable: http://clang.llvm.org/docs/LibTooling.html#builtin-includes

Does anyone know what might be a better fix than -Iing everything?

define-private-public avatar Sep 25 '16 00:09 define-private-public

I finish the first step, but find the second step make SharpieBinder is not possible to finish. There is no source code for libclang-mono, and I don't know whether the other dll (sharpie.bind.dll) is platform dependent or not.

Whether they will provide the source code in the future so we can try to build under linux?

cometyang avatar Jan 14 '17 03:01 cometyang

I was able to get urho-mono.so to build with https://gist.github.com/aktowns/3f8f44560efd16006f96dc30ff518203 and seems to be running okay by nuget'ing UrhoSharp and copying the shared lib over

aktowns avatar Feb 01 '17 11:02 aktowns

Wow, great news, @aktowns! @cometyang you don't need the SharpieBinder to get UrhoSharp game running on Linux. It is needed only for updating C# bindings and currently works only on macOS.

EgorBo avatar Feb 01 '17 12:02 EgorBo

It's been a while since I've checked into this. What's the status of UrhoSharp on Linux at the moment?

define-private-public avatar Jul 18 '17 19:07 define-private-public

It is needed only for updating C# bindings and currently works only on macOS.

@EgorBo whats exactly needed to get binding generator run on other platforms. If say there were people interested in doing that where should we start looking?

rokups avatar Oct 29 '17 14:10 rokups

@EgorBo I'm also interested in the answer to @rokups question. @rokups if I understand correctly objectivesharpie is an objectiveC binder that does provide C++ binding as a secondary feature or something, so I guess the internals aren't easily portable. Could be wrong here though.

Alan-FGR avatar Oct 30 '17 02:10 Alan-FGR

The documentation and README speak not about Linux support, while it is practically available?

ShalokShalom avatar Feb 11 '18 03:02 ShalokShalom

@ShalokShalom last I checked SharpieBinder wouldn't work out of the box on any platform but macOS.

Alan-FGR avatar Feb 11 '18 16:02 Alan-FGR

Just pushed to master the steps @aktowns suggested (with a few changes) - works fine on my Ubuntu and generates a libmono-urho.so SharpieBinder currently supports only macOS but I'll try to compile libclang-mono on linux to get it working on Linux and Windows via WSL

EgorBo avatar Feb 20 '18 16:02 EgorBo

@EgorBo that's great! :smiley:

Alan-FGR avatar Feb 20 '18 20:02 Alan-FGR