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

dnnl: run tests, fix install tree #79790

Merged
merged 1 commit into from Feb 12, 2020
Merged

Conversation

bhipple
Copy link
Contributor

@bhipple bhipple commented Feb 11, 2020

With the new update to 1.2 in #79426, some
the install tree coming out of cmake seems to have produced a duplicate copy of
the nix tree.

Motivation for this change
Things done
  • Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS linux)
  • 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 nixpkgs-review --run "nixpkgs-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)
  • Ensured that relevant documentation is up to date
  • Fits CONTRIBUTING.md.

With the new update to 1.2 in NixOS#79426, some
the install tree coming out of cmake seems to have produced a duplicate copy of
the nix tree.
# addition to the correct install; clean it up.
postInstall = ''
rm -r $out/nix
'';
Copy link
Contributor Author

Choose a reason for hiding this comment

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

On master, we seem to have gained a superfluous install tree:

$ nix build -f . dnnl.{out,dev,doc}; tree result*
result
├── lib
│   ├── libdnnl.so -> libdnnl.so.1
│   ├── libdnnl.so.1 -> libdnnl.so.1.2
│   └── libdnnl.so.1.2
└── nix
    └── store
        └── wmf3lp0bxz8r0vnyfx2zrg9ynhhrn9al-dnnl-1.2
            └── lib
                ├── cmake
                │   └── mkldnn
                ├── libmkldnn.so -> libdnnl.so
                ├── libmkldnn.so.1 -> libdnnl.so.1
                └── libmkldnn.so.1.2 -> libdnnl.so.1.2
result-1-dev
├── include
│   ├── dnnl_config.h
│   ├── dnnl_debug.h
│   ├── dnnl.h
│   ├── dnnl.hpp
│   ├── dnnl_types.h
│   ├── dnnl_version.h
│   ├── mkldnn_config.h
│   ├── mkldnn_debug.h
│   ├── mkldnn_dnnl_mangling.h
│   ├── mkldnn.h
│   ├── mkldnn.hpp
│   ├── mkldnn_types.h
│   └── mkldnn_version.h
├── lib
│   └── cmake
│       └── dnnl
│           ├── dnnl-config.cmake
│           ├── dnnl-config-version.cmake
│           ├── dnnl-targets.cmake
│           └── dnnl-targets-release.cmake
└── nix-support
    └── propagated-build-inputs
result-2-doc
└── share
    └── doc
        └── dnnl
            ├── LICENSE
            └── README

15 directories, 26 files

On this PR:

$ nix build -f . dnnl.{out,dev,doc}; tree result*
result
└── lib
    ├── libdnnl.so -> libdnnl.so.1
    ├── libdnnl.so.1 -> libdnnl.so.1.2
    └── libdnnl.so.1.2
result-1-dev
├── include
│   ├── dnnl_config.h
│   ├── dnnl_debug.h
│   ├── dnnl.h
│   ├── dnnl.hpp
│   ├── dnnl_types.h
│   ├── dnnl_version.h
│   ├── mkldnn_config.h
│   ├── mkldnn_debug.h
│   ├── mkldnn_dnnl_mangling.h
│   ├── mkldnn.h
│   ├── mkldnn.hpp
│   ├── mkldnn_types.h
│   └── mkldnn_version.h
├── lib
│   └── cmake
│       └── dnnl
│           ├── dnnl-config.cmake
│           ├── dnnl-config-version.cmake
│           ├── dnnl-targets.cmake
│           └── dnnl-targets-release.cmake
└── nix-support
    └── propagated-build-inputs
result-2-doc
└── share
    └── doc
        └── dnnl
            ├── LICENSE
            └── README

9 directories, 23 files

Copy link
Member

Choose a reason for hiding this comment

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

Likely an upstream bug. Perhaps some files are installed assuming a relative path.

A similar issue we had with also a cmake build in #76855.

Copy link
Contributor

@jonringer jonringer left a comment

Choose a reason for hiding this comment

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

diff LGTM

[3 built, 1 copied (20.4 MiB), 3.6 MiB DL]
https://github.com/NixOS/nixpkgs/pull/79790
1 package built:
dnnl

@jonringer jonringer merged commit ed5f25f into NixOS:master Feb 12, 2020
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