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

spacy: Fix build #46090

Merged
merged 2 commits into from Sep 5, 2018
Merged

spacy: Fix build #46090

merged 2 commits into from Sep 5, 2018

Conversation

danieldk
Copy link
Contributor

@danieldk danieldk commented Sep 5, 2018

Motivation for this change

Fix thinc and spacy builds.

ZHF #45960

To make spacy usable again, the model packages need to be updated as well. I will do this in a separate PR if I have time later today or tomorrow.

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.

@@ -37,7 +37,8 @@ buildPythonPackage rec {
--replace "ftfy==" "ftfy>=" \
--replace "msgpack-python==" "msgpack-python>=" \
--replace "msgpack-numpy==" "msgpack-numpy>=" \
--replace "pathlib" "pathlib; python_version<\"3.4\""
--replace "thinc>=6.10.3,<6.11.0" "thinc>=6.10.3,<6.12.0" \
--replace "plac<1.0.0,>=0.9.6" "plac<1.1.0,>=0.9.6"
Copy link
Member

Choose a reason for hiding this comment

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

Why not removing the upper bound?

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 could do that, but I am not sure how much these packages stick to semver or any API stability for that matter ;). I did some small tests to confirm that plac 1.0 and thinc 6.11 work with spacy.

But I'll update the PR without these upper bounds.

@danieldk
Copy link
Contributor Author

danieldk commented Sep 5, 2018

I have removed the upper bounds.

@Mic92
Copy link
Member

Mic92 commented Sep 5, 2018

@GrahamcOfBorg build spacy thinc

@GrahamcOfBorg
Copy link

No attempt on aarch64-linux (full log)

The following builds were skipped because they don't evaluate on aarch64-linux: spacy, thinc

Partial log (click to expand)

Cannot nix-instantiate `spacy' because:
error: attribute 'spacy' in selection path 'spacy' not found

Cannot nix-instantiate `thinc' because:
error: attribute 'thinc' in selection path 'thinc' not found

@Mic92
Copy link
Member

Mic92 commented Sep 5, 2018

@GrahamcOfBorg build python36Packages.spacy python27Packages.spacy

@GrahamcOfBorg
Copy link

No attempt on x86_64-linux (full log)

The following builds were skipped because they don't evaluate on x86_64-linux: spacy, thinc

Partial log (click to expand)

Cannot nix-instantiate `spacy' because:
error: attribute 'spacy' in selection path 'spacy' not found

Cannot nix-instantiate `thinc' because:
error: attribute 'thinc' in selection path 'thinc' not found

@GrahamcOfBorg
Copy link

No attempt on x86_64-darwin (full log)

The following builds were skipped because they don't evaluate on x86_64-darwin: spacy, thinc

Partial log (click to expand)

Cannot nix-instantiate `spacy' because:
error: attribute 'spacy' in selection path 'spacy' not found

Cannot nix-instantiate `thinc' because:
error: attribute 'thinc' in selection path 'thinc' not found

@GrahamcOfBorg
Copy link

Failure on aarch64-linux (full log)

Attempted: python36Packages.spacy, python27Packages.spacy

Partial log (click to expand)

  File "setup.py", line 83, in build_objects
    compiler, src_dir, 'cblas_s%s' % iface, iface))
  File "setup.py", line 195, in compile_interface
    if self.is_haswell:
  File "setup.py", line 65, in is_haswell
    return self.cpu_info['model'] >= 63
KeyError: 'model'
builder for '/nix/store/3xj8sci324bcbrkqdicfkk0pz4vkvhj9-python3.6-thinc-6.11.2.drv' failed with exit code 1
cannot build derivation '/nix/store/8p2iwrkhsip703j9gx5ah75q8wjzdsma-python3.6-spacy-2.0.12.drv': 1 dependencies couldn't be built
error: build of '/nix/store/8p2iwrkhsip703j9gx5ah75q8wjzdsma-python3.6-spacy-2.0.12.drv', '/nix/store/9m3d22ymnm2hc8yvlrfpddgv149mfhwd-python2.7-spacy-2.0.12.drv' failed

@GrahamcOfBorg
Copy link

Failure on x86_64-darwin (full log)

Attempted: python36Packages.spacy, python27Packages.spacy

Partial log (click to expand)

clang-5.0: warning: argument unused during compilation: '-fno-strict-overflow' [-Wunused-command-line-argument]
In file included from thinc/openblas.cpp:579:
/private/tmp/nix-build-python3.6-thinc-6.11.2.drv-0/thinc-6.11.2/include/cblas.h:2:10: fatal error: 'Accelerate/Accelerate.h' file not found
#include <Accelerate/Accelerate.h>
         ^~~~~~~~~~~~~~~~~~~~~~~~~
1 error generated.
error: command 'clang++' failed with exit status 1
builder for '/nix/store/cvv67b58wb97jlr734rznm6s55i7l6wx-python3.6-thinc-6.11.2.drv' failed with exit code 1
cannot build derivation '/nix/store/n6aqxhjn2y7gz4xf5306kzsgjdah0nfb-python3.6-spacy-2.0.12.drv': 1 dependencies couldn't be built
error: build of '/nix/store/443rkf73xy6bp9hcl5z36f6y4x1b3pak-python2.7-spacy-2.0.12.drv', '/nix/store/n6aqxhjn2y7gz4xf5306kzsgjdah0nfb-python3.6-spacy-2.0.12.drv' failed

@GrahamcOfBorg
Copy link

Success on x86_64-linux (full log)

Attempted: python36Packages.spacy, python27Packages.spacy

Partial log (click to expand)

shrinking /nix/store/d9c148kzzvh5r9vshdysmymdhdmdmbx4-python3.6-spacy-2.0.12/lib/python3.6/site-packages/spacy/tokens/_retokenize.cpython-36m-x86_64-linux-gnu.so
shrinking /nix/store/d9c148kzzvh5r9vshdysmymdhdmdmbx4-python3.6-spacy-2.0.12/lib/python3.6/site-packages/spacy/tokens/doc.cpython-36m-x86_64-linux-gnu.so
shrinking /nix/store/d9c148kzzvh5r9vshdysmymdhdmdmbx4-python3.6-spacy-2.0.12/lib/python3.6/site-packages/spacy/tokens/token.cpython-36m-x86_64-linux-gnu.so
shrinking /nix/store/d9c148kzzvh5r9vshdysmymdhdmdmbx4-python3.6-spacy-2.0.12/lib/python3.6/site-packages/spacy/strings.cpython-36m-x86_64-linux-gnu.so
strip is /nix/store/h0lbngpv6ln56hjj59i6l77vxq25flbz-binutils-2.30/bin/strip
stripping (with command strip and flags -S) in /nix/store/d9c148kzzvh5r9vshdysmymdhdmdmbx4-python3.6-spacy-2.0.12/lib  /nix/store/d9c148kzzvh5r9vshdysmymdhdmdmbx4-python3.6-spacy-2.0.12/bin
patching script interpreter paths in /nix/store/d9c148kzzvh5r9vshdysmymdhdmdmbx4-python3.6-spacy-2.0.12
checking for references to /build in /nix/store/d9c148kzzvh5r9vshdysmymdhdmdmbx4-python3.6-spacy-2.0.12...
/nix/store/d9c148kzzvh5r9vshdysmymdhdmdmbx4-python3.6-spacy-2.0.12
/nix/store/cdpa7gjg6pxl5d0x3hvnr38j2l2182f7-python2.7-spacy-2.0.12

@Mic92 Mic92 merged commit e9e28b1 into NixOS:master Sep 5, 2018
@Mic92
Copy link
Member

Mic92 commented Sep 5, 2018

backport:

[detached HEAD 7888e26] thinc: relax dependency version requirements
Author: Daniël de Kok me@danieldk.eu
Date: Wed Sep 5 08:17:34 2018 +0200
1 file changed, 3 insertions(+), 1 deletion(-)
[detached HEAD e928fd9] spacy: relax dependency versions
Author: Daniël de Kok me@danieldk.eu
Date: Wed Sep 5 08:38:52 2018 +0200
1 file changed, 2 insertions(+), 1 deletion(-)

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