Open deliciouslytyped opened 4 years ago
cc @edolstra who added both of the original pieces
Hello, I'm a bot and I thank you in the name of the community for opening this issue.
To help our human contributors focus on the most-relevant reports, I check up on old issues to see if they're still relevant. This issue has had no activity for 180 days, and so I marked it as stale, but you can rest assured it will never be closed by a non-human.
The community would appreciate your effort in checking if the issue is still valid. If it isn't, please close it.
If the issue persists, and you'd like to remove the stale label, you simply need to leave a comment. Your comment can be as simple as "still important to me". If you'd like it to get more attention, you can ask for help by searching for maintainers and people that previously touched related code and @ mention them in a comment. You can use Git blame or GitHub's web interface on the relevant files to find them.
Lastly, you can always ask for help at our Discourse Forum or at #nixos' IRC channel.
I was surprised to stumble upon it. If there is a reason to remove this build information we should at least provide an explanation how to find it.
For me I needed to find out where the symlink in python library cv2 (cv2.__file__
) points to and then check the build log for it
nix log /nix/store/ibak5b5650j4i18cq49fivsl9m4pbd6h-opencv-4.3.0
@mixmixmix The reason is mentioned here: https://github.com/NixOS/nixpkgs/blob/04a2b269d8921505a2969fc9ec25c1f517f2b307/pkgs/development/libraries/opencv/default.nix#L32-L33
Seems to me like this will get fixed as soon as someone makes a PR :) (No I'm still not volunteerin x) )
https://github.com/NixOS/nixpkgs/blob/54a0e269b390ed436f19cf66a74cc757eac8c84f/pkgs/development/libraries/opencv/4.x.nix#L188 https://github.com/NixOS/nixpkgs/blob/9ec439e009098b3132848c525a033a602f74faed/pkgs/development/libraries/opencv/3.x.nix#L173 and https://github.com/NixOS/nixpkgs/blob/d83420f5e181a27919395a8a8b74e3604dbd5407/pkgs/development/libraries/opencv/default.nix#L35
destroy the build information for OpenCV 4, 3, and 2, respectively, which can be retrieved at runtime. The mangling is done to reduce closure size. Doing it this way is bad because it makes debugging dependency problems harder (e.g. https://github.com/NixOS/nixpkgs/pull/61253#issuecomment-605446102).
Furthermore I cannot see a reason why the method for OpenCV2 is different from the method used for 3 and 4; OpenCV appears to use the same CMake based generation for all 3 versions.
It has been suggested that nukeReferences (https://github.com/NixOS/nixpkgs/tree/master/pkgs/build-support/nuke-references) might be a better way to do this.