Unable to install GranOO

classic Classic list List threaded Threaded
28 messages Options
12
Reply | Threaded
Open this post in threaded view
|

Re: Unable to install GranOO

Cédric Hubert
Administrator
OK, here is actually the error: Could NOT find Boost: missing: python312

This is a separate package from Boost 1.85.
You need to install it like this:

brew install boost-python3
Reply | Threaded
Open this post in threaded view
|

Re: Unable to install GranOO

arun15
Hi,
I was able to successfully instal GranOO.3. But while checking installation, I am getting this,

/usr/local/include/GranOO3/3rdParty/Eigen/src/Core/util/Macros.h:707:2: error: This compiler appears to be too old to be supported by Eigen
#error This compiler appears to be too old to be supported by Eigen

/usr/local/include/GranOO3/3rdParty/Eigen/src/Core/util/Macros.h:950:79: error: constexpr function's return type 'void' is not a literal type
    template<typename T> EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE constexpr void ignore_unused_variable(const T&) {}

/usr/local/include/GranOO3/3rdParty/Eigen/src/Core/util/Meta.h:157:52: error: 'T' does not refer to a value
struct is_void : is_same<void, std::remove_const_t<T>> {};
                                                   ^
/usr/local/include/GranOO3/3rdParty/Eigen/src/Core/util/Meta.h:156:17: note: declared here
template< class T >
                ^
/usr/local/include/GranOO3/3rdParty/Eigen/src/Core/util/Meta.h:157:37: error: no member named 'remove_const_t' in namespace 'std'; did you mean 'remove_copy'?
struct is_void : is_same<void, std::remove_const_t<T>> {};

/usr/local/include/GranOO3/3rdParty/Eigen/src/Core/util/Meta.h:224:48: error: no member named 'enable_if_t' in namespace 'std'
template<typename T> struct array_size<T, std::enable_if_t<((T::SizeAtCompileTime&0)==0)>> {
                                          ~~~~~^
/usr/local/include/GranOO3/3rdParty/Eigen/src/Core/util/Meta.h:224:90: error: expected unqualified-id
template<typename T> struct array_size<T, std::enable_if_t<((T::SizeAtCompileTime&0)==0)>> {
                                                                                         ^
/usr/local/include/GranOO3/3rdParty/Eigen/src/Core/util/Meta.h:255:17: error: 'auto' return without trailing return type; deduced return types are a C++14 extension
EIGEN_CONSTEXPR auto index_list_size(const T& x) {
                ^
/usr/local/include/GranOO3/3rdParty/Eigen/src/Core/util/Meta.h:256:18: error: no template named 'common_type_t' in namespace 'std'; did you mean 'common_type'?
  using R = std::common_type_t<std::ptrdiff_t, std::make_signed_t<decltype(x.size())>>;
            ~~~~~^~~~~~~~~~~~~
                 common_type
/usr/local/include/GranOO3/3rdParty/Eigen/src/Core/util/Meta.h:256:85: error: expected '(' for function-style cast or type construction
  using R = std::common_type_t<std::ptrdiff_t, std::make_signed_t<decltype(x.size())>>;
                                                                  ~~~~~~~~~~~~~~~~~~^
/usr/local/include/GranOO3/3rdParty/Eigen/src/Core/util/Meta.h:256:53: error: no member named 'make_signed_t' in namespace 'std'
  using R = std::common_type_t<std::ptrdiff_t, std::make_signed_t<decltype(x.size())>>;
                                               ~~~~~^
/usr/local/include/GranOO3/3rdParty/Eigen/src/Core/util/Meta.h:256:87: error: expected ';' after alias declaration
  using R = std::common_type_t<std::ptrdiff_t, std::make_signed_t<decltype(x.size())>>;
                                                                                      ^
                                                                                      ;
/usr/local/include/GranOO3/3rdParty/Eigen/src/Core/util/Meta.h:257:22: error: unknown type name 'R'
  return static_cast<R>(x.size());
                     ^
/usr/local/include/GranOO3/3rdParty/Eigen/src/Core/util/Meta.h:309:38: error: no template named 'integer_sequence' in namespace 'std'; did you mean '__integer_sequence'?
using reduce_all = std::is_same<std::integer_sequence<bool, values..., true>,
                                ~~~~~^~~~~~~~~~~~~~~~
                                     __integer_sequence
/usr/local/include/GranOO3/3rdParty/Eigen/src/Core/util/Meta.h:310:10: error: no template named 'integer_sequence' in namespace 'std'; did you mean '__integer_sequence'?

/usr/local/include/GranOO3/3rdParty/Eigen/src/Core/util/Meta.h:315:24: error: no template named 'integer_sequence' in namespace 'std'; did you mean '__integer_sequence'?
/usr/local/include/GranOO3/3rdParty/Eigen/src/Core/util/Meta.h:315:71: error: no template named 'integer_sequence' in namespace 'std'; did you mean '__integer_sequence'?
/usr/local/include/GranOO3/3rdParty/Eigen/src/Core/util/Meta.h:335:68: error: no template named 'enable_if_t' in namespace 'std'
  template <typename C> static meta_yes testFunctor(C const *,std::enable_if_t<(sizeof(return_ptr<C>()->operator()())>0)> * = 0);
                                                              ~~~~~^
/usr/local/include/GranOO3/3rdParty/Eigen/src/Core/util/Meta.h:344:68: error: no template named 'enable_if_t' in namespace 'std'
  template <typename C> static meta_yes testFunctor(C const *,std::enable_if_t<(sizeof(return_ptr<C>()->operator()(IndexType(0)))>0)> * = 0);
                                                              ~~~~~^
/usr/local/include/GranOO3/3rdParty/Eigen/src/Core/util/Meta.h:353:68: error: no template named 'enable_if_t' in namespace 'std'
  template <typename C> static meta_yes testFunctor(C const *,std::enable_if_t<(sizeof(return_ptr<C>()->operator()(IndexType(0),IndexType(0)))>0)> * = 0);
fatal error: too many errors emitted, stopping now [-ferror-limit=]
7 warnings and 20 errors generated.
make[2]: *** [CMakeFiles/rain.exe.dir/Main.cpp.o] Error 1
make[1]: *** [CMakeFiles/rain.exe.dir/all] Error 2
make: *** [all] Error 2
hitesharunagiri@Hiteshs-MacBook-Pro build %


Reply | Threaded
Open this post in threaded view
|

Re: Unable to install GranOO

Cédric Hubert
Administrator
How did you "checked" the installation ?
If you managed to build and install GranOO, there should be no problem.

Are you using a different compiler than for building ?
Reply | Threaded
Open this post in threaded view
|

Re: Unable to install GranOO

arun15
In the installation page, there is a step where you can run spherical rain simulation to check if it is correctly installed or not. I tried to do that, but I am facing these error. I did install GranOO3 without any errors.

hitesharunagiri@Hiteshs-MacBook-Pro build % sudo make install      
[  0%] Built target embedfile
[ 65%] Built target GranOO3
[ 66%] Built target granoo
[ 71%] Built target cooker
[ 73%] Built target gddutil
[ 73%] Built target gddviewer_autogen_timestamp_deps
[ 73%] Built target gddviewer_autogen
[ 85%] Built target gddviewer
[ 85%] Built target libPyGranOO3_autogen_timestamp_deps
[ 86%] Built target libPyGranOO3_autogen
[100%] Built target libPyGranOO3
Install the project...
-- Install configuration: "Release"
-- Installing: /usr/local/lib/cmake/GranOO3/GranOO3Config.cmake
-- Installing: /usr/local/lib/cmake/GranOO3/GranOO3ConfigVersion.cmake
-- Installing: /usr/local/lib/libGranOO3.a
-- Installing: /usr/local/bin/granoo3
-- Installing: /usr/local/bin/granoo3-cooker
-- Installing: /usr/local/bin/granoo3-gddutil
-- Installing: /usr/local/bin/granoo3-viewer
-- Installing: /usr/local/lib/libPyGranOO3.so
--  ** installing python granoo3 package with pip **
WARNING: The directory '/Users/hitesharunagiri/Library/Caches/pip' or its parent directory is not owned or is not writable by the current user. The cache has been disabled. Check the permissions and owner of that directory. If executing pip with sudo, you should use sudo's -H flag.
Processing /Users/hitesharunagiri/desktop/granoo/tags/3.0/build/Binding/Python/Python
  Installing build dependencies: started
  Installing build dependencies: finished with status 'done'
  Getting requirements to build wheel: started
  Getting requirements to build wheel: finished with status 'done'
  Installing backend dependencies: started
  Installing backend dependencies: finished with status 'done'
  Preparing metadata (pyproject.toml): started
  Preparing metadata (pyproject.toml): finished with status 'done'
Building wheels for collected packages: granoo3
  Building wheel for granoo3 (pyproject.toml): started
  Building wheel for granoo3 (pyproject.toml): finished with status 'done'
  Created wheel for granoo3: filename=granoo3-0.1-py3-none-any.whl size=10053496 sha256=b1c1a3a10e8344da0d719b582935699bf8fddd6cedee527b08e9fb0c8f9802d8
  Stored in directory: /private/tmp/pip-ephem-wheel-cache-8md1vbtz/wheels/f0/e8/67/2e54e002742072408864d1d1a19e206eb0bfff353f87052e51
Successfully built granoo3
Installing collected packages: granoo3
  Attempting uninstall: granoo3
    Found existing installation: granoo3 0.1
    Uninstalling granoo3-0.1:
      Successfully uninstalled granoo3-0.1
Successfully installed granoo3-0.1
WARNING: Running pip as the 'root' user can result in broken permissions and conflicting behaviour with the system package manager. It is recommended to use a virtual environment instead: https://pip.pypa.io/warnings/venv
WARNING: The directory '/Users/hitesharunagiri/Library/Caches/pip' or its parent directory is not owned or is not writable by the current user. The cache has been disabled. Check the permissions and owner of that directory. If executing pip with sudo, you should use sudo's -H flag.
Name: granoo3
Version: 0.1
Summary: Python Distribution of GranOO
Home-page: https://www.granoo.org
Author: GranOO team
Author-email: team@granoo.org
License: GNU-GPLv3
Location: /Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/site-packages
Requires:
Required-by:
--  ** end of installing python granoo3 package with pip **

No, I am not changing any compilers. I directly "checked" the installation procedure after installing GranOO3
Reply | Threaded
Open this post in threaded view
|

Re: Unable to install GranOO

Cédric Hubert
Administrator
I found the bug.
In the sources directory, in the file CMake/GranOO3Config.cmake.in, insert the following lines 103, 104 and 105 after line 102:

100: SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} @GRANOO_ADDITIONAL_CXX_FLAGS@")
101: REMOVE_CXX_FLAG("-DNDEBUG")
102:
103: # define the C++ standard (C++ 17 at least)
104: set(CMAKE_CXX_STANDARD 17)
105: set(CMAKE_CXX_STANDARD_REQUIRED ON)
106:
107: # mark package as found, and prepare the returned parameters
108: # ==========================================================

Then recompile and reinstall GranOO; it should be OK.
Reply | Threaded
Open this post in threaded view
|

Re: Unable to install GranOO

arun15
Hi,
I was able to solve the previous issue by installing those three lines in the CMake/GranOO3Config.cmake.in file, thank you. But while running,

./build/rain.exe ./inp/rain.inp

I am getting this error,
[INIT] Starting to read the input file

Now reading '/Users/hitesharunagiri/Desktop/granoo/tags/3.0/Example/00104_{dem}{mechanical}{granular}_SPHERICAL-RAIN/./inp/rain.inp'
Now reading <GRANOO> in input file "rain.inp", version = 3
Found PlugIn 'STEP'
Found PlugIn 'NEW-GROUND'
####################################################
# An error was encountered ! The program must stop #
####################################################
You have to fix this problem, you may browse the source files to get more informations...
current iteration : 0
current plugin    :
line              : 362
in file           : /Users/hitesharunagiri/desktop/granoo/tags/3.0/Lib/GranOO3/Core/XmlParser.hpp
condition         : attribute_exist(el, name)
======================
-- Attached message --
======================
Problem while reading './inp/rain.inp' file.
An error occured while reading the <NEW-GROUND> element with raw text :
'<NEW-GROUND Type="Box" DimX="1." DimY="0.25" DimZ="1." ID="Boundary" />'
Cannot find the required attribute 'Lx'
==> You must fix your './inp/rain.inp' file <==
======================
--    Backtrace     --
======================
  1: double GranOO3::Core::XmlParser::get_AttributeValue_Required<double>(TiXmlElement const*, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>> const&)
  2: GranOO3::Shape::Box::read_xml_element(TiXmlElement const*)
  3: GranOO3::Physic::Ground::new_object(TiXmlElement const*)
  4: GranOO3::Core::XmlObjectManager<GranOO3::Physic::Ground>::read_element(TiXmlElement const*, bool)
  5: GranOO3::PlugIn::NewGround::parse_xml()
  6: GranOO3::Core::PlugIn::read_xml_element(TiXmlElement const*, bool)
  7: GranOO3::Core::PlugInManager::read_xml_element(TiXmlElement const*, bool)
  8: GranOO3::Core::PlugInManager::read_xml_parent_element(TiXmlElement const*, bool)
  9: GranOO3::Core::PlugIn::read_xml_element(TiXmlElement const*, bool)
 10: GranOO3::Core::PlugInManager::read_xml_element(TiXmlElement const*, bool)
 11: GranOO3::Core::PlugInManager::read_xml_parent_element(TiXmlElement const*, bool)
 12: GranOO3::Core::Problem::read_xml_input_file(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>)
 13: GranOO3::Core::Problem::run(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>> const&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>> const&)
 14: GranOO3::Core::Problem::run(int, char**)
 15: main
 16: start
Assertion failed: (0), function RaiseUserAssertion, file Macro.cpp, line 74.
zsh: abort      ./build/rain.exe ./inp/rain.inp

Please help me with this error.
Reply | Threaded
Open this post in threaded view
|

Re: Unable to install GranOO

Damien André
Administrator
Hello,

please change in the inp file the attributes 'DimX', 'DimY' and 'DimZ'

 by

'Lx', 'Ly' and 'Lz'

Cheers, Damien
Reply | Threaded
Open this post in threaded view
|

Re: Unable to install GranOO

arun15
Hi,
I was successfully able to run the simulation. I sincerely thank Cédric Hubert and Damien André for helping me out with my issues.  

Cheers.
12