opengisch / OSGeo4A

OSGeo4A is a build environment to cross-compile opensource GIS software for android devices
MIT License
30 stars 22 forks source link

Disabled hdf5 module #22

Closed sklencar closed 5 years ago

sklencar commented 6 years ago

Hdf5 module has been causing a build issue for current QGIS 3.3.0. Therefore -DCMAKE_DISABLE_FIND_PACKAGE_HDF5=TRUE has been added to qgis recipe.sh.

m-kuhn commented 6 years ago

Interesting, is there more information on this build issue?

PeterPetrik commented 6 years ago

@m-kuhn it is because MDAL now optionally depends on HDF5 (https://github.com/qgis/QGIS/blob/master/external/mdal/frmts/mdal_hdf5.hpp).

m-kuhn commented 6 years ago

I see, so basically it's a new (optional) dependency which would need to be built?

Any idea why latest master can be build here without this change?

PeterPetrik commented 6 years ago

You mean master on desktop or android? I think normally you have GDAL built with HDF5 dependency, so you have the library/headers around.

m-kuhn commented 6 years ago

master cross compiled for android

m-kuhn commented 6 years ago

This script here

https://gist.github.com/m-kuhn/9be250c5b0a4d03703f10045832e27c8

It builds master from a couple of days ago with an additional patch (for an error with qgsnative lib) which has been merged back meanwhile

PeterPetrik commented 6 years ago

dont know, for some reason @sklencar doesn't have hdf5 crosscompiled, and you have

m-kuhn commented 6 years ago

Sounds a bit too much like black magic, I cross-compiled only with scripts. I'll check if I have sync'd back everything to master.

m-kuhn commented 6 years ago

Please try again with #23

PeterPetrik commented 5 years ago

@m-kuhn we are still unable to compile without disabling HDF5 with error

CMake Error: CMAKE_C_COMPILER not set, after EnableLanguage
CMake Error at /usr/share/cmake-3.9/Modules/FindHDF5.cmake:196 (try_compile):
Failed to configure test project build system.
Call Stack (most recent call first):
/usr/share/cmake-3.9/Modules/FindHDF5.cmake:484 (_HDF5_test_regular_compiler_C)
src/providers/mdal/CMakeLists.txt:20 (FIND_PACKAGE)

My guess is that in your build (docker?), you do not have libhdf5-dev linux (native) package installed. So FindHDF5 will quit sooner since there are no hdf5 headers on include path at all?

Would it be possible to check in the generated build system if you have HDF5-FOUND set to false or true?

m-kuhn commented 5 years ago

Good guess. But then the followup question would be, why it looks on the native include path, that sounds dangerous (but the distribute.sh files actually does have some nasty dangerous hacks).

PeterPetrik commented 5 years ago

hmm, was it just a statement or should we do something else here for this PR :) ?

m-kuhn commented 5 years ago

Nah, let's just merge it, it doesn't hurt. At least we have all the information in here now, in case someone wonders in the future why this was added ;P