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

How to skip the Eigen test. #1117

Closed
ghost opened this issue Sep 28, 2017 · 8 comments
Closed

How to skip the Eigen test. #1117

ghost opened this issue Sep 28, 2017 · 8 comments

Comments

@ghost
Copy link

ghost commented Sep 28, 2017

I'm on Linux, a big system of Linux for a large organization so restriction is applied to regular user like me. The IT person is reluctant to upgrade Eigen (I don't know exactly what it is) so the version of Eigen installed does not meet the minimal requirement. So, after I followed the instructions of Chapter 4 of the documentation to compile the test cases, I got error message at the step "make check -j 4":

error: static assertion failed: Eigen support in pybind11 requires Eigen >= 3.2.7

My question are:

  1. The error is only for compiling test cases; the pybind11 itself should still work, right? That is, I can safely ignore the error and proceed with subsequent documentation, right?
  2. Since there is no way to upgrade Eigen on my own, is there any chance to tell the command of this step that I want to skip compiling any test related to Eigen?

Thank you for your help.

@aldanor
Copy link
Member

aldanor commented Sep 28, 2017

  1. Yes it would still work.
  2. You could test pybind11 without error by passing something like -k not test_eigen to pytest; the rest of the tests should pass fine.

@ghost
Copy link
Author

ghost commented Sep 28, 2017

Thank you for the reply. Here is a follow-up regarding the second reply. The following four steps are all I know about how to compile test cases:

mkdir build
cd build
cmake -A x64 -DDOWNLOAD_CATCH=1 ..
make check -j 4

I don't know how to pass something like -k not test_eigen to pytest. Could you please be more specific? Thanks a lot.

@aldanor
Copy link
Member

aldanor commented Sep 28, 2017

You can always justs run pytest manually, i.e. py.test <test folder> <pytest args>

@jagerman
Copy link
Member

You can pass pytest options by using: make check -j14 PYTEST_ADDOPTS="-k 'not test_eigen'"

@jagerman
Copy link
Member

... but I don't think that's going to help here, because it'll still try to compile it, which is where you're getting the failure. See 64a99b9 -- it adds the minimum version to cmake so that for older versions it should skip building the eigen portions of the test suite.

@henryiii
Copy link
Collaborator

Eigen is a light (but large) header only library. In fact, all my projects using eigen check it out as a submodule instead of using a system version. Couldn't we add a -DDOWNLOAD_EIGEN option?

@jagerman
Copy link
Member

jagerman commented Sep 28, 2017

Unlike the catch dependency, it's the sort of thing that you'll already have if you're going to use it. catch, on the other hand, is really something needed for the test code itself (rather than simply being a feature test). Also eigen isn't the only requirement: you also need numpy and scipy installed to actually run the associated tests.

@henryiii
Copy link
Collaborator

Okay, I was thinking it was similar to Catch in that it was needed for tests, but that make sense, forgot about the numpy requirement.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants