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

Omnisharp Mono, Linux, Unity Instructions #311

Closed
jalexspringer opened this issue Jun 1, 2017 · 11 comments
Closed

Omnisharp Mono, Linux, Unity Instructions #311

jalexspringer opened this issue Jun 1, 2017 · 11 comments

Comments

@jalexspringer
Copy link

Hi - finally got this sorted out with some help over on the omnisharp-roslyn issues. I think that the README instructions for linux installation could use some more details. I am working with files created by Unity3d and needed to use the omnisharp-mono binaries to do so. It then requires additional tweaking to get the server to run from there.

Details on what finally got everything working perfectly for me are on this post: http://fbie.github.io/2017/04/06/omnisharp-mono-linux.html

I'm guessing that many linux users of Omnisharp are also working with Unity3d - would this be worth adding in the README? Happy to take a stab and make a pr if so.

@razzmatazz
Copy link
Contributor

I definitely support for adding this to readme, please submit a PR.

Also, maybe it would be worth to create a package for omnisharp for you linux distro? Updating it can be pain though.. as releases come out often:

@razzmatazz
Copy link
Contributor

Btw, there are plans to add automatic server download for omnisharp-emacs, as per #275

This would take a little bit of work to make it work in all cases/distros but should be portable, I think because omnisharp-mono.tgz binaries are .net/portable executables.

@willl
Copy link
Member

willl commented Jun 2, 2017

@razzmatazz From what I'm aware, all of the omnisharp-*-netcoreapp.*.tar.gz versions will disappear in the future (as per #666) so hopefully that will simplify things for you with #275. Then you'll just need to decide which of the following variants should be downloaded

  • Windows (x86 and x64)
  • OSX
  • Linux (x86 and x64)

@jalexspringer
Copy link
Author

Alright - I'll keep it pretty simple then. Are there instances where the netcoreapp versions should be installed? Or should linux users just use the mono version in most instances?

As for making a package - I'm happy to take a stab at it but have never done so before. I'll start with the readme :)

@aleksandr-skobelev-epam
Copy link

Are you sure that copying System.Native library is needed? I tried it first but that didn't help: when I run omnisharp server from console it still crashed. But omnisharp-emacs uses the --stdio option, so it seems to run fine without this library. Just in case: I'm on macos.

@razzmatazz
Copy link
Contributor

razzmatazz commented Jul 5, 2017

Could someone try the new omnisharp-install-server command which has recently been introduced (should work on macOS and Linux), — Windows native is not yet implemented. (As part of #275 )

It "works for me" on my macOS machine, but needs field testing.. Maybe this should make installation procedure easier for new people..

@lboklin
Copy link

lboklin commented Jul 5, 2017

@razzmatazz Holy shit it, "just works" for me on NixOS too! Very impressive and I'm so happy to finally have a usable IDE for work.

@razzmatazz
Copy link
Contributor

@lboklin awesome! I didn't think it would be so easy.. good to hear!

@nico202
Copy link

nico202 commented Mar 9, 2018

@lboklin hi, is it still "just work"ing for you out of the box on nixos? mine is failing with

/home/USER/.emacs.d/.cache/omnisharp/server/v1.26.3/run: line 43: /home/USER/.emacs.d/.cache/omnisharp/server/v1.26.3/mono.linux-x86_64: No such file or directory

@lboklin
Copy link

lboklin commented Mar 9, 2018

@nico202 I don't write C# anymore these days so I'm not much of help. What I'd do is check the run script and run ldd on mono.linux-x86_64 to see what might be missing. For now you could try patchelf-ing it just to get it running, but obviously that's not a good solution in general.

@nico202
Copy link

nico202 commented Mar 9, 2018

I'm happy for you!

However ldd seems to be ok:
/home/USER/.emacs.d/.cache/omnisharp/server/v1.26.3/mono.linux-x86_64

        linux-vdso.so.1 (0x00007fff00b32000)                                                                                                                                                     
        libm.so.6 => /nix/store/2kcrj1ksd2a14bm5sky182fv2xwfhfap-glibc-2.26-131/lib/libm.so.6 (0x00007f073728a000)
        librt.so.1 => /nix/store/2kcrj1ksd2a14bm5sky182fv2xwfhfap-glibc-2.26-131/lib/librt.so.1 (0x00007f0737082000)
        libdl.so.2 => /nix/store/2kcrj1ksd2a14bm5sky182fv2xwfhfap-glibc-2.26-131/lib/libdl.so.2 (0x00007f0736e7e000)
        libpthread.so.0 => /nix/store/2kcrj1ksd2a14bm5sky182fv2xwfhfap-glibc-2.26-131/lib/libpthread.so.0 (0x00007f0736c60000)
        libgcc_s.so.1 => /nix/store/2kcrj1ksd2a14bm5sky182fv2xwfhfap-glibc-2.26-131/lib/libgcc_s.so.1 (0x00007f0736a4a000)
        libc.so.6 => /nix/store/2kcrj1ksd2a14bm5sky182fv2xwfhfap-glibc-2.26-131/lib/libc.so.6 (0x00007f0736698000)
        /lib64/ld-linux-x86-64.so.2 => /nix/store/2kcrj1ksd2a14bm5sky182fv2xwfhfap-glibc-2.26-131/lib64/ld-linux-x86-64.so.2 (0x00007f07375d6000)

edit: Ops I missed the linux-vdso.so.1

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

6 participants