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

vcv-rack: Init at 0.6.2b #42679

Merged
merged 2 commits into from Jul 18, 2018
Merged

vcv-rack: Init at 0.6.2b #42679

merged 2 commits into from Jul 18, 2018

Conversation

Moredread
Copy link
Contributor

@Moredread Moredread commented Jun 27, 2018

Motivation for this change

VCV Rack is an interesting and relatively new Eurorack emulator.

There are a few problems I have with packing it, so your help would be appreciated.

Currently the following points need to be addressed:

  • Get installation working (there is no make install target, but it builds in a nix-shell)
  • Check whether all derivation dependencies are really needed
  • Better names for the overridden dependencies, i.e. with commit date
  • Check if we have permission to use the VCV name. Edit: I asked via mail and got an OK. Any ideas how to document that permanently?

It would be nice to fix these points:

  • Fetch all dependencies via Nix facilities, i.e. don't use fetchSubmodules. This would also allow to specify a tag instead of a revision for fetchFromGitHub
  • Cleanup/sort derivation arguments
  • Check if we can update the overridden dependencies in general
  • Maybe override optimization, as -march=nocona doesn't match the Nix default
  • Address glfw error when building against master on nixos-18.03 systems (See vcv-rack: Init at 0.6.2b #42679 (comment))
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.

@Moredread
Copy link
Contributor Author

Moredread commented Jun 27, 2018

Edit:

I only get the errors below when building in a nix-shell, i.e. without sandboxing. I guess it picks up an incompatible library. Let me know if you read this and have an idea how to fix that issue for non-sandboxed builds.

As the binary cache afaik builds with sandboxing, this shouldn't be a problem for users installing the package later on.

I leave this up for further reference.


When building against the nix master branch I get an error when I execute the Rack executable.

On my system with the nvidia driver:

./Rack: symbol lookup error: /nix/store/yck3b43w1xg7v7pg9cx3ycms5hgxc7sv-libGL-1.0.0/lib/libGL.so.1: undefined symbol: __GLXGL_CORE_FUNCTION

On my system using the intel driver a get a more arcane error with an error dialog

2018-07-16-141745_564x174_scrot

and

[0.007 warn src/window.cpp:304] GLFW error 65542: GLX: No GLXFBConfigs returned [0.007 warn src/window.cpp:304] GLFW error 65545: GLX: Failed to find a suitable GLXFBConfig

It seems that there is an incompatibility between the gl lib and/or the driver on master and nixos-18.03. I'm not sure though if this is just a result of using a more recent version of glfw in this derivation, or whether it also happens with other packages.

@Moredread Moredread force-pushed the vcvrack/init branch 5 times, most recently from abd11c9 to 9755654 Compare June 30, 2018 19:29
@Moredread Moredread force-pushed the vcvrack/init branch 4 times, most recently from ad82028 to 4485caf Compare July 5, 2018 01:18
@Moredread Moredread changed the title WIP vcvrack: Init at 0.6.1 vcv-rack: Init at 0.6.1 Jul 5, 2018
@Moredread
Copy link
Contributor Author

I think it is mostly ready for merging.

# revision instead
rev = "c6be92e5054e0aa8c4942ee7a1f0c67975fc141e";
sha256 = "02cm37hxyklyacjnj1ay067cm6h975xydiwij8lw6ml9sfbk33g5";
fetchSubmodules = true;
Copy link
Member

Choose a reason for hiding this comment

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

fetchFromGitHub should work with tags also, what didn't work with it?
Also, is fetchSubmodules = true really needed? It slows it down considerably as github's tarballs can't be used.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Oh, I don't know what I did previously, but now it works with the tagged version.

I think there are references directly to those submodule, so there would be a bit of work involved to retrieve all dependencies via Nix and patching everything up.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I have changed that in the latest version

, libzip, rtaudio, rtmidi, speex }:

let
# We need newer versions for some of the dependencies. They are normally
Copy link
Member

Choose a reason for hiding this comment

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

Have you tried using the existing versions in nixpkgs? It would be preferable for those to be used if possible.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The Nix package for rtaudio indeed works. I think I missed that because I was building against the stable Nix channel.

We still need a newer version for glfw though. There hasn't been an upstream release yet. :/

@infinisil
Copy link
Member

I'm getting an error when I try to run it:

X Error of failed request:  BadAtom (invalid Atom parameter)
  Major opcode of failed request:  20 (X_GetProperty)
  Atom id in failed request:  0x0
  Serial number of failed request:  178
  Current serial number in output stream:  178
terminate called without an active exception
[1]    2629            result/bin/Rack

@Moredread
Copy link
Contributor Author

Moredread commented Jul 10, 2018

@infinisil Mhh, is your main system on the 18.03 stable channel and have you build Rack against master? I could be related to #42679 (comment) in that case. What graphics driver are you using? With nvidia and intel I get errors related to OpenGL libs.

Can you please run Rack with -d and post the output?

Edit: It now even works on master on my 18.03 system... oO

@infinisil
Copy link
Member

I'm on latest unstable, happens with both an intel graphics card and an nvidia one, here's the output with -d: https://gist.github.com/e30fe7337f10abb942b24ac8882bc1a2

I'm using xmonad on these systems, not sure if that could be a reason.

@Moredread Moredread changed the title vcv-rack: Init at 0.6.1 vcv-rack: Init at 0.6.2b Jul 16, 2018
@Moredread
Copy link
Contributor Author

Moredread commented Jul 16, 2018

@infinisil You don't have a minimal NixOS config for xmonad on hand by chance that I can test it with VirtualBox and/or NixOps? :p

I'm really not sure what could cause that... My issue with the GL driver seems to come from building in a nix shell, i.e. without sandboxing.

With sandboxing it works. Have you tried it with sandboxing enabled and building the package via nix-build?

Copy link
Member

@infinisil infinisil left a comment

Choose a reason for hiding this comment

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

Eh, I tested it in a NixOS VM and it worked there, so it might just be a problem with my setup.

repo = "Rack";
rev = "v${version}";
sha256 = "0mn33aiafvqvds4hf9hywsr6f6y8y25g9vnjksf3cavxvnszy47y";
};
Copy link
Member

Choose a reason for hiding this comment

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

You can just add fetchSubodules = true; here instead of fetching each dependency manually. Will also make it work for future updates. (Note that the hash will have to change).

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I wasn't sure which way was better. I changed it back.

# Override the default global resource file directory
wrapProgram $out/bin/Rack --add-flags "-g $out"

runHook postInstall
Copy link
Member

Choose a reason for hiding this comment

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

These hooks should be called automatically


install -D -m755 -t $out/bin Rack
cp -r res $out/
cp LICENSE.txt LICENSE-dist.txt $out/
Copy link
Member

Choose a reason for hiding this comment

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

resources and the licenses should be in $out/share/rack

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Would be rack or Rack be better?

Copy link
Member

@infinisil infinisil left a comment

Choose a reason for hiding this comment

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

Looking good to me, thanks!

@infinisil infinisil merged commit b9c9a34 into NixOS:master Jul 18, 2018
@Moredread Moredread deleted the vcvrack/init branch September 8, 2018 09:47
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

3 participants