Menu

#287 CMake compilation error in Arch Linux

v8.1.0
closed
nobody
1
2023-03-29
2021-10-12
Samuel Mesa
No

Arch Linux has encountered some problems in the compilation of the latest version of SAGA GIS with cmake:

  1. Is it possible to disable the liblas support because the version available in Arch Linux is 1.8.1? Not actually supported by SAGA GIS.
  2. Error with wxwidgets version 3.0.5, error that I have not been able to identify.

I attach compilation instructions.

[ 91%] Building CXX object src/saga_core/saga_gui/CMakeFiles/saga_gui.dir/active_attributes.cpp.o
[ 91%] Building CXX object src/saga_core/saga_gui/CMakeFiles/saga_gui.dir/active_attributes_control.cpp.o
[ 92%] Linking CXX shared library libtin_viewer.so
[ 92%] Building CXX object src/saga_core/saga_gui/CMakeFiles/saga_gui.dir/active_description.cpp.o
[ 92%] Built target tin_viewer
[ 92%] Building CXX object src/saga_core/saga_gui/CMakeFiles/saga_gui.dir/active_history.cpp.o
In file included from /archgeotux/saga-gis/src/saga-8.0.1/saga-gis/src/saga_core/saga_gui/active_attributes_control.cpp:58:
/archgeotux/saga-gis/src/saga-8.0.1/saga-gis/src/saga_core/saga_gui/view_table_data.h: In member function 'virtual wxString CVIEW_Table_Data::GetTypeName(int, int)':
/archgeotux/saga-gis/src/saga-8.0.1/saga-gis/src/saga_core/saga_gui/view_table_data.h:197:58: error: 'wxGRID_VALUE_DATE' was not declared in this scope; did you mean 'wxGRID_VALUE_DATETIME'?
  197 |                         case SG_DATATYPE_Date  : return( wxGRID_VALUE_DATE   );
      |                                                          ^~~~~~~~~~~~~~~~~
      |                                                          wxGRID_VALUE_DATETIME
/archgeotux/saga-gis/src/saga-8.0.1/saga-gis/src/saga_core/saga_gui/active_attributes.cpp: In member function 'void CActive_Attributes::On_Choice(wxCommandEvent&)':
/archgeotux/saga-gis/src/saga-8.0.1/saga-gis/src/saga_core/saga_gui/active_attributes.cpp:147:59: warning: comparison of integer expressions of different signedness: 'int' and 'size_t' {aka 'long unsigned int'} [-Wsign-compare]
  147 |         if( _Get_Table() && m_pSelections->GetSelection() < _Get_Table()->Get_Selection_Count() )
      |                             ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/archgeotux/saga-gis/src/saga-8.0.1/saga-gis/src/saga_core/saga_gui/active_attributes.cpp: In member function 'void CActive_Attributes::Set_Attributes()':
/archgeotux/saga-gis/src/saga-8.0.1/saga-gis/src/saga_core/saga_gui/active_attributes.cpp:202:39: warning: comparison of integer expressions of different signedness: 'int' and 'size_t' {aka 'long unsigned int'} [-Wsign-compare]
  202 |                         for(int i=0; i<_Get_Table()->Get_Selection_Count(); i++)
      |                                      ~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/archgeotux/saga-gis/src/saga-8.0.1/saga-gis/src/saga_core/saga_gui/active_attributes_control.cpp: In constructor 'CActive_Attributes_Control::CActive_Attributes_Control(wxWindow*)':
/archgeotux/saga-gis/src/saga-8.0.1/saga-gis/src/saga_core/saga_gui/active_attributes_control.cpp:136:47: error: 'wxGRID_VALUE_DATE' was not declared in this scope; did you mean 'wxGRID_VALUE_DATETIME'?
  136 |         pRenderer = GetDefaultRendererForType(wxGRID_VALUE_DATE );
      |                                               ^~~~~~~~~~~~~~~~~
      |                                               wxGRID_VALUE_DATETIME
/archgeotux/saga-gis/src/saga-8.0.1/saga-gis/src/saga_core/saga_gui/active_attributes_control.cpp:140:41: error: 'wxGridSelectNone' is not a member of 'wxGrid'
  140 |         SetTable(m_pData, true, wxGrid::wxGridSelectNone);
      |                                         ^~~~~~~~~~~~~~~~
make[2]: *** [src/saga_core/saga_gui/CMakeFiles/saga_gui.dir/build.make:104: src/saga_core/saga_gui/CMakeFiles/saga_gui.dir/active_attributes_control.cpp.o] Error 1
make[2]: *** Waiting for unfinished jobs....
make[1]: *** [CMakeFiles/Makefile2:2193: src/saga_core/saga_gui/CMakeFiles/saga_gui.dir/all] Error 2
make: *** [Makefile:136: all] Error 2
==> ERROR: A failure occurred in build().
    Aborting...
1 Attachments

Discussion

  • Rainer Hurling

    Rainer Hurling - 2021-10-13

    Hi Samuel,

    It looks like you need wxWidgets Version >=3.1 and you are using v3.0.5 :(

    As far as I can tell, the two cmake arguments for libLAS can be passed empty, then FindLAS.cmake will not find an existing libLAS:

    -DLAS_INCLUDE:PATH= 
    -DLAS_LIBRARY:FILEPATH=
    

    As a result, the SAGA module lib/saga/libio_shapes_las.so is not built.

    HTH,
    Rainer

     
  • Samuel Mesa

    Samuel Mesa - 2021-10-13

    Thanks @rhurlin, the compilation was correct with the wxWidgets version and cmake parameters. I will update the compilation instructions for Arch Linux users.

    https://aur.archlinux.org/packages/saga-gis/

     
  • Justus Spitzmüller

    • status: open --> closed
     

Anonymous
Anonymous

Add attachments
Cancel