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

python36Packages.cython: Disable tests on aarch64 #41453

Merged
merged 1 commit into from Jun 7, 2018

Conversation

etu
Copy link
Contributor

@etu etu commented Jun 4, 2018

Motivation for this change

The tests doesn't run on aarch64 and it's reported to upstream here:
cython/cython#2308

This would also resolve #41347 for now.

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/)
  • Fits CONTRIBUTING.md.

cc @FRidh @dezgeg

@GrahamcOfBorg
Copy link

Success on x86_64-linux (full log)

Attempted: python36Packages.cython

Partial log (click to expand)

these paths will be fetched (2.74 MiB download, 12.31 MiB unpacked):
  /nix/store/1lv0f3c2dqzrxsgvyh3hzggk0kd1pf0l-python3.6-Cython-0.28.2
copying path '/nix/store/1lv0f3c2dqzrxsgvyh3hzggk0kd1pf0l-python3.6-Cython-0.28.2' from 'https://cache.nixos.org'...
/nix/store/1lv0f3c2dqzrxsgvyh3hzggk0kd1pf0l-python3.6-Cython-0.28.2

Copy link
Member

@FRidh FRidh left a comment

Choose a reason for hiding this comment

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

Disable specific tests instead of the whole suite.

@GrahamcOfBorg
Copy link

Success on aarch64-linux (full log)

Attempted: python36Packages.cython

Partial log (click to expand)

shrinking /nix/store/8p0bgxylavg1l4r3wd0wwmrhkmp2n4dq-python3.6-Cython-0.28.2/lib/python3.6/site-packages/Cython/Tempita/_tempita.cpython-36m-aarch64-linux-gnu.so
shrinking /nix/store/8p0bgxylavg1l4r3wd0wwmrhkmp2n4dq-python3.6-Cython-0.28.2/lib/python3.6/site-packages/Cython/StringIOTree.cpython-36m-aarch64-linux-gnu.so
strip is /nix/store/qg2agrqkf240s656d207zqhipl0bc2id-binutils-2.30/bin/strip
stripping (with command strip and flags -S) in /nix/store/8p0bgxylavg1l4r3wd0wwmrhkmp2n4dq-python3.6-Cython-0.28.2/lib  /nix/store/8p0bgxylavg1l4r3wd0wwmrhkmp2n4dq-python3.6-Cython-0.28.2/bin
patching script interpreter paths in /nix/store/8p0bgxylavg1l4r3wd0wwmrhkmp2n4dq-python3.6-Cython-0.28.2
checking for references to /build in /nix/store/8p0bgxylavg1l4r3wd0wwmrhkmp2n4dq-python3.6-Cython-0.28.2...
wrapping `/nix/store/8p0bgxylavg1l4r3wd0wwmrhkmp2n4dq-python3.6-Cython-0.28.2/bin/cythonize'...
wrapping `/nix/store/8p0bgxylavg1l4r3wd0wwmrhkmp2n4dq-python3.6-Cython-0.28.2/bin/cython'...
wrapping `/nix/store/8p0bgxylavg1l4r3wd0wwmrhkmp2n4dq-python3.6-Cython-0.28.2/bin/cygdb'...
/nix/store/8p0bgxylavg1l4r3wd0wwmrhkmp2n4dq-python3.6-Cython-0.28.2

@etu etu force-pushed the disable-cython-tests-on-aarch64 branch from 08af4d4 to aa92ba9 Compare June 4, 2018 17:07
@etu
Copy link
Contributor Author

etu commented Jun 4, 2018

@FRidh I'm not sure how python behaves if getting two --exclude flags though.

@GrahamcOfBorg
Copy link

Success on x86_64-linux (full log)

Attempted: python36Packages.cython

Partial log (click to expand)


OK
Following tests excluded because of missing dependencies on your system:
   Cython.Coverage
   run.coverage_api
   run.coverage_cmd
   run.coverage_nogil
   run.numpy_pythran
ALL DONE
/nix/store/69lq0i8zjm0fviwp02lxc8grpsr2q740-python3.6-Cython-0.28.2

@GrahamcOfBorg
Copy link

Failure on aarch64-linux (full log)

Attempted: python36Packages.cython

Partial log (click to expand)

                 from /nix/store/sh7z6vib9kxhsj5rjydcd0hqs9acs5y0-python3.6-numpy-1.14.3/lib/python3.6/site-packages/numpy/core/include/numpy/ndarrayobject.h:18,
                 from /nix/store/sh7z6vib9kxhsj5rjydcd0hqs9acs5y0-python3.6-numpy-1.14.3/lib/python3.6/site-packages/numpy/core/include/numpy/arrayobject.h:4,
                 from memoryviewattrs.cpp:580:
/nix/store/sh7z6vib9kxhsj5rjydcd0hqs9acs5y0-python3.6-numpy-1.14.3/lib/python3.6/site-packages/numpy/core/include/numpy/npy_1_7_deprecated_api.h:15:2: warning: #warning "Using deprecated NumPy API, disable it by " "#defining NPY_NO_DEPRECATED_API NPY_1_7_API_VERSION" [-Wcpp]
 #warning "Using deprecated NumPy API, disable it by " \
  ^~~~~~~
acquired default
acquired Global_A
building of '/nix/store/7g7hv0caz1wr66ca0r4yj2v867mnghd6-python3.6-Cython-0.28.2.drv' timed out after 3600 seconds
error: build of '/nix/store/7g7hv0caz1wr66ca0r4yj2v867mnghd6-python3.6-Cython-0.28.2.drv' failed

checkPhase = ''
export HOME="$NIX_BUILD_TOP"
${python.interpreter} runtests.py \
${if stdenv.cc.isClang or false then ''--exclude="(cpdef_extern_func|libcpp_algo)"'' else ""}
${if stdenv.cc.isClang or false then ''--exclude="(cpdef_extern_func|libcpp_algo)"'' else ""} \
Copy link
Member

Choose a reason for hiding this comment

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

lib.optionalString

checkPhase = ''
export HOME="$NIX_BUILD_TOP"
${python.interpreter} runtests.py \
${if stdenv.cc.isClang or false then ''--exclude="(cpdef_extern_func|libcpp_algo)"'' else ""}
${if stdenv.cc.isClang or false then ''--exclude="(cpdef_extern_func|libcpp_algo)"'' else ""} \
${if stdenv.isArch64 or false then ''--exclude="test_coerce_to_numpy"'' else ""}
Copy link
Member

Choose a reason for hiding this comment

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

No or false here - stdenv.isArch64 is always defined.

Copy link
Member

Choose a reason for hiding this comment

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

also s/isArch64/isAarch64/

Copy link
Member

@veprbl veprbl Jun 5, 2018

Choose a reason for hiding this comment

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

To not break compilation with clang on aarch64 we could refactor to something like

let
  excluded_tests = []
    ++ stdenv.lib.optionals (stdenv.cc.isClang or false) [ "cpdef_extern_func" "libcpp_algo" ]
    ++ stdenv.lib.optionals stdenv.isAarch64 [ "test_coerce_to_numpy" ]
    ;
in
  stdenv.lib.optionalString
    (builtins.length excluded_tests != 0)
    ''--exclude="(${builtins.concatStringsSep "|" excluded_tests})"''

(IIRC two exclude flags won't work here)

Copy link
Member

Choose a reason for hiding this comment

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

stdenv.cc.isClang isn't always defined?

Copy link
Member

Choose a reason for hiding this comment

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

@dotlambda When I was working with it, it was only defined for clang.cc. I don't think anything changed since then.

Copy link
Member

Choose a reason for hiding this comment

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

Actually, it appears, multiple exclude options are allowed: cython/cython@7631e5d

@GrahamcOfBorg
Copy link

Success on x86_64-linux (full log)

Attempted: python36Packages.cython

Partial log (click to expand)

these paths will be fetched (13.22 MiB download, 69.07 MiB unpacked):
  /nix/store/1lv0f3c2dqzrxsgvyh3hzggk0kd1pf0l-python3.6-Cython-0.28.2
  /nix/store/acxw8n8pijhy9zl2ghhr0ihwk31ry6wq-python3.6-setuptools-39.0.1
  /nix/store/d0az5vfrk5cm65wcvxmfj2hjk613k9ni-xz-5.2.4
  /nix/store/rsa1rsd6c6szy0dmi61599b33aqiy269-python3-3.6.5
copying path '/nix/store/d0az5vfrk5cm65wcvxmfj2hjk613k9ni-xz-5.2.4' from 'https://cache.nixos.org'...
copying path '/nix/store/rsa1rsd6c6szy0dmi61599b33aqiy269-python3-3.6.5' from 'https://cache.nixos.org'...
copying path '/nix/store/acxw8n8pijhy9zl2ghhr0ihwk31ry6wq-python3.6-setuptools-39.0.1' from 'https://cache.nixos.org'...
copying path '/nix/store/1lv0f3c2dqzrxsgvyh3hzggk0kd1pf0l-python3.6-Cython-0.28.2' from 'https://cache.nixos.org'...
/nix/store/1lv0f3c2dqzrxsgvyh3hzggk0kd1pf0l-python3.6-Cython-0.28.2

++ stdenv.lib.optionals (stdenv.cc.isClang or false) [ "cpdef_extern_func" "libcpp_algo" ]
# Some tests in the test suite isn't working on aarch64. Disable them for
# now until upstream finds a workaround.
++ stdenv.lib.optionals stdenv.isAarch64 [ "test_coerce_to_numpy" ]
Copy link
Member

Choose a reason for hiding this comment

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

Please add a link to the upstream issue.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done.

@etu etu force-pushed the disable-cython-tests-on-aarch64 branch from acb0de9 to 59ebe3b Compare June 5, 2018 20:09
@GrahamcOfBorg
Copy link

Success on x86_64-linux (full log)

Attempted: python36Packages.cython

Partial log (click to expand)

/nix/store/1lv0f3c2dqzrxsgvyh3hzggk0kd1pf0l-python3.6-Cython-0.28.2

@GrahamcOfBorg
Copy link

Failure on aarch64-linux (full log)

Attempted: python36Packages.cython

Partial log (click to expand)

                 from /nix/store/sh7z6vib9kxhsj5rjydcd0hqs9acs5y0-python3.6-numpy-1.14.3/lib/python3.6/site-packages/numpy/core/include/numpy/ndarrayobject.h:18,
                 from /nix/store/sh7z6vib9kxhsj5rjydcd0hqs9acs5y0-python3.6-numpy-1.14.3/lib/python3.6/site-packages/numpy/core/include/numpy/arrayobject.h:4,
                 from memoryviewattrs.cpp:580:
/nix/store/sh7z6vib9kxhsj5rjydcd0hqs9acs5y0-python3.6-numpy-1.14.3/lib/python3.6/site-packages/numpy/core/include/numpy/npy_1_7_deprecated_api.h:15:2: warning: #warning "Using deprecated NumPy API, disable it by " "#defining NPY_NO_DEPRECATED_API NPY_1_7_API_VERSION" [-Wcpp]
 #warning "Using deprecated NumPy API, disable it by " \
  ^~~~~~~
acquired default
acquired Global_A
building of '/nix/store/qz8a66gp92hn3v3aajplyx4r91m07kj5-python3.6-Cython-0.28.2.drv' timed out after 3600 seconds
error: build of '/nix/store/qz8a66gp92hn3v3aajplyx4r91m07kj5-python3.6-Cython-0.28.2.drv' failed

@GrahamcOfBorg
Copy link

Failure on aarch64-linux (full log)

Attempted: python36Packages.cython

Partial log (click to expand)

   int __pyx_t_2[1];
       ^~~~~~~~~
==============================

=== C/C++ compiler error output: ===
khavkine1.cpp: In function ‘PyObject* __pyx_f_9khavkine1___pyx_unpickle_T__set_state(__pyx_obj_9khavkine1_T*, PyObject*)’:
khavkine1.cpp:1914:7: warning: ‘__pyx_t_2’ may be used uninitialized in this function [-Wmaybe-uninitialized]
   int __pyx_t_2[1];
building of '/nix/store/qz8a66gp92hn3v3aajplyx4r91m07kj5-python3.6-Cython-0.28.2.drv' timed out after 3600 seconds
error: build of '/nix/store/qz8a66gp92hn3v3aajplyx4r91m07kj5-python3.6-Cython-0.28.2.drv' failed

@etu
Copy link
Contributor Author

etu commented Jun 6, 2018

I just want to wait for my raspberry to finish building this just to be sure... :)

@etu etu force-pushed the disable-cython-tests-on-aarch64 branch from 59ebe3b to 370f41b Compare June 6, 2018 11:41
@GrahamcOfBorg
Copy link

Success on x86_64-linux (full log)

Attempted: python36Packages.cython

Partial log (click to expand)

/nix/store/1lv0f3c2dqzrxsgvyh3hzggk0kd1pf0l-python3.6-Cython-0.28.2

@GrahamcOfBorg
Copy link

Failure on aarch64-linux (full log)

Attempted: python36Packages.cython

Partial log (click to expand)

  ^~~~~~~
In file included from /nix/store/sh7z6vib9kxhsj5rjydcd0hqs9acs5y0-python3.6-numpy-1.14.3/lib/python3.6/site-packages/numpy/core/include/numpy/ndarraytypes.h:1816:0,
                 from /nix/store/sh7z6vib9kxhsj5rjydcd0hqs9acs5y0-python3.6-numpy-1.14.3/lib/python3.6/site-packages/numpy/core/include/numpy/ndarrayobject.h:18,
                 from /nix/store/sh7z6vib9kxhsj5rjydcd0hqs9acs5y0-python3.6-numpy-1.14.3/lib/python3.6/site-packages/numpy/core/include/numpy/arrayobject.h:4,
                 from memoryviewattrs.cpp:580:
/nix/store/sh7z6vib9kxhsj5rjydcd0hqs9acs5y0-python3.6-numpy-1.14.3/lib/python3.6/site-packages/numpy/core/include/numpy/npy_1_7_deprecated_api.h:15:2: warning: #warning "Using deprecated NumPy API, disable it by " "#defining NPY_NO_DEPRECATED_API NPY_1_7_API_VERSION" [-Wcpp]
 #warning "Using deprecated NumPy API, disable it by " \
  ^~~~~~~
building of '/nix/store/zh4vgh550i8iypbhi305wavx1xdkcrv2-python3.6-Cython-0.28.2.drv' timed out after 3600 seconds
error: build of '/nix/store/zh4vgh550i8iypbhi305wavx1xdkcrv2-python3.6-Cython-0.28.2.drv' failed

@etu
Copy link
Contributor Author

etu commented Jun 7, 2018

I have just confirmed that the current commit does build on my raspberry pi 3.

But this bit is a bit worrying to me, I will ask about it upstream as well.

----------------------------------------------------------------------
Ran 11199 tests in 52068.367s

OK

That it takes 14.5 hours to run the tests is a bit much maybe? Building the program takes about an hour.

@dotlambda
Copy link
Member

Let's merge this anyway so we can find out how long it takes Hydra to build. Should be a lot quicker than on a Raspberry.

@dotlambda dotlambda merged commit df92030 into NixOS:master Jun 7, 2018
@etu etu deleted the disable-cython-tests-on-aarch64 branch June 7, 2018 08:53
@dotlambda
Copy link
Member

also few tests failed on i686-linux

If you know which ones fail, please open a PR disabling them on i686.

@etu
Copy link
Contributor Author

etu commented Jun 7, 2018

@volth When you know this, you should report it upstream as well :)

@etu
Copy link
Contributor Author

etu commented Jun 8, 2018

@dotlambda Seems to timeout after 10 hours: https://hydra.nixos.org/build/75636013 😞

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.

Problems building python36Packages.cython on aarch64 on latest nixos-unstable
5 participants