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

TST: Respect compiler customizations #8870

Merged
merged 1 commit into from
Mar 31, 2017

Conversation

marv
Copy link
Contributor

@marv marv commented Mar 30, 2017

Without calling compiler.customize(None) customizations using
environment variables like CC won't be honoured

Without calling `compiler.customize(None)` customizations using
environment variables like CC won't be honoured
@charris
Copy link
Member

charris commented Mar 30, 2017

Looks correct to me. @rgommers Comment?

@rgommers rgommers merged commit c3dd0e1 into numpy:master Mar 31, 2017
@rgommers
Copy link
Member

Yep, that looks correct. Merged, thanks @marv

This is very easy to forgot and leads to subtle bugs that are system-specific. @marv I assume you found this when the tests failed for you? If so, can you add the test output here (helps for searchability for others)?

@rgommers rgommers added this to the 1.13.0 release milestone Mar 31, 2017
@marv
Copy link
Contributor Author

marv commented Apr 6, 2017

Thanks for the quick merge!

@rgommers: That's right. On Exherbo it's possible to have many (cross-)compilers for various architectures installed side-by-side, in order to prevent subtle bugs/miscompilations we banned unprefixed toolchain executables and only permit host-prefix tools (${host}-${tool}, e.g. x86_64-pc-linux-gnu-cc). The tests here didn't respect the CC specified from the environment and tried to use cc leading to this errors:

======================================================================
ERROR: test_compile1 (test_system_info.TestSystemInfoReading)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/var/tmp/paludis/build/dev-python-numpy-1.12.1/temp/2.7/test/lib/numpy/testing/decorators.py", line 147, in skipper_func
    return f(*args, **kwargs)
  File "/var/tmp/paludis/build/dev-python-numpy-1.12.1/temp/2.7/test/lib/numpy/distutils/tests/test_system_info.py", line 208, in test_compile1
    c.compile([os.path.basename(self._src1)], output_dir=self._dir1)
  File "/var/tmp/paludis/build/dev-python-numpy-1.12.1/temp/2.7/test/lib/numpy/distutils/ccompiler.py", line 230, in CCompiler_compile
    single_compile(o)
  File "/var/tmp/paludis/build/dev-python-numpy-1.12.1/temp/2.7/test/lib/numpy/distutils/ccompiler.py", line 194, in single_compile
    self._compile(obj, src, ext, cc_args, extra_postargs, pp_opts)
  File "/var/tmp/paludis/build/dev-python-numpy-1.12.1/temp/2.7/test/lib/numpy/distutils/unixccompiler.py", line 52, in UnixCCompiler__compile
    raise CompileError(msg)
CompileError: Command "cc -c foo.c -o /var/tmp/paludis/build/dev-python-numpy-1.12.1/temp/tmp1zkQmq/foo.o" failed with exit status 123

======================================================================
ERROR: test_compile2 (test_system_info.TestSystemInfoReading)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/var/tmp/paludis/build/dev-python-numpy-1.12.1/temp/2.7/test/lib/numpy/testing/decorators.py", line 147, in skipper_func
    return f(*args, **kwargs)
  File "/var/tmp/paludis/build/dev-python-numpy-1.12.1/temp/2.7/test/lib/numpy/testing/decorators.py", line 147, in skipper_func
    return f(*args, **kwargs)
  File "/var/tmp/paludis/build/dev-python-numpy-1.12.1/temp/2.7/test/lib/numpy/distutils/tests/test_system_info.py", line 227, in test_compile2
    extra_postargs=extra_link_args)
  File "/var/tmp/paludis/build/dev-python-numpy-1.12.1/temp/2.7/test/lib/numpy/distutils/ccompiler.py", line 230, in CCompiler_compile
    single_compile(o)
  File "/var/tmp/paludis/build/dev-python-numpy-1.12.1/temp/2.7/test/lib/numpy/distutils/ccompiler.py", line 194, in single_compile
    self._compile(obj, src, ext, cc_args, extra_postargs, pp_opts)
  File "/var/tmp/paludis/build/dev-python-numpy-1.12.1/temp/2.7/test/lib/numpy/distutils/unixccompiler.py", line 52, in UnixCCompiler__compile
    raise CompileError(msg)
CompileError: Command "cc -c bar.c -o /var/tmp/paludis/build/dev-python-numpy-1.12.1/temp/tmpYriDch/bar.o -Wl,-rpath=/var/tmp/paludis/build/dev-python-numpy-1.12.1/temp/tmpYriDch/libbar.so" failed with exit status 123

----------------------------------------------------------------------
Ran 6237 tests in 519.700s

FAILED (KNOWNFAIL=6, SKIP=43, errors=2)

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