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

Unable to compile the repository on Windows #47

Closed
GiulioRomualdi opened this issue Jan 24, 2020 · 8 comments
Closed

Unable to compile the repository on Windows #47

GiulioRomualdi opened this issue Jan 24, 2020 · 8 comments

Comments

@GiulioRomualdi
Copy link
Member

When I try to compile the repository on windows, I retrieve the following error

C:\Users\gromualdi\robot-code\robotology-superbuild\robotology\walking-controllers\modules\Walking_module\include\WalkingQPInverseKinematics.hpp(34,1): warning C4267: 'argument': conversion from 'size_t' to 'const unsigned int', possible loss of data
5>C:\Program Files\robotology\eigen-3.3.4\Eigen\src/SparseCore/SparseDiagonalProduct.h(75,1): error C2248: 'Eigen::internal::unary_evaluator<T,Eigen::internal::IteratorBased,double>::InnerIterator::Scalar': cannot access private typedef declared in class 'Eigen::internal::unary_evaluator<T,Eigen::internal::IteratorBased,double>::InnerIterator'
5>        with
5>        [
5>            T=Eigen::CwiseUnaryOp<Eigen::internal::scalar_opposite_op<double>,const Eigen::Map<Eigen::SparseMatrix<double,0,int>,0,Eigen::Stride<0,0>>>
5>        ]

I'm currently using Eigen 3.3.4 installed from here

@traversaro any suggestion?

@traversaro
Copy link
Member

@traversaro any suggestion?

Unfortunately I am not certain about this due to robotology/robotology-superbuild#226 that is preventing the GitHub Actions CI to run on Windows, but recently I think compiled walking-controllers on Windows with Visual Studio 2019 using Eigen 3.3.7 . You can install via vcpkg or via the pre-built vcpkg workspace available at https://github.com/robotology-playground/robotology-superbuild-dependencies/releases/tag/v0.0.2, that is what we currently use for CI in robotology-superbuild (see https://github.com/robotology/robotology-superbuild/blob/master/.github/workflows/ci.yml#L86) and we would like to document as the canonical way to install deps, to remove the super-error-prone existing documentation on how to install deps.

@traversaro
Copy link
Member

I experienced the same error in GitHub Actions, see:

2020-02-01T15:57:44.3838038Z D:\a\robotology-superbuild\robotology-superbuild\robotology\walking-controllers\modules\Walking_module\include\WalkingQPInverseKinematics.hpp(33,26): warning C4018: '<': signed/unsigned mismatch [D:\a\robotology-superbuild\robotology-superbuild\build\robotology\walking-controllers\modules\Walking_module\WalkingModule.vcxproj] [D:\a\robotology-superbuild\robotology-superbuild\build\walking-controllers.vcxproj]
2020-02-01T15:57:45.2084855Z C:\vcpkg-robotology\installed\x64-windows\include\eigen3\Eigen\src/SparseCore/SparseDiagonalProduct.h(75,1): error C2248: 'Eigen::internal::unary_evaluator<T,Eigen::internal::IteratorBased,double>::InnerIterator::Scalar': cannot access private typedef declared in class 'Eigen::internal::unary_evaluator<T,Eigen::internal::IteratorBased,double>::InnerIterator' [D:\a\robotology-superbuild\robotology-superbuild\build\robotology\walking-controllers\modules\Walking_module\WalkingModule.vcxproj] [D:\a\robotology-superbuild\robotology-superbuild\build\walking-controllers.vcxproj]

@traversaro
Copy link
Member

traversaro commented Feb 1, 2020

I guess this was related: http://manao.inria.fr/eigen_tmp/pullrequests/696/bb_dump.html , but unfortunatly the complete BitBucket (website) history of Eigen was lost in the migraiton to gitlab : (

@traversaro
Copy link
Member

I have the same error against the latest Eigen, so it is not a problem of a bug that was not fixed.

@traversaro
Copy link
Member

Actually the problem seems to be fixed by backporting https://gitlab.com/libeigen/eigen/-/commit/f59bed7a133322955dac03f3654def706aff3ba6 to 3.3.4, so it is possible that the latest Eigen has another problem. However, it seems to be an issue on Eigen or in MSVC. We should probably open an issue in Eigen for that, but I can prepare a workaround for Eigen 3.3.

traversaro added a commit that referenced this issue Feb 17, 2020
This commit adds a workaround for issue #47 .
In particular, it adds a vendored SparseCwiseUnaryOp.h file that has the correctly marked protected
members, via a backport of https://gitlab.com/libeigen/eigen/-/commit/f59bed7a133322955dac03f3654def706aff3ba6 .
As the include guards of the vendored SparseCwiseUnaryOp.h are the same of the one contained in Eigen, by including
it first in the compilation unit that have this problem, we are able to make sure that the Eigen's version is ignored.
@traversaro
Copy link
Member

Upstream pull request for Eigen 3.3 branch: https://gitlab.com/libeigen/eigen/-/merge_requests/63 .

@traversaro
Copy link
Member

I think this was fixed by #53 and #54, and upstream (pending a Eigen 3.3 patch release) in https://gitlab.com/libeigen/eigen/-/merge_requests/63 .

@GiulioRomualdi
Copy link
Member Author

Accordingly to #47 (comment) we can close the issue

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

2 participants