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

tbb: fix installPhase bug skipping hooks #107967

Merged
merged 1 commit into from Jan 12, 2021
Merged

Conversation

bhipple
Copy link
Contributor

@bhipple bhipple commented Dec 30, 2020

If you have a pre/post install hook in an overlay, it currently does not run.

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.

If you have a pre/post install hook in an overlay, it currently does not run.
@DIzFer
Copy link
Contributor

DIzFer commented Dec 30, 2020

Is this really the place to solve this? Is it necessary to solve this on each and every package for which a pre/post install hook might be desirable? Or does the bug only happen with tbb?

@bhipple
Copy link
Contributor Author

bhipple commented Dec 30, 2020

Unfortunately, yes, it is; whenever you clobber one of the phases like this, you have to run the hooks, e.g.:
https://github.com/NixOS/nixpkgs/search?q=runHook

Generally, in most cases, you can avoid this hassle by putting the package's customization into one of the preX or postX hooks, but in this particular case we actually do want to clobber the default installPhase.

@SuperSandro2000
Copy link
Member

SuperSandro2000 commented Dec 31, 2020

Result of nixpkgs-review pr 107967 run on x86_64-darwin 1

3 packages marked as broken and skipped:
  • cq-editor
  • pdal
  • sysdig
18 packages failed to build:
  • blender
  • bowtie2
  • embree
  • inkcut
  • opencascade
  • openimagedenoise
  • python37Packages.cadquery
  • python37Packages.enamlx
  • python37Packages.pythonocc-core
  • python37Packages.tiledb
  • python38Packages.enamlx
  • python38Packages.pythonocc-core
  • python38Packages.tiledb
  • python39Packages.enamlx
  • python39Packages.pythonocc-core
  • smesh
  • tbb
  • tiledb

tbb

builder for '/nix/store/9hdjax71b6vkhg5p4zhdgf31fhzwghgn-tbb-2019_U9.drv' failed with exit code 2; last 10 log lines:
tbb::internal::micro_queue::assign(tbb::internal::micro_queue const&, tbb::internal::concurrent_queue_base_v3&,
tbb::internal::concurrent_queue_base_v3::copy_specifics) in concurrent_queue.o
tbb::internal::concurrent_queue_base_v3::~concurrent_queue_base_v3() in concurrent_queue.o
tbb::internal::concurrent_queue_base_v3::internal_insert_item(void const*,
tbb::internal::concurrent_queue_base_v3::copy_specifics) in concurrent_queue.o
tbb::internal::concurrent_queue_base_v3::internal_pop(void*) in concurrent_queue.o
...
ld: symbol(s) not found for architecture i386
clang-7: error: linker command failed with exit code 1 (use -v to see invocation)
make[1]: *** [../../build/Makefile.tbb:103: libtbb_debug.dylib] Error 1
make[1]: Leaving directory '/private/tmp/nix-build-tbb-2019_U9.drv-0/source/build/macos_ia32_clang_cc7.1.0_os_debug'
make: *** [Makefile:28: tbb] Error 2

@bhipple
Copy link
Contributor Author

bhipple commented Jan 12, 2021

Looks like a good pile of other issues, but there are strictly fewer problems after this PR, so merging.

@bhipple bhipple merged commit ca34535 into NixOS:master Jan 12, 2021
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