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

vagrant: 1.9.5 -> 1.9.7 #27293

Closed
wants to merge 1 commit into from
Closed

vagrant: 1.9.5 -> 1.9.7 #27293

wants to merge 1 commit into from

Conversation

char16t
Copy link

@char16t char16t commented Jul 10, 2017

Motivation for this change

Update to latest release version.

Things done
  • Tested using sandboxing
    (nix.useSandbox on NixOS,
    or option build-use-sandbox in nix.conf
    on non-NixOS)
  • Built on platform(s)
    • NixOS
    • macOS
    • Linux
  • 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/)
  • Fits CONTRIBUTING.md.

@mention-bot
Copy link

@char16t, thanks for your PR! By analyzing the history of the files in this pull request, we identified @cstrahan, @aneeshusa and @lovek323 to be potential reviewers.

@char16t
Copy link
Author

char16t commented Jul 10, 2017

I gets these messages before vagrant command output

Ignoring ffi-1.9.18 because its extensions are not built.  Try: gem pristine ffi --version 1.9.18
Ignoring unf_ext-0.0.7.4 because its extensions are not built.  Try: gem pristine unf_ext --version 0.0.7.4
Ignoring wdm-0.1.1 because its extensions are not built.  Try: gem pristine wdm --version 0.1.1

I do not know whether they are in non-nixos version of vagrant installed from the deb or dmg package.

@Mic92
Copy link
Member

Mic92 commented Jul 13, 2017

the gems where the error messages originate need patchelf to find dynamically linked libraries, probably:


$  ldd ./embedded/gems/gems/unf_ext-0.0.7.4/lib/unf_ext.so
        linux-vdso.so.1 (0x00007ffd86bbc000)
        libruby.so.2.3 => not found
        libstdc++.so.6 => not found
        libpthread.so.0 => /nix/store/20msidpx6ydhif01jzaqlj31c83m4173-glibc-2.25/lib/libpthread.so.0 (0x00007f9c3f148000)
        librt.so.1 => /nix/store/20msidpx6ydhif01jzaqlj31c83m4173-glibc-2.25/lib/librt.so.1 (0x00007f9c3ef40000)
        libdl.so.2 => /nix/store/20msidpx6ydhif01jzaqlj31c83m4173-glibc-2.25/lib/libdl.so.2 (0x00007f9c3ed3a000)
        libcrypt.so.1 => /nix/store/20msidpx6ydhif01jzaqlj31c83m4173-glibc-2.25/lib/libcrypt.so.1 (0x00007f9c3eaff000)
        libm.so.6 => /nix/store/20msidpx6ydhif01jzaqlj31c83m4173-glibc-2.25/lib/libm.so.6 (0x00007f9c3e7ec000)
        libc.so.6 => /nix/store/20msidpx6ydhif01jzaqlj31c83m4173-glibc-2.25/lib/libc.so.6 (0x00007f9c3e44d000)
        libgcc_s.so.1 => /nix/store/20msidpx6ydhif01jzaqlj31c83m4173-glibc-2.25/lib/libgcc_s.so.1 (0x00007f9c3e237000)
        /nix/store/20msidpx6ydhif01jzaqlj31c83m4173-glibc-2.25/lib64/ld-linux-x86-64.so.2 (0x0000556788d45000)
$ ldd ./embedded/gems/gems/ffi-1.9.18/ext/ffi_c/ffi_c.so
        linux-vdso.so.1 (0x00007ffe101ae000)
        libruby.so.2.3 => not found
        libffi.so.6 => not found
        libpthread.so.0 => /nix/store/20msidpx6ydhif01jzaqlj31c83m4173-glibc-2.25/lib/libpthread.so.0 (0x00007f3129811000)
        librt.so.1 => /nix/store/20msidpx6ydhif01jzaqlj31c83m4173-glibc-2.25/lib/librt.so.1 (0x00007f3129609000)
        libdl.so.2 => /nix/store/20msidpx6ydhif01jzaqlj31c83m4173-glibc-2.25/lib/libdl.so.2 (0x00007f3129403000)
        libcrypt.so.1 => /nix/store/20msidpx6ydhif01jzaqlj31c83m4173-glibc-2.25/lib/libcrypt.so.1 (0x00007f31291c8000)
        libm.so.6 => /nix/store/20msidpx6ydhif01jzaqlj31c83m4173-glibc-2.25/lib/libm.so.6 (0x00007f3128eb5000)
        libc.so.6 => /nix/store/20msidpx6ydhif01jzaqlj31c83m4173-glibc-2.25/lib/libc.so.6 (0x00007f3128b16000)
        /nix/store/20msidpx6ydhif01jzaqlj31c83m4173-glibc-2.25/lib64/ld-linux-x86-64.so.2 (0x00005576c0535000)

@Mic92
Copy link
Member

Mic92 commented Jul 13, 2017

libffi is a dedicated package. libstdc++ is part of gcc. I am not sure if libruby paths needs to be also fix or if ruby already provides the correct environment for extensions. Hope that helps.

@char16t
Copy link
Author

char16t commented Jul 13, 2017 via email

@grahamc
Copy link
Member

grahamc commented Jul 16, 2017

This looks great to me. @char16t have you tested this version?

@char16t
Copy link
Author

char16t commented Jul 16, 2017

@grahamc I tested vagrant up, vagrant ssh, vagrant halt. Works well as I seen

Now I have no these messages:

Ignoring ffi-1.9.18 because its extensions are not built. Try: gem pristine ffi --version 1.9.18 
Ignoring unf_ext-0.0.7.4 because its extensions are not built. Try: gem pristine unf_ext --version 0.0.7.
Ignoring wdm-0.1.1 because its extensions are not built. Try: gem pristine wdm --version 0.1.1 

@char16t
Copy link
Author

char16t commented Jul 16, 2017

But

[valeriy@nixos:/nix/store/kb93bb6mvs9nkiq1jw4kqglj6wnkqqkk-vagrant-1.9.7/opt/vagrant]$ ldd ./embedded/gems/gems/ffi-1.9.18/ext/ffi_c/ffi_c.so
        linux-vdso.so.1 (0x00007ffeb85ea000)
        libruby.so.2.3 => not found
        libffi.so.6 => not found
        libpthread.so.0 => /nix/store/kjwbqnh13dxh6w4pk2gb3ddmhpiaihqg-glibc-2.25/lib/libpthread.so.0 (0x00007ff924a8c000)
        librt.so.1 => /nix/store/kjwbqnh13dxh6w4pk2gb3ddmhpiaihqg-glibc-2.25/lib/librt.so.1 (0x00007ff924884000)
        libdl.so.2 => /nix/store/kjwbqnh13dxh6w4pk2gb3ddmhpiaihqg-glibc-2.25/lib/libdl.so.2 (0x00007ff924680000)
        libcrypt.so.1 => /nix/store/kjwbqnh13dxh6w4pk2gb3ddmhpiaihqg-glibc-2.25/lib/libcrypt.so.1 (0x00007ff924443000)
        libm.so.6 => /nix/store/kjwbqnh13dxh6w4pk2gb3ddmhpiaihqg-glibc-2.25/lib/libm.so.6 (0x00007ff924130000)
        libc.so.6 => /nix/store/kjwbqnh13dxh6w4pk2gb3ddmhpiaihqg-glibc-2.25/lib/libc.so.6 (0x00007ff923d91000)
        /nix/store/kjwbqnh13dxh6w4pk2gb3ddmhpiaihqg-glibc-2.25/lib64/ld-linux-x86-64.so.2 (0x00005654d7366000)

@Mic92
Copy link
Member

Mic92 commented Jul 21, 2017

@char16t Have you tried patchelf on ./embedded/gems/gems/ffi-1.9.18/ext/ffi_c/ffi_c.so to fix libffi dependencies?

@char16t
Copy link
Author

char16t commented Jul 21, 2017

Fixed! And vagrant {up,ssh,halt} works

[valeriy@nixos:/nix/store/xrcw6qnlbai5x438p6xpnnf6j3h7z4cd-vagrant-1.9.7/opt/vagrant]$ ldd ./embedded/gems/gems/ffi-1.9.18/ext/ffi_c/ffi_c.so
        linux-vdso.so.1 (0x00007ffea47b4000)
        libruby.so.2.3 => /nix/store/xrcw6qnlbai5x438p6xpnnf6j3h7z4cd-vagrant-1.9.7/opt/vagrant/embedded/lib/libruby.so.2.3 (0x00007fbcb623a000)
        libffi.so.6 => /nix/store/xrcw6qnlbai5x438p6xpnnf6j3h7z4cd-vagrant-1.9.7/opt/vagrant/embedded/lib/libffi.so.6 (0x00007fbcb6031000)
        libpthread.so.0 => /nix/store/kjwbqnh13dxh6w4pk2gb3ddmhpiaihqg-glibc-2.25/lib/libpthread.so.0 (0x00007fbcb5e13000)
        librt.so.1 => /nix/store/kjwbqnh13dxh6w4pk2gb3ddmhpiaihqg-glibc-2.25/lib/librt.so.1 (0x00007fbcb5c0b000)
        libdl.so.2 => /nix/store/kjwbqnh13dxh6w4pk2gb3ddmhpiaihqg-glibc-2.25/lib/libdl.so.2 (0x00007fbcb5a05000)
        libcrypt.so.1 => /nix/store/kjwbqnh13dxh6w4pk2gb3ddmhpiaihqg-glibc-2.25/lib/libcrypt.so.1 (0x00007fbcb57ca000)
        libm.so.6 => /nix/store/kjwbqnh13dxh6w4pk2gb3ddmhpiaihqg-glibc-2.25/lib/libm.so.6 (0x00007fbcb54b7000)
        libc.so.6 => /nix/store/kjwbqnh13dxh6w4pk2gb3ddmhpiaihqg-glibc-2.25/lib/libc.so.6 (0x00007fbcb5118000)
        /nix/store/kjwbqnh13dxh6w4pk2gb3ddmhpiaihqg-glibc-2.25/lib64/ld-linux-x86-64.so.2 (0x000055684fb7e000)

But I hardcoded version in path $out/opt/vagrant/embedded/gems/gems/ffi-1.9.18/ext/ffi_c/*.so*. Maybe replace this path with something better?

@grahamc
Copy link
Member

grahamc commented Jul 26, 2017

What if the version part is wildcarded too?

@char16t
Copy link
Author

char16t commented Jul 26, 2017 via email

@@ -132,6 +132,11 @@ in stdenv.mkDerivation rec {
'';

postFixup = ''
for lib in $out/opt/vagrant/embedded/gems/gems/ffi-1.9.18/ext/ffi_c/*.so*; do
Copy link
Member

@grahamc grahamc Jul 26, 2017

Choose a reason for hiding this comment

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

Sorry, I meant the ffi-1.9.18 bit.

Copy link
Author

Choose a reason for hiding this comment

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

Move a libffi version to let section?

@orivej
Copy link
Contributor

orivej commented Oct 2, 2017

#30017 has updated vagrant to 2.0.0

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.

None yet

7 participants