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

Unity3D: 5.6.1 -> 2017.4.10 #48643

Merged
merged 5 commits into from Oct 19, 2018
Merged

Unity3D: 5.6.1 -> 2017.4.10 #48643

merged 5 commits into from Oct 19, 2018

Conversation

Hinidu
Copy link
Contributor

@Hinidu Hinidu commented Oct 17, 2018

Motivation for this change

Fixes #34399
2017.4 is used instead of 2017.3 because 2017.4 is LTS release.
zeit/pkg fixing algorithm I've taken from #48193.

Things done
  • Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS)
  • Built on platform(s)
    • NixOS
    • macOS
    • other Linux distributions
  • Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
  • Tested compilation of all pkgs that depend on this change using nix-shell -p nox --run "nox-review wip"
  • Tested execution of all binary files (usually in ./result/bin/)
  • Determined the impact on package closure size (by running nix path-info -S before and after)
  • Fits CONTRIBUTING.md.

MonoDevelop was excluded because it is not shipped with Unity anymore.
upm_linux is a nodejs application packaged into binary using `zeit/pkg`
which has binary offsets. patchelf breaks these offsets so we should fix
it.
@dywedir
Copy link
Member

dywedir commented Oct 17, 2018

sandboxing on:

RPATH of binary /nix/store/s68wgn2fg3sa2k4glv46zx6gc3idww22-unity-editor-2017.4.10xf1/opt/Unity/Editor/Data/Tools/libRL.so contains a forbidden reference to /build

You can remove these lines:

unpackPhase = ''
tar xJf $src
'';

@Hinidu
Copy link
Contributor Author

Hinidu commented Oct 18, 2018

@dywedir thank you for review! I've removed unpackPhase and added some code to clean up RPATH. Though I think that RPATH clean up is quite complicated now and I would be glad to simplify it but I don't know how.

@dywedir
Copy link
Member

dywedir commented Oct 18, 2018

Same error with sandboxing:

RPATH of binary /nix/store/s68wgn2fg3sa2k4glv46zx6gc3idww22-unity-editor-2017.4.10xf1/opt/Unity/Editor/Data/Tools/libRL.so contains a forbidden reference to /build

@@ -1,4 +1,4 @@
{ stdenv, lib, fetchurl, makeWrapper, file, getopt
{ stdenv, lib, fetchurl, makeWrapper, coreutils, file, getopt, gnugrep, gnused
Copy link
Member

@dywedir dywedir Oct 18, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It is not necessary, see Tools provided by stdenv

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should I specify them in nativeBuildInputs?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No

@Hinidu
Copy link
Contributor Author

Hinidu commented Oct 18, 2018

Same error with sandboxing:

RPATH of binary /nix/store/s68wgn2fg3sa2k4glv46zx6gc3idww22-unity-editor-2017.4.10xf1/opt/Unity/Editor/Data/Tools/libRL.so contains a forbidden reference to /build

Strange, I don't see anything like this in RPATH of this library. I will try to use sandbox myself.

@Hinidu
Copy link
Contributor Author

Hinidu commented Oct 18, 2018

@dywedir I'm quite new to nix packaging. Could you please explain how do you get this error? I've built project with nix.useSandbox = true (though it is true by default) and everything seems ok. This is the output of patchelf --print-rpath libRL.so | sed 's/:/\n/g'.

/nix/store/12zhmzzhrwszdc8q3fwgifpwjkwi3mzc-gcc-7.3.0-lib/lib
/nix/store/jmwk023hh33h39hd4flibhrsrhqyr2d5-gtk+-2.24.32/lib
/nix/store/3g2dd1l88v4084q4hiylvq3yhzfczk7k-gdk-pixbuf-2.36.7/lib
/nix/store/hhncd3f33scx5azdv503s34095wm7llj-glib-2.54.3/lib
/nix/store/lrj8z3qqlgfll272r2d0k207gvwdbk53-glu-9.0.0/lib
/nix/store/pbzpqfk3gj4sl118hg114l65nic3vdzs-nss-3.38/lib
/nix/store/g3l15hw9py3iqiyx650m1n9v0va5g4lq-nspr-4.19/lib
/nix/store/3g5pgxj751mlr8fafg7m01rk7jsaggf4-alsa-lib-1.1.5/lib
/nix/store/1isqf8j8syw2ikl5q7xmmfsk2hm35nbx-gconf-2.32.4/lib
/nix/store/8jbw3i61k3zh1wrn1bamd5k3dbg77asv-cups-2.2.6-lib/lib
/nix/store/cs699s49cis8knmx790kf7pyja9wcp41-libcap-2.25-lib/lib
/nix/store/9z9wj81zvhdpc177rljhb4chfwsr35dp-fontconfig-2.12.1-lib/lib
/nix/store/xc5wh9ld8xps6f3bi6fgd2rh22hr104z-freetype-2.7.1/lib
/nix/store/s96v1m6zjphfq3lpkfk7lfg2qcm15fbr-pango-1.40.14/lib
/nix/store/109rigjz7m9xkqrxy2igfv5ndc76ik7a-cairo-1.14.10/lib
/nix/store/p3hrkwk67zh7xv74bs4kxzlm3qj699r2-dbus-1.10.24-lib/lib
/nix/store/wvhjwpkywgxnbfvi8c4z5l1jic05cn4h-expat-2.2.5/lib
/nix/store/8c30dl4mmgm4rip1l08fvad9gca5sk2j-zlib-1.2.11/lib
/nix/store/204mmd3ldzm53m3vn51rdrhnj38l1pc7-libpng-1.2.57/lib
/nix/store/abxf29ma4nxw450f7si1nhkkczg3z7b9-systemd-237-lib/lib
/nix/store/agyxb6xzyq134s0dc1nqw0dvc6aq5d23-tbb-2018_U1/lib
/nix/store/fvrgx8j960w6hsj3fkm6qxrjp7rj4dq4-libX11-1.6.6/lib
/nix/store/wpx26sfsfjkn9bv4qiy19518v7158kh2-libXcursor-1.1.15/lib
/nix/store/g481hbwf2l7dsy50laih8sikjq943krv-libXdamage-1.1.4/lib
/nix/store/bz5qn0sackvx47z3m8n722sslz15scdn-libXfixes-5.0.3/lib
/nix/store/w0qlffps5ji58d5zfqn1k1hpizffn34x-libXrender-0.9.10/lib
/nix/store/nsx9vxv5l3qinxgpgkf64sqgw7pfnr5i-libXi-1.7.9/lib
/nix/store/x2l8x7sqy5pjhibrhq2lnmvnm8vpnbq6-libXcomposite-0.4.4/lib
/nix/store/phgnqbnvhlks0mw9j0xpyzz6yw1bx1gj-libXext-1.3.3/lib
/nix/store/3ql8yf0mp4x1b1d0iaa2q96vsq09dpk6-libXrandr-1.5.1/lib
/nix/store/py70fwpads5038ssyqz22xnpcsdxlirx-libXtst-1.2.3/lib
/nix/store/wjbbzf6h6xj3v6im7j0kpnaphm407b8n-libSM-1.2.2/lib
/nix/store/qghp78h8kkk4j3pwb9mj2cn2z4l7cp5m-libICE-1.0.9/lib
/nix/store/dxlmbd5knis67sjc4b7427w9aj2i5vmv-libxcb-1.12/lib

@dywedir
Copy link
Member

dywedir commented Oct 18, 2018

I've built project with nix.useSandbox = true

That should be it

Could you please provide output of file libRL.so?
I got ELF 64-bit LSB pie executable, so it should not match neither LSB\ shared nor LSB\ executable

@Hinidu
Copy link
Contributor Author

Hinidu commented Oct 18, 2018

$ file /nix/store/*unity-editor-2017.4.10xf1/opt/Unity/Editor/Data/Tools/libRL.so 
/nix/store/ifyb2k517ary93i92kivwa59283dq1yd-unity-editor-2017.4.10xf1/opt/Unity/Editor/Data/Tools/libRL.so: ELF 64-bit LSB shared object, x86-64, version 1 (GNU/Linux), dynamically linked, BuildID[sha1]=02441d692c486fd0b7394d4894445d9c7a576cfc, with debug_info, not stripped

@dywedir
Copy link
Member

dywedir commented Oct 18, 2018

file v5.30 - v5.32: ELF 64-bit LSB shared object, x86-64, version 1 (GNU/Linux), dynamically linked, BuildID[sha1]=02441d692c486fd0b7394d4894445d9c7a576cfc, with debug_info, not stripped
file v5.33 - v5.34: ELF 64-bit LSB pie executable x86-64, version 1 (GNU/Linux), dynamically linked, BuildID[sha1]=02441d692c486fd0b7394d4894445d9c7a576cfc, with debug_info, not stripped

@Hinidu
Copy link
Contributor Author

Hinidu commented Oct 18, 2018

@dywedir thanks! I have 5.32, I will try to adapt the script to handle this change.

@Hinidu
Copy link
Contributor Author

Hinidu commented Oct 19, 2018

@dywedir I think I found a better way to use patchelf here.

@dywedir
Copy link
Member

dywedir commented Oct 19, 2018

LGTM
Thank you!

@dywedir dywedir merged commit 8781308 into NixOS:master Oct 19, 2018
@Hinidu
Copy link
Contributor Author

Hinidu commented Oct 20, 2018

@dywedir thank you for review and merge!

@Hinidu Hinidu deleted the unity2017.4 branch October 20, 2018 16:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Update unity3d to 2017.3.0
4 participants