Installing RSGISLib on Ubuntu 18.04 and WIndows

111 views
Skip to first unread message

Alexander Bruy

unread,
Dec 20, 2019, 2:45:52 AM12/20/19
to RSGISLib Support
Hi,

I'm trying to install RSGISLib on Ubuntu 18.04 and Windows 10. As there are no ready-to-use packages
the only way seems is to build it from sources. So I have downloaded archive rsgislib-3.5.8.tar.gz from
https://bitbucket.org/petebunting/rsgislib/downloads/ and extracted it. Then created "build" directory and
from this directory executed

cmake -DCMAKE_INSTALL_PREFIX=/opt/rsgislib ..

Configuration process completed successfully with the following output

$ cmake -DCMAKE_INSTALL_PREFIX=/opt/rsgislib ..
-- The C compiler identification is GNU 7.4.0
-- The CXX compiler identification is GNU 7.4.0
-- Check for working C compiler: /usr/bin/cc
-- Check for working C compiler: /usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Finding Python using PATH
-- Building Python bindings with /usr/bin/python
-- Configuring done
-- Generating done
-- Build files have been written to: /home/alex/rsgislib/build

Then I tried to run make and build fails immediatelly with 

$ make
Scanning dependencies of target gdalsimpleinfo
[  0%] Building CXX object CMakeFiles/gdalsimpleinfo.dir/tools/gdalsimpleinfo.cpp.o
/home/user/rsgislib/tools/gdalsimpleinfo.cpp:28:10: fatal error: gdal_priv.h: Немає такого файла або каталогу
 #include "gdal_priv.h"
          ^~~~~~~~~~~~~
compilation terminated.
CMakeFiles/gdalsimpleinfo.dir/build.make:62: recipe for target 'CMakeFiles/gdalsimpleinfo.dir/tools/gdalsimpleinfo.cpp.o' failed
make[2]: *** [CMakeFiles/gdalsimpleinfo.dir/tools/gdalsimpleinfo.cpp.o] Error 1
CMakeFiles/Makefile2:67: recipe for target 'CMakeFiles/gdalsimpleinfo.dir/all' failed
make[1]: *** [CMakeFiles/gdalsimpleinfo.dir/all] Error 2
Makefile:151: recipe for target 'all' failed
make: *** [all] Error 2

However I have GDAL installed ( GDAL 3.0.2, released 2019/10/28). Seems CMakeLists.txt
does not check for required dependencies. Also there is no information at all which dependencies
are necessary to build rsgislib.

Can anyone help with building instructions? Also I will need to install it on WIndows 10 and want
to know are there any differences in build process in comparison to Linux.

Thanks

Peter Bunting

unread,
Dec 20, 2019, 2:56:29 AM12/20/19
to Alexander Bruy, RSGISLib
Hi, 

There are pre-build binaries via the conda platform. 

There are instructions here:


We also make a docker image available. 

Best wishes, 

Pete

--
You received this message because you are subscribed to the Google Groups "RSGISLib Support" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rsgislib-suppo...@googlegroups.com.
To view this discussion on the web, visit https://groups.google.com/d/msgid/rsgislib-support/0274b5e9-bb93-48f3-abed-3edd9794ab52%40googlegroups.com.

Alexander Bruy

unread,
Dec 20, 2019, 3:06:35 AM12/20/19
to Peter Bunting, RSGISLib
Hi Pete,

Unfortunately, the link you provide does not have build instructions.
Also it does
not give any information about required dependencies.

Conda is not an option, as it uses its own dependencies instead of the system
libraries and as result does not integrates well with other software which uses
system dependencies. Also on Windows it often break other software which also
has own built-in Python interpreter with libraries.

I saw that there is a Docker container, but this is limited solution:
size of the container
is much bigger than size of the library itself also it requires to
keep all data in the same
location which then will be bind-mouned into container. If I have
multiple locations with
data this is not very convinient.

пт, 20 груд. 2019 о 09:56 Peter Bunting <peteb...@gmail.com> пише:
--
Alexander Bruy

Peter Bunting

unread,
Dec 20, 2019, 5:50:15 AM12/20/19
to Alexander Bruy, RSGISLib
Probably the most useful thing is the conda-forge build recipe then. 


You could also look at the spack build script:


You might find it difficult building using the system versions of packages, for example GDAL, as some functions require the KEA driver is available and KEA needs the HDF5 library to be built with the C++ library on, which it often isn't. We tended to update to recent versions of dependencies quite quickly as conda-forge and spack as kept quite up to date but the system packages can be quite old which can also cause problems building from source. 

I’ve always found it easier to build our systems as a separate tree, either myself compiling all the packages from source (however I haven’t done that recently as I’ve moved over to use spack for these situations), or using the conda/conda-forge packages.

Best wishes, 

Pete

Alexander Bruy

unread,
Dec 20, 2019, 6:03:31 AM12/20/19
to Peter Bunting, RSGISLib
Thanks for the information! It is very helpful.

пт, 20 груд. 2019 о 12:50 Peter Bunting <peteb...@gmail.com> пише:
> You might find it difficult building using the system versions of packages,
> for example GDAL, as some functions require the KEA driver is available
> and KEA needs the HDF5 library to be built with the C++ library on, which it often isn't.

if this driver required only for some functions, probably it can be made an
optional dependency and corresponding functionality enabled/disabled with
CMake option?

>We tended to update to recent versions of dependencies quite quickly as
> conda-forge and spack as kept quite up to date but the system packages
> can be quite old which can also cause problems building from source.

May I ask why you don't want to stick with some LTR versions or older
release version and make it easier to package library for various distributions?
Most libraries have a stable API and things did not change between minor
(and sometimes even major) versions, so maintaining compatibility should
not be a problem. Conda package will be able to build with its own dependency
while others can use slightly older version.

It will help to promote it and attract users. For example I see how beneficial
will be for QGIS to have integration with RSGISLib and will be happy to
implement it, but without easy to install packages it will be just waste of time
as nobody will use it because there are no usable packages.

--
Alexander Bruy
Reply all
Reply to author
Forward
0 new messages