Closed TypeFloat closed 1 year ago
I also got the same error. The attached picture shows the error message.
@TypeFloat Do you know how to solve the problem? Thank you.
@TypeFloat Do you know how to solve the problem? Thank you.
Sorry, I have not found a solution yet.
@TypeFloat @Hs-Cheng have you found the solution? I also have same issue. @yunshengtian @jagdeepsb
@veerendrav I have no solution, sorry about that.
It happened to me too on macOS.
Here's a simple solution that works:
Change those type definitions from Ref <MatrixXd>
to Matrix <double, 2, Dynamic>
In directory evogym/simulator/SimulatorCPP/
edit files:
Environment.h
Environment.cpp
Sim.h
Sim.cpp
Hi all, thank you for your interest in EvoGym. I'm trying to recreate this issue, and suspect it has to with the cpp compiler/version of cpp being compiled.
For instance, if you are on windows, you will get this error if you attempt to build with the MS Visual Studios 2019 build tools. You will need to install the 2017 version as advised here.
Could someone please send me the full output of their python setup.py install
so I can see what compiler is being used by cmake?
Hello.
I had the same error on MacOS with M1 chip and was able to resolve it. Probably the reason is that the front-end compiler used by default for CMake on MacOS is the one shipped with XCode. I was able to avoid this error by installing gcc from homebrew and specifying it as the compiler in setup.py.
(I apologize for any unnatural parts of the text, as I used a translation service to create the text.)
Sorry, one correction about the above message: you need to set g++
as the C++ compiler, but do not explicitly specify the C compiler; specifying gcc
as the C compiler seems to cause a different error.
The specific procedure is
setup.py
. (replace {path_of_g++}
with the g++
installation path. in my case it is /opt/homebrew/bin/g++-12
)
cmake_args += ["-DCMAKE_CXX_COMPILER={path_of_g++}"]
python setup.py install
.\
For reference, I am attaching the full output of the python setup.py install
before and after the problem was solved. (The user name and computer name are replaced with different strings.)
(I apologize for any unnatural parts of the text, as I used a translation service to create the text.)
Hi, I had the same error too.
I think about evogym install process probrems has 2 factors(at least on macOS).
The first one, This simulator has inconsistent type definitions maybe. The line 271 of evogym/simulator/SimulatorCPP/Environment.cpp: There is a discrepancy in the type declaration in Eigen::Ref<Eigen::Matrix<double, -1, -1, 0>, 0, Eigen::OuterStride<-1>> This topic has already been mentioned here.
https://github.com/EvolutionGym/evogym/issues/15#issuecomment-1424633656
Actually I ran into a compilation error, fixed it as per his advice. And I was able to fix the compilation error. https://github.com/TakesxiSximada/evogym/commit/58c26593cf511fe3d8d4606b20180a8ddc6396b0
I'm not sure if this fix is reasonable, But at least I know that can work around the type error.
The second factor is CMake version.
The latest version of CMake is 3.25.3, but the build fails evogym with this version. FindGLFW.cmake packaged with CMake seems to be the cause of the problem.
I've tried to build with some versions of CMake.
| cmake version | Original source | Patched source |
|---------------+-----------------+----------------|
| 3.22.2 | x | o |
| 3.24.2 | x | o |
| 3.25.1 | x | x |
| 3.25.3 | x | x |
(*) "Patched source" means https://github.com/TakesxiSximada/evogym/commit/58c26593cf511fe3d8d4606b20180a8ddc6396b0 has been applied.
By the way, you can avoid the error by deleting FindGLFW.cmake. e.g.) /usr/local/Cellar/cmake/3.25.3/share/cmake/Modules/FindGLEW.cmake
I am using macOS on m1 chip, when I run the command "python setup.py install", it occurred error:" calling a private constructor of class 'Eigen::Ref<Eigen::Matrix<double, -1, -1, 0>, 0, Eigen::OuterStride<-1>>' return empty;"
what should I do to fix the bug?