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

Chemistry-related commits, jmol init, bumped pymol, avogadro and tidied up all-packages.nix #31876

Closed
wants to merge 4 commits into from

Conversation

Mounium
Copy link
Contributor

@Mounium Mounium commented Nov 20, 2017

Motivation for this change
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
    • 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/)
  • Fits CONTRIBUTING.md.

@Mounium
Copy link
Contributor Author

Mounium commented Nov 21, 2017

Previous version of avogadro didn't build on current master (it said that libX11.so.6: No such file or directory even though ldd displayed a nix store entry), so I bumped it to a newer version. It uses eigen3_3.

@Mounium Mounium changed the title Chemistry-related commits, jmol init, bumped pymol and tidied up all-packages.nix Chemistry-related commits, jmol init, bumped pymol, avogadro and tidied up all-packages.nix Nov 21, 2017
src = fetchFromGitHub {
owner = "cryos";
repo = "avogadro";
rev = "92e20f0072c51badd0849eb354b5cf4bfd05e6a3";
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 specify a tag as revision as well

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 change it?

Copy link
Member

Choose a reason for hiding this comment

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

just personal taste, but pinning a package to a git tag explicitly shows me that this no random/unstable stuff from GitHub :-)

@@ -14250,9 +14244,6 @@ with pkgs;

docker-machine = callPackage ../applications/networking/cluster/docker-machine { };
docker-machine-kvm = callPackage ../applications/networking/cluster/docker-machine/kvm.nix { };
docker-machine-xhyve = callPackage ../applications/networking/cluster/docker-machine/xhyve.nix {
Copy link
Contributor

Choose a reason for hiding this comment

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

Why do you remove this? This seems unrelated to the other changes in this PR.

};
in
stdenv.mkDerivation {
name = "jmol";
Copy link
Contributor

Choose a reason for hiding this comment

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

Please append a version number at the end of the name.

src = fetchFromGitHub {
owner = "cryos";
repo = "avogadro";
rev = "8ac8408ac6113d375cdcaf233f89854a23fa280c";
Copy link
Contributor Author

Choose a reason for hiding this comment

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

@Ma27 I used a non-tagged version here, because the tagged 1.2.0 one uses eigen 3.2, which is no longer packaged.

@markuskowa
Copy link
Member

Building avogradro fails with build-use-sandbox enabled (cmake tries to download yaehmop):

-- Found Qt4: /nix/store/f2zybni1b4yy2hb8cz412i2242i46y5f-qt-4.8.7/bin/qmake (found suitable version "4.8.7", minimum required i 
CMake Warning (dev) at libavogadro/src/extensions/yaehmop/CMakeLists.txt:21:
  Syntax Warning in cmake code at column 29

  Argument not separated from preceding token by whitespace.
This warning is for project developers.  Use -Wno-dev to suppress it.

-- Downloading Yaehmop executable from https://github.com/psavery/yaehmop/releases/download/3.0.2/linux64-yaehmop.tgz
CMake Error at libavogadro/src/extensions/yaehmop/CMakeLists.txt:59 (file):
  file DOWNLOAD HASH mismatch

    for file: [/tmp/nix-build-avogadro-1.2.drv-0/source/build/bin/yaehmop.tgz]
      expected hash: [e878e96ea891d843ddb539b36da67117]
        actual hash: [d41d8cd98f00b204e9800998ecf8427e]
             status: [6;"Couldn't resolve host name"]



gcc -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -D_PYMOL_LIBPNG -D_PYMOL_INLINE -D3
-- Linking in static plugins: bsdyengine;navigatetool;elementcolor
contrib/uiuc/plugins/molfile_plugin/src/dlpolyplugin.c: In function 'read_dlpoly_config_structure':
contrib/uiuc/plugins/molfile_plugin/src/dlpolyplugin.c:292:3: warning: this 'if' clause does not guard... [-Wmisleading-indentat]
   if (NULL == fgets(fbuffer, 1024, data->file))
   ^~
contrib/uiuc/plugins/molfile_plugin/src/dlpolyplugin.c:295:5: note: ...this statement, but the latter is misleadingly indented a'
     if (NULL == fgets(fbuffer, 1024, data->file))
     ^~
-- Found Doxygen: /nix/store/148n7shgrbfg0h6c0rmgdlsijixjdw4b-doxygen-1.8.11/bin/doxygen (found version "1.8.11") found component
g++ -std=c++0x -fPIC -D_PYMOL_LIBPNG -D_PYMOL_INLINE -D_PYMOL_VMD_PLUGINS -D_HAVE_LIBXML -DMMTF_MSGPACK_USE_CPP11 -D_PYMOL_FREET3
-- docbook tools not found, doc targets disabled
-- Configuring incomplete, errors occurred!
See also "/tmp/nix-build-avogadro-1.2.drv-0/source/build/CMakeFiles/CMakeOutput.log".
See also "/tmp/nix-build-avogadro-1.2.drv-0/source/build/CMakeFiles/CMakeError.log".
gcc -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -D_PYMOL_LIBPNG -D_PYMOL_INLINE -D3
builder for ‘/nix/store/ak5giry0khs61x7dl1dwhfkvlm0qys46-avogadro-1.2.drv’ failed with exit code 1
error: build of ‘/nix/store/ak5giry0khs61x7dl1dwhfkvlm0qys46-avogadro-1.2.drv’ failed
The invocation of "nix-build -A jmol -A avogadro -A pymol /home/markus/.nox/nixpkgs" failed

@Mounium
Copy link
Contributor Author

Mounium commented Jan 30, 2018

I didn't check it with sandbox yet, will have a look at it, but I can't do so currently.
Does it build without sandbox?

@markuskowa
Copy link
Member

I can build it without sandboxing but the binary crashes with: "Invalid OpenGL context.
Either something is completely broken in your OpenGL setup (can you run any OpenGL application?), or you found a bug." (on mint linux/nix). I'll give it a try on NixOS later to check if I can run it there.

The problem with the sandbox is that a build process on nix should not download things. A better way to solve this would be to let nix download yaehmop and patch the cmake file to pick the version from the nix store (see e.g. https://github.com/NixOS/nixpkgs/blob/31637d09413c871b030c021eecf3abcee7c8b160/pkgs/applications/misc/nrsc5/default.nix).

@markuskowa
Copy link
Member

When I try to run it on NixOS it segfaults without any further messages.

  • system: "x86_64-linux"
  • host os: Linux 4.9.78, NixOS, 17.09.2875.c2b668ee726 (Hummingbird)
  • multi-user?: no
  • sandbox: no
  • version: nix-env (Nix) 1.11.16

@Mounium
Copy link
Contributor Author

Mounium commented Jan 31, 2018

It was quite a bit earlier that I made this pull request and it did build at the then current nixpkgs master. Also, I didn't remember it downloading something outside of nixpkgs, probably it didn't cause a problem then.

On non-nixos distros I believe that nothing works that need opengl without setting it up (nix doesn't link graphic libraries by default, it tries to find theme inside /run, this is the only non-pure part as far as I know, you can find an issue with a partial solution somewhere that uses the system libs with LD_LIBRARY_PATH, I think). As for the NixOS part, there definitely is some sort of problem, will try to repackage it, but can only do so tomorrow evening. Maybe try to change to a more recent revision of avogadro if you have the time/need it sooner. It's a tricky package, last time I tried it didn't even work on arch linux for some reason

@markuskowa
Copy link
Member

Thanks for the OpenGL tip. I have tried avogadro 1.2.0, but the segfault problem on NixOS is the same.

@Mounium
Copy link
Contributor Author

Mounium commented Feb 2, 2018

Strange thing is that it builds for me without trouble (although I didn't try with sandbox yet), and I can run it even on current master.. Did you fork this branch and built that, or did you just cherry-pick my commits? Maybe try the latter one once more, I really don't know what could be the problem..

@Mounium Mounium closed this Mar 26, 2018
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

5 participants