Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Bug Unity on Arch/Manjaro Linux

Discussion in 'Linux' started by NunoDonato, Aug 26, 2015.

  1. spacepluk

    spacepluk

    Joined:
    Aug 26, 2015
    Posts:
    243
    I finally made it into the editor. I have no idea if it made a difference but I run `/opt/Unity/Editor/Unity --offline` and now it works every time. Everything network related is still broken though.
     
  2. NunoDonato

    NunoDonato

    Joined:
    Jun 20, 2013
    Posts:
    10
    that offline arg doesnt work for me, it runs as usual
     
  3. spacepluk

    spacepluk

    Joined:
    Aug 26, 2015
    Posts:
    243
    I did some more testing. This time I added an iframe to the index.html but using an ip address and that works. So it seems that it's only dns resolution what is broken.

    After a quick check to libcef's source I'd say that it has something to do with nss but I have no idea what it is.
     
  4. spacepluk

    spacepluk

    Joined:
    Aug 26, 2015
    Posts:
    243
    I found a workaround for the network problems, just run the editor like this:

    LD_PRELOAD=/usr/lib/libresolv.so.2 /opt/Unity/Editor/Unity

    I still have no idea why this doesn't happen to everybody :/
     
    Airton Rampim and NunoDonato like this.
  5. dehen_

    dehen_

    Joined:
    Sep 30, 2012
    Posts:
    8
    Works for me! Thanks.
     
  6. NunoDonato

    NunoDonato

    Joined:
    Jun 20, 2013
    Posts:
    10
    awesome, it seems to "fix" the problem!
     
  7. spacepluk

    spacepluk

    Joined:
    Aug 26, 2015
    Posts:
    243
    cool! :)

    The only thing that I can think of is that for @leonardkoenig it was loading the system library instead of the one that's bundled with unity. Maybe differences in /etc/ld.so.conf or /etc/ld.so.cache ??

    Whatever the reason if this is the case it might be a good idea to remove libresolv from the aur package. What do you think?
     
    NunoDonato likes this.
  8. Tak

    Tak

    Joined:
    Mar 8, 2010
    Posts:
    1,001
    Wow, that's a great find! It looks like the bundled libresolv might be conflicting with the one on your system (or maybe even just behaving differently enough that it makes CEF think the login request is unsafe). We'll investigate the best fix for this - super detective work!
     
  9. spacepluk

    spacepluk

    Joined:
    Aug 26, 2015
    Posts:
    243
    haha thanks! :)
     
  10. grant_b

    grant_b

    Joined:
    Aug 22, 2015
    Posts:
    2
    Great! Resolves this bug too: https://fogbugz.unity3d.com/default.asp?722917_0vrfl70afg5of9ok
    Thank you very much!
     
  11. Deleted User

    Deleted User

    Guest

    LD_PRELOAD=/usr/lib/libresolv.so.2 /opt/Unity/Editor/Unity

    Just gives me this:
    Failed to execute child process "LD_PRELOAD=/usr/lib/libresolv.so.2" (No such file or directory)

    I guess I'm missing some package?
     
  12. Zuntatos

    Zuntatos

    Joined:
    Nov 18, 2012
    Posts:
    612
    Should be party of glibc iirc
     
  13. leonardkoenig

    leonardkoenig

    Joined:
    Aug 26, 2015
    Posts:
    35
    Sadly won't work as it is owned by glibc which is a dependency of gcc-libs which is part of base. It should DEFINITELY be installed, otherwise the own install seems to be pretty screwed :D
    It's no hard dependency though, as we assume it to be installed.
    We in this case means 'all the guys from here: https://aur.archlinux.org/packages/unity3d/'
    That's a new AUR package that has been worked on by a few guys with beta access earlier and has proven to have done some good work.
    We currently merge some fixes/changes into that package from mine and I hope we can fix this.

    EDIT: Ooops, you are the same guy that submitted the package >.<

    Well, I wouldnt have to need to tell you then ^^
     
  14. leonardkoenig

    leonardkoenig

    Joined:
    Aug 26, 2015
    Posts:
    35
    Just did some more research:
    Code (bash):
    1. $ ldd Unity | grep resol
    2. libresolv.so.2 => /opt/Unity/Editor/Data/Tools/libresolv.so.2 (0x00007f3fdbf8a000)
    What does yours point to by default?
     
  15. spacepluk

    spacepluk

    Joined:
    Aug 26, 2015
    Posts:
    243
    Yeah, I started building a package yesterday but I didn't have time to finish. I think Juraj did all the hard work :)

    This is the output of ldd:
    Code (csharp):
    1. $ ldd /opt/Unity/Editor/Unity | grep resolv
    2.    libresolv.so.2 => /opt/Unity/Editor/Data/Tools/libresolv.so.2 (0x00007f7645de7000)
    3. $ ldd /opt/Unity/Editor/libcef.so | grep resolv
    4.    libresolv.so.2 => /usr/lib/libresolv.so.2 (0x00007f22a4b97000)
    But if I run:
    Code (csharp):
    1. LD_DEBUG=libs /opt/Unity/Editor/Unity
    I can see that it's loading the bundled one unless I preload the system's.
     
  16. Tak

    Tak

    Joined:
    Mar 8, 2010
    Posts:
    1,001
    Can you confirm that running with LD_LIBRARY_PATH=/opt/Unity/Editor/Data/Tools results in the correct behavior without LD_PRELOAD?
     
  17. leonardkoenig

    leonardkoenig

    Joined:
    Aug 26, 2015
    Posts:
    35
    Same thing here. Weird that for some people that libresolv doesn't work.

    I compared both libs like this:
    Code (csharp):
    1. $ file /opt/Unity/Editor/Data/Tools/libresolv.so.2
    2.   /opt/Unity/Editor/Data/Tools/libresolv.so.2: ELF 64-bit LSB shared object, x86-64, version 1 (SYSV), dynamically linked, interpreter /lib64/ld-linux-x86-64.so.2, BuildID[sha1]=90c0512c7c257910a651e6a200e595d283dc25cf, for GNU/Linux 2.6.15, stripped
    3. $ file /usr/lib/libresolv-2.22.so
    4.   /usr/lib/libresolv-2.22.so: ELF 64-bit LSB shared object, x86-64, version 1 (SYSV), dynamically linked, BuildID[sha1]=544edfd9674594504cc408b41c1aac2f3cf9ed63, for GNU/Linux 2.6.32, stripped
    Note the 'interpreter /lib64/ld-linux-x86-64.so.2' is not in the second one.
    Code (csharp):
    1. $ pacman -Qo /lib64/ld-linux-x86-64.so.2
    2.   /usr/lib/ld-linux-x86-64.so.2 is owned by glibc 2.22-1
    glibc though is installed on your system, otherwise the LD_PRELOAD trick wouldn't have worked.
     
  18. spacepluk

    spacepluk

    Joined:
    Aug 26, 2015
    Posts:
    243
    @Tak nope, it still fails.
     
  19. spacepluk

    spacepluk

    Joined:
    Aug 26, 2015
    Posts:
    243
    @leonardkoening I think that if your system is loading /usr/lib/libresolve.so.2 it should be safe to remove the bundled library from the aur package.
     
  20. leonardkoenig

    leonardkoenig

    Joined:
    Aug 26, 2015
    Posts:
    35
    Ah, that might be right. What actually happens when you just delete the bundled library? Could that fix the issue without doing LD_PRELOAD. Anyway, now you can edit the PKGBUILD of unity3d anyway, mine will be merged into it ;-)
     
  21. FionaSarah

    FionaSarah

    Joined:
    Aug 26, 2015
    Posts:
    11
    The LD_PRELOAD work around did the trick for me on Arch too. :)
     
  22. rustybroomhandle

    rustybroomhandle

    Joined:
    Oct 12, 2013
    Posts:
    7
    It is very odd. I also did not need to do the workaround on my Manjaro system, but I'll keep it in mind if it happens in future.

    On a side note - Arch/Manjaro seems to be quite popular among devs. :)
     
  23. spacepluk

    spacepluk

    Joined:
    Aug 26, 2015
    Posts:
    243
    @leonardkoening yup, removing the bundled lib alows me to run the editor without LD_PRELOAD. I guess that's good enough until we find a cleaner solution...

    I just pushed the patch to the new AUR package so now it should work for everybody :)
     
    Last edited: Aug 27, 2015
  24. leonardkoenig

    leonardkoenig

    Joined:
    Aug 26, 2015
    Posts:
    35
    That's cool. I hope the merge will be completed by some TU soon :)
     
    spacepluk likes this.
  25. spacepluk

    spacepluk

    Joined:
    Aug 26, 2015
    Posts:
    243
    FYI in the end we merged all the changes into `unity-editor` to match the upstream name, sorry for the inconvenience.
     
  26. leonardkoenig

    leonardkoenig

    Joined:
    Aug 26, 2015
    Posts:
    35
    Ok, PKGBUILD-merge is completed but otherway around than planned at first:
    We merged unity3d into unity-editor as wanted to follow upstream-naming-conventions (ie.: unity-editor is the ubuntu package and the .sh file is also called unity-editor).

    Maybe natosha.bard could feature the PKGBUILD if they want - many others have done so to in a section like 'not officially supported installers'.
     
  27. Nibodhika

    Nibodhika

    Joined:
    May 7, 2013
    Posts:
    26
    Could the people whose Unity is working without the need of any editing (whether installed by .sh dpkg on the .deb or used the PKGBUILD) send a pastebin with the result of pacman -Q.

    I intend to make a virtual machine and run yaourt -S on that output and check if it works, and if it does check which package is the dependency we are missing, or which package we have installed is breaking the functionality.
     
  28. Nibodhika

    Nibodhika

    Joined:
    May 7, 2013
    Posts:
    26
    This fixed the problem! excelent! But why is it happening to some people and not others?
     
  29. leonardkoenig

    leonardkoenig

    Joined:
    Aug 26, 2015
    Posts:
    35
    This is a good question, while the ldd showed that in all cases it actually links the same way and even using LD_DEBUG it does so, it seems that in some cases it just switches back to the distributed library. Deleting it helps too (we also did that in the newest revision of the PKGBUILD, so you might try that)
     
  30. Nibodhika

    Nibodhika

    Joined:
    May 7, 2013
    Posts:
    26
    Yeah, I agree that deleting it is the best solution, and would have proposed that if I didn't saw that you had already done that hehehe. However one of my machines has very little space in / and combine this with this being a dev build that I might want to downgrade I'll stick with the ~ install until the official release, but on the one at my work just out of fun it's already installed via your pkgbuild =P
     
  31. leonardkoenig

    leonardkoenig

    Joined:
    Aug 26, 2015
    Posts:
    35
    Then just make sure you have all the dependencies installed we listed in there to 'guranatee' it to work best ;-)
     
  32. Nibodhika

    Nibodhika

    Joined:
    May 7, 2013
    Posts:
    26
    Yeah, about that, the embebed monodevelop was failing to start, so I installed from extra and then the built-in started working... perhaps some dependency is missing.

    I thought about deleting the built-in and adding monodevelop as a dependency, but the problem with that is that the editor comes preconfigured to use the monoeditor built-in.
     
  33. spacepluk

    spacepluk

    Joined:
    Aug 26, 2015
    Posts:
    243
    @Nibodhika if you want to give it a try, taking stuff out of /etc/ld.so.conf.d might be good start.
     
  34. leonardkoenig

    leonardkoenig

    Joined:
    Aug 26, 2015
    Posts:
    35
    Hm, can you give us the relevant parts of the /var/log/pacman.log or extract the info yourself?

    There should be logged which dependencies got installed when installing the monodevelop from the repos - it would save us some time figuring out ;-)

    Maybe one could edit the default monodevelop path via searching for it using
    $ grep -iR 'defaultpath' /opt/Unity
    and then patching it accordingly
     
  35. Nibodhika

    Nibodhika

    Joined:
    May 7, 2013
    Posts:
    26
    Sure, but I'm at work now, and the machine where that happend is at home, but I'll post the log later... there were lots of stuff.

    I think that maybe just creating a link from /usr/bin/monodevelop to /opt/Unity/MonoDevelop/bin/monodevelop might solve it. But the interface will show (monodevelop (built-in) when in fact is using the system monodevelop)
     
  36. leonardkoenig

    leonardkoenig

    Joined:
    Aug 26, 2015
    Posts:
    35
    Depends. Maybe they load some libaries and have them partly inbuilt or linked with a fixed path (evil devs!) ^^
     
  37. leonardkoenig

    leonardkoenig

    Joined:
    Aug 26, 2015
    Posts:
    35
    Ok, I just tried editing the '../MonoDevelop/bin/monodevelop' to an other path but this does sadly not work (SEGFAULT). One would need to find out where they saved the length of the string too, I suppose.
     
  38. Nibodhika

    Nibodhika

    Joined:
    May 7, 2013
    Posts:
    26
    It works if you do this:
    Code (CSharp):
    1. MonoDevelop
    2. ├── bin
    3. │   └── monodevelop -> /usr/bin/monodevelop
    4. └── lib
    5.     └── monodevelop
    6.         └── bin -> /usr/lib/monodevelop/bin
    But I haven't tested to see if auto-completion and other things that work on the built-in editor work with this setup. Also the Editor.log says
    even if MonoDevelop.Ide.dll is where it supposed to be in MonoDevelop/lib/monodevelop/bin
     
  39. mepwn12

    mepwn12

    Joined:
    Jul 7, 2013
    Posts:
    4
    Does it work for you?: yes
    Do you have chromium/chrome installed? Which package(s)?: chromium-pepper-flash only for freshplayer-plugin for firefox
    Do you have installed all packages listed as dependencies in the unity-editor package?: yes

    Just like you I had to reload the license window and one of my 4 cores is constantly being used 100% as well

    EDIT: The workload has now been divided over all cores sfter actually getting into the editor

    EDIT 2: Monodevelop does not have proper auto-filling for syntax, it doesn't recognize Transform for example.
     
    Last edited: Aug 27, 2015
  40. leonardkoenig

    leonardkoenig

    Joined:
    Aug 26, 2015
    Posts:
    35
    This is weird. Maybe someone else has some idea too? :/
     
  41. leonardkoenig

    leonardkoenig

    Joined:
    Aug 26, 2015
    Posts:
    35
    You don't need to answer the 'poll' anymore btw ;-)

    It's fixed if you delete the libresolv.so (or just use the PKGBUILD)
     
  42. gdebure

    gdebure

    Joined:
    Aug 21, 2015
    Posts:
    3
    Can anyone import anything from the asset store ? Everytime I try, I get an error saying The server was unable to build the package. Please re-import. Unity Console says:
    Code (csharp):
    1.  
    2. Error receiving response from server on url 'https://shawarma.unity3d.com/api/content/download/1846.json?unityversion=5.1.0f3&skip_terms=1': The requested URL returned error: 401
    3. UnityEditor.AsyncHTTPClient:Done(State, Int32)
    4.  
    Also, trying to open the asset store from within unity just results in a blank window
     
  43. Nibodhika

    Nibodhika

    Joined:
    May 7, 2013
    Posts:
    26
    About that, seems that the built-in monodevelop has some debug plugin for unity, if it's going to be removed in future versions of the PKGBUILD these plugins have to be installed in the correct folder (that I have no idea where it is).

    Also on a side-note, anyone has any idea how to change the monodevelop colors? it's not respecting my gtk theme.
     
  44. Nibodhika

    Nibodhika

    Joined:
    May 7, 2013
    Posts:
    26
    I just tried it, and it seems to be working here, at least the asset store page is opening and when I clicked on download a download started.
     
  45. spacepluk

    spacepluk

    Joined:
    Aug 26, 2015
    Posts:
    243
    @gdebure is it docked? they say it doesn't work in the release notes. It works for me when it's undocked.
     
  46. leonardkoenig

    leonardkoenig

    Joined:
    Aug 26, 2015
    Posts:
    35
    I tried setting the whole GTK-Theme with a env-var but then Unity crashes with a logic error o_O
     
  47. spacepluk

    spacepluk

    Joined:
    Aug 26, 2015
    Posts:
    243
    @Nibodhika they also mention this about monodevelop in the release notes:

     
  48. fjalla

    fjalla

    Joined:
    Nov 6, 2012
    Posts:
    73
    I did start the package creation, but a lot of thanks goes to Florian for fixing many stupidities I have made and giving me some great tips, for example if you drop this into your .git/hooks/pre_commit file, you can stop worrying about mksrcinfo:

    Code (CSharp):
    1. #!/bin/sh
    2. set -e
    3.  
    4. mksrcinfo
    5. git add .SRCINFO
     
  49. fjalla

    fjalla

    Joined:
    Nov 6, 2012
    Posts:
    73
    Also, I use the native Arch MonoDevelop, and everything works fine for me (except javascript).
     
  50. leonardkoenig

    leonardkoenig

    Joined:
    Aug 26, 2015
    Posts:
    35
    Git Hooks FTW :D