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

Issues with Eigen array header during make #215

Closed
svolk19-stanford opened this issue Jul 27, 2023 · 6 comments
Closed

Issues with Eigen array header during make #215

svolk19-stanford opened this issue Jul 27, 2023 · 6 comments

Comments

@svolk19-stanford
Copy link

Issue summary

Hello,

When I follow the standard instructions to build gnina on Ubuntu 20.04 (windows WSL) everything goes smoothly until the make command. Then, I receive the following error when building atom_constants.cpp:

[ 48%] Building CXX object gninasrc/CMakeFiles/gninalib.dir/lib/atom_constants.cpp.o
In file included from /usr/include/c++/9/tuple:39,
from /usr/include/c++/9/functional:54,
from /usr/include/c++/9/pstl/glue_algorithm_defs.h:13,
from /usr/include/c++/9/algorithm:71,
from /mnt/c/Users/[usr]/Desktop/gnina/gnina/gninasrc/lib/common.h:30,
from /mnt/c/Users/[usr]/Desktop/gnina/gnina/gninasrc/lib/atom_constants.h:26,
from /mnt/c/Users/[usr]/Desktop/gnina/gnina/gninasrc/lib/atom_constants.cpp:1:
/mnt/c/Users/[usr]/Desktop/gnina/gnina/gninasrc/../Eigen/array:8:4: error: #error The Eigen/Array header does no longer exist in Eigen3. All that functionality has moved to Eigen/Core.
8 | #error The Eigen/Array header does no longer exist in Eigen3. All that functionality has moved to Eigen/Core.
| ^~~~~
In file included from /usr/include/c++/9/pstl/glue_algorithm_defs.h:13,
from /usr/include/c++/9/algorithm:71,
from /mnt/c/Users/[usr]/Desktop/gnina/gnina/gninasrc/lib/common.h:30,
from /mnt/c/Users/[usr]/Desktop/gnina/gnina/gninasrc/lib/atom_constants.h:26,
from /mnt/c/Users/[usr]/Desktop/gnina/gnina/gninasrc/lib/atom_constants.cpp:1:
/usr/include/c++/9/functional:1111:29: error: ‘array’ is not a member of ‘std’
1111 | tuple<_GLIBCXX_STD_C::array<_Tp, _Len>, _Pred> _M_bad_char;
| ^~~~~
/usr/include/c++/9/functional:63:1: note: ‘std::array’ is defined in header ‘’; did you forget to ‘#include ’?
62 | # include
+++ |+#include
63 | # include
/usr/include/c++/9/functional:1111:44: error: template argument 1 is invalid
1111 | tuple<_GLIBCXX_STD_C::array<_Tp, _Len>, _Pred> _M_bad_char;
| ^
/usr/include/c++/9/functional:1111:44: error: template argument 2 is invalid
/usr/include/c++/9/functional:1111:45: error: expected unqualified-id before ‘,’ token
1111 | tuple<_GLIBCXX_STD_C::array<_Tp, _Len>, _Pred> _M_bad_char;
| ^
/usr/include/c++/9/functional: In constructor ‘std::__boyer_moore_array_base<_Tp, _Len, _Pred>::__boyer_moore_array_base(_RAIter, std::size_t, _Unused&&, _Pred&&)’:
/usr/include/c++/9/functional:1083:4: error: class ‘std::__boyer_moore_array_base<_Tp, _Len, _Pred>’ does not have any field named ‘_M_bad_char’
1083 | : _M_bad_char{ _GLIBCXX_STD_C::array<_Tp, _Len>{}, std::move(__pred) }
| ^~~~~~~~~~~
/usr/include/c++/9/functional:1083:33: error: ‘array’ is not a member of ‘std’
1083 | : _M_bad_char{ _GLIBCXX_STD_C::array<_Tp, _Len>{}, std::move(__pred) }
| ^~~~~
/usr/include/c++/9/functional:1083:33: note: ‘std::array’ is defined in header ‘’; did you forget to ‘#include ’?
/usr/include/c++/9/functional:1083:42: error: expected primary-expression before ‘,’ token
1083 | : _M_bad_char{ _GLIBCXX_STD_C::array<_Tp, _Len>{}, std::move(__pred) }
| ^
/usr/include/c++/9/functional:1083:49: error: expected primary-expression before ‘{’ token
1083 | : _M_bad_char{ _GLIBCXX_STD_C::array<_Tp, _Len>{}, std::move(__pred) }
| ^
/usr/include/c++/9/functional:1083:49: error: expected ‘}’ before ‘{’ token
/usr/include/c++/9/functional: In member function ‘std::__boyer_moore_array_base<_Tp, _Len, _Pred>::__diff_type std::__boyer_moore_array_base<_Tp, _Len, _Pred>::_M_lookup(_Key, std::__boyer_moore_array_base<_Tp, _Len, _Pred>::__diff_type) const’:
/usr/include/c++/9/functional:1105:23: error: ‘_M_bad_char’ was not declared in this scope; did you mean ‘__is_char’?
1105 | return std::get<0>(_M_bad_char)[__ukey];
| ^~~~~~~~~~~
| __is_char
/usr/include/c++/9/functional: In member function ‘const _Pred& std::__boyer_moore_array_base<_Tp, _Len, _Pred>::_M_pred() const’:
/usr/include/c++/9/functional:1109:44: error: ‘_M_bad_char’ was not declared in this scope; did you mean ‘__is_char’?
1109 | _M_pred() const { return std::get<1>(_M_bad_char); }
| ^~~~~~~~~~~
| __is_char
make[2]: *** [gninasrc/CMakeFiles/gninalib.dir/build.make:97: gninasrc/CMakeFiles/gninalib.dir/lib/atom_constants.cpp.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:1729: gninasrc/CMakeFiles/gninalib.dir/all] Error 2
make: *** [Makefile:146: all] Error 2

Steps to reproduce

git clone https://github.com/gnina/gnina.git
cd gnina
mkdir build
cd build
cmake ..
make

system configuration

Operating system: Ubuntu 20.04 (windows WSL)
nvcc: V12.2.91

@dkoes
Copy link
Contributor

dkoes commented Jul 28, 2023

I've added a 20.04 Dockerfile to illustrate building on 20.04: https://github.com/gnina/gnina/blob/master/docker/ubuntu-20.04/Dockerfile

This doesn't do anything special, so I suspect the issue is with your setup. To me this seems like a problem with the standard libraries not providing array.

@dkoes dkoes closed this as completed Sep 18, 2023
@mainguyenanhvu
Copy link

I faced the same issue when running make command on WSL2. Please show me the way to address it.

@dkoes
Copy link
Contributor

dkoes commented Mar 16, 2024

Instructions for WSL2 Ubuntu 22.04 have been added to the readme.

@mainguyenanhvu
Copy link

@dkoes I tried your instruction, however, it does not work. Please help me. I created a new issue #255

@mainguyenanhvu
Copy link

@dkoes why do you use cmake 3.18 in dockerfile although your instruction requires cmake 3.25?
image

@dkoes
Copy link
Contributor

dkoes commented May 7, 2024

That's for Ubuntu 18.04. The newer versions (and compat) use newer cmake. I've removed the 18.04 since it is out of support.

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