Universite-Gustave-Eiffel / I-Simpa

An Open Source software for 3D sound propagation modelling
https://i-simpa.univ-gustave-eiffel.fr/
GNU General Public License v3.0
234 stars 57 forks source link

I-Simpa not buildable on Linux for several reasons #182

Open ebachard opened 7 years ago

ebachard commented 7 years ago
  1. Why do we need cmake 3.6.0 ? cmake is only 3.5.1 on Linux (e.g. Debian like)

I-Simpa/bucm CMake Error at CMakeLists.txt:1 (CMAKE_MINIMUM_REQUIRED): CMake 3.6.0 or higher is required. You are running version 3.5.1

  1. boost is 1.58 on Linux, while BOOST_TEST is defined in 1.59 only.

The log:

I-Simpa/src/lib_interface/tests/io_test.cpp:51:54: error: ‘BOOST_TEST’ was not declared in this scope BOOST_TEST((modelTest.vertices[0] == t_pos(5, 0, 0)));

Probably disable the test should help, or maybe there are other breakages to come ?

Thank in advance for any advice :-)

nicolas-f commented 7 years ago

Hi,

You have to provide the requested prerequisites. Please download CMake here: https://cmake.org/files/v3.6/cmake-3.6.1-Linux-x86_64.tar.gz

On travis, the dependencies are built or downloaded with this script: https://github.com/Ifsttar/I-Simpa/blob/master/ci/travis/linux/before_install.sh

ebachard commented 7 years ago

Hi,

Thanks for your fast answer.

The problem is : do we really need 3.6.0 ? I hacked cmake version number and the Makefile was successfully created (I had to install swig and libwx + libwx-dev in meantime though), and I don't want to break my build system just because of cmake not_the_last_one.

I see there is a major change with boost, but I don't know when the 1.59 (BOOST_TEST starts at 1.59 if I'm not wrong) will be available in my current distro. I'll investigate ...

nicolas-f commented 7 years ago

Yes cmake > 3.6.0 is required.

You don't have to replace your version of cmake. You can download it and place it in another folder.

Please use the scripts provided for Travis linux build as I don't have the time to support another versions of build system and libraries.

ebachard commented 7 years ago

Following your instructions, and using gcc-5.4.0 + g++-5.4.0, I got it working.

Several issue had to be fixed :

isnan :
I-Simpa/src/isimpa/IHM/customRenderer/gridcellgabefloatrenderer.cpp:77:16: error: ‘isnan’ was not declared in this scope if(isnan(val)) { => see the attached patch (not sure the fix will work everywhere -Windows Mac OS X- though)

got zillions of warnings: I-Simpa/src/isimpa/IHM/simpleGraph.cpp:1075:26: warning: ‘void wxPen::SetStyle(int)’ is deprecated: use wxPENSTYLE_XXX constants [-Wdeprecated-declarations] newPen.SetStyle(wxSOLID);

boost-install/include/boost/python/detail/is_auto_ptr.hpp:17:40: warning: ‘template class std::auto_ptr’ is deprecated [-Wdeprecated-declarations] BOOST_PYTHON_IS_XXX_DEF(auto_ptr, std::auto_ptr, 1) ^ boost-install/include/boost/detail/is_xxx.hpp:20:4: note: in definition of macro ‘BOOST_DETAIL_IS_XXX_DEF’ qualified_name< BOOST_PP_ENUM_PARAMS_Z(1, nargs, T) > \ ^ boost-install/include/boost/python/detail/is_auto_ptr.hpp:17:1: note: in expansion of macro ‘BOOST_PYTHON_IS_XXX_DEF’ BOOST_PYTHON_IS_XXX_DEF(auto_ptr, std::auto_ptr, 1)

and so on ...

Last issue: I-Simpa/build/bin $ ./isimpa./isimpa: error while loading shared libraries: libboost_system.so.1.61.0: cannot open shared object file: No such file or directory

Reason : libboost not system-installed (to avoid breaking a lot of things)

Fixed using the following command line: LD_LIBRARY_PATH=$HOME/boost-install/lib/ ./isimpa

Now got it working ;-) Will read the documentation, and start some tests. Thanks :-)

I-Simpa-issue#182_Linux_build.txt