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

thinc: fix darwin build #46092

Merged
merged 1 commit into from Sep 5, 2018
Merged

thinc: fix darwin build #46092

merged 1 commit into from Sep 5, 2018

Conversation

danieldk
Copy link
Contributor

@danieldk danieldk commented Sep 5, 2018

Motivation for this change

thinc uses Accelerate on macOS as a blas library. Add the necessary
dependencies to allow building on unsandboxed Darwin machines.

With this change, spacy should also build on Darwin.

ZHF #45961

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.

thinc uses Accelerate on macOS as a blas library. Add the necessary
dependencies to allow building on unsandboxed Darwin machines.
@xeji
Copy link
Contributor

xeji commented Sep 5, 2018

@GrahamcOfBorg build thinc

@GrahamcOfBorg
Copy link

No attempt on aarch64-linux (full log)

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

Partial log (click to expand)

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

@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: thinc

Partial log (click to expand)

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

@xeji
Copy link
Contributor

xeji commented Sep 5, 2018

I admit I didn't check, but the commit message should read pythonPackages.thinc.... 😄
@GrahamcOfBorg build python36Packages.thinc python27Packages.thinc

@GrahamcOfBorg
Copy link

Success on x86_64-linux (full log)

Attempted: python36Packages.thinc, python27Packages.thinc

Partial log (click to expand)

copying path '/nix/store/wiviadg6f35l14r8ggp9a3v5zg67180g-python3.6-toolz-0.9.0' from 'https://cache.nixos.org'...
copying path '/nix/store/vy17vfn8v8z0jj2yq0ajdbwlvygsb115-python3.6-tqdm-4.25.0' from 'https://cache.nixos.org'...
copying path '/nix/store/v4ac3a0plwivhzly1p1sfzcm0nhqr0cc-python3.6-wrapt-1.10.11' from 'https://cache.nixos.org'...
copying path '/nix/store/ahdhxr700nl8xy0cmac2cp23m92hk8lg-python3.6-mock-2.0.0' from 'https://cache.nixos.org'...
copying path '/nix/store/g256w45wk6fx2fg03x700s38gj3pa9q0-python3.6-more-itertools-4.3.0' from 'https://cache.nixos.org'...
copying path '/nix/store/k82faygdwff4a8nd0xa0j5xa30fn6dmm-python3.6-pytest-3.7.4' from 'https://cache.nixos.org'...
copying path '/nix/store/bkp9yldkb2gx4877g92nlmgp9gsh0qmq-python3.6-cytoolz-0.9.0.1' from 'https://cache.nixos.org'...
copying path '/nix/store/k7qd5m9bd9ich64pjqa55vsvbhdnl00w-python3.6-thinc-6.11.2' from 'https://cache.nixos.org'...
/nix/store/k7qd5m9bd9ich64pjqa55vsvbhdnl00w-python3.6-thinc-6.11.2
/nix/store/n39kky1h2b4a21psxbv4323ndddiyh06-python2.7-thinc-6.11.2

@GrahamcOfBorg
Copy link

Failure on aarch64-linux (full log)

Attempted: python36Packages.thinc, python27Packages.thinc

Partial log (click to expand)

    e.build_objects(self.compiler, src_dir)
  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
error: build of '/nix/store/3xj8sci324bcbrkqdicfkk0pz4vkvhj9-python3.6-thinc-6.11.2.drv', '/nix/store/a01pfrxzqx9mflklgzhwq4pyc1rxn4pz-python2.7-thinc-6.11.2.drv' failed

@danieldk
Copy link
Contributor Author

danieldk commented Sep 5, 2018

Ah, oops, I'll do that the next time ;).

@xeji
Copy link
Contributor

xeji commented Sep 5, 2018

no worries, I can do magic when merging...
was broken on aarch64 before, so let's ignore that for now and just look at darwin.

@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: thinc

Partial log (click to expand)

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

@GrahamcOfBorg
Copy link

Success on x86_64-darwin (full log)

Attempted: python36Packages.thinc, python27Packages.thinc

Partial log (click to expand)

Requirement already satisfied: coverage>=4.0 in /nix/store/cs1vfk8fmxbx98bapb9vvrp45wpkrgmh-python3.6-coverage-4.5.1/lib/python3.6/site-packages (from hypothesis>=2->thinc==6.11.2) (4.5.1)
Installing collected packages: thinc
Successfully installed thinc-6.11.2
/private/tmp/nix-build-python3.6-thinc-6.11.2.drv-0/thinc-6.11.2
post-installation fixup
strip is /nix/store/df6k4mgdjxciy0f637lryp7c9ln7n1m3-cctools-binutils-darwin/bin/strip
stripping (with command strip and flags -S) in /nix/store/zby9r9rxy7d01d62v2pysmhn33032abb-python3.6-thinc-6.11.2/lib
patching script interpreter paths in /nix/store/zby9r9rxy7d01d62v2pysmhn33032abb-python3.6-thinc-6.11.2
/nix/store/zby9r9rxy7d01d62v2pysmhn33032abb-python3.6-thinc-6.11.2
/nix/store/8nj0vx3hv6fqaggg1nsccj2g8ab3zvsz-python2.7-thinc-6.11.2

@xeji
Copy link
Contributor

xeji commented Sep 5, 2018

@GrahamcOfBorg build python36Packages.spacy python27Packages.spacy

@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

Success on x86_64-linux (full log)

Attempted: python36Packages.spacy, python27Packages.spacy

Partial log (click to expand)

copying path '/nix/store/kh44p1x4z8cwwhav29csrdig0jskzndr-python3.6-webencodings-0.5.1' from 'https://cache.nixos.org'...
copying path '/nix/store/1bs6dqd8393fc6gy13w9zdm4s2vx1r4w-python3.6-cryptography-2.3.1-dev' from 'https://cache.nixos.org'...
copying path '/nix/store/3hqfvm2s3lmai5gw27lxpm02zi0m0xg1-python3.6-html5lib-1.0.1' from 'https://cache.nixos.org'...
copying path '/nix/store/834v3x9lz1vbrrlnxbdpnyrmxqraj15d-python3.6-pyOpenSSL-18.0.0-dev' from 'https://cache.nixos.org'...
copying path '/nix/store/wphh2s31x39mqhb7188zyjv7sp08l5xn-python3.6-urllib3-1.23' from 'https://cache.nixos.org'...
copying path '/nix/store/byn3cjaz1cqifnq27xwvcr58njznnw8v-python3.6-requests-2.19.1-dev' from 'https://cache.nixos.org'...
copying path '/nix/store/ky65g67gk2c8qzhiragrl3zldzdl3mqp-python3.6-ftfy-4.4.3' from 'https://cache.nixos.org'...
copying path '/nix/store/d9c148kzzvh5r9vshdysmymdhdmdmbx4-python3.6-spacy-2.0.12' from 'https://cache.nixos.org'...
/nix/store/d9c148kzzvh5r9vshdysmymdhdmdmbx4-python3.6-spacy-2.0.12
/nix/store/cdpa7gjg6pxl5d0x3hvnr38j2l2182f7-python2.7-spacy-2.0.12

@GrahamcOfBorg
Copy link

Success on x86_64-darwin (full log)

Attempted: python36Packages.spacy, python27Packages.spacy

Partial log (click to expand)

Requirement already satisfied: coverage>=4.0 in /nix/store/cs1vfk8fmxbx98bapb9vvrp45wpkrgmh-python3.6-coverage-4.5.1/lib/python3.6/site-packages (from hypothesis>=2->thinc>=6.10.3->spacy==2.0.12) (4.5.1)
Installing collected packages: spacy
Successfully installed spacy-2.0.12
/private/tmp/nix-build-python3.6-spacy-2.0.12.drv-0/spacy-2.0.12
post-installation fixup
strip is /nix/store/df6k4mgdjxciy0f637lryp7c9ln7n1m3-cctools-binutils-darwin/bin/strip
stripping (with command strip and flags -S) in /nix/store/vijwrn3cdi0aqm4i9g7qamhmv48mc5i5-python3.6-spacy-2.0.12/lib  /nix/store/vijwrn3cdi0aqm4i9g7qamhmv48mc5i5-python3.6-spacy-2.0.12/bin
patching script interpreter paths in /nix/store/vijwrn3cdi0aqm4i9g7qamhmv48mc5i5-python3.6-spacy-2.0.12
/nix/store/vijwrn3cdi0aqm4i9g7qamhmv48mc5i5-python3.6-spacy-2.0.12
/nix/store/6whi7cnilsssxb2gb34m4k8sqgjvx8zy-python2.7-spacy-2.0.12

@xeji xeji merged commit 348a153 into NixOS:master Sep 5, 2018
xeji pushed a commit that referenced this pull request Sep 5, 2018
thinc uses Accelerate on macOS as a blas library. Add the necessary
dependencies to allow building on unsandboxed Darwin machines.

(cherry picked from commit 348a153)
@xeji
Copy link
Contributor

xeji commented Sep 5, 2018

backported: e36e682

@danieldk danieldk deleted the thinc-darwin branch September 5, 2018 14:26
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