Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug] Compilation fails with gdal 3.3.0 because ogr_srs_api.h is not found #1649

Closed
ggardet opened this issue Jun 16, 2021 · 11 comments
Closed
Labels
bug Something isn't working

Comments

@ggardet
Copy link
Contributor

ggardet commented Jun 16, 2021

Describe the bug
ogr_srs_api.h is not found with gdal 3.3.0. It was fine with gdal 3.2.3. This file is available under /usr/include/gdal.
Error log:

[  255s] GISRC=/home/abuild/rpmbuild/BUILD/grass-7.8.5/dist.aarch64-unknown-linux-gnu/demolocation/.grassrc78 GISBASE=/home/abuild/rpmbuild/BUILD/grass-7.8.5/dist.aarch64-unknown-linux-gnu PATH="/home/abuild/rpmbuild/BUILD/grass-7.8.5/dist.aarch64-unknown-linux-gnu/bin:/home/abuild/rpmbuild/BUILD/grass-7.8.5/dist.aarch64-unknown-linux-gnu/bin:/home/abuild/rpmbuild/BUILD/grass-7.8.5/dist.aarch64-unknown-linux-gnu/scripts:$PATH" PYTHONPATH="/home/abuild/rpmbuild/BUILD/grass-7.8.5/dist.aarch64-unknown-linux-gnu/etc/python:/home/abuild/rpmbuild/BUILD/grass-7.8.5/dist.aarch64-unknown-linux-gnu/gui/wxpython:$PYTHONPATH" LD_LIBRARY_PATH="/home/abuild/rpmbuild/BUILD/grass-7.8.5/dist.aarch64-unknown-linux-gnu/bin:/home/abuild/rpmbuild/BUILD/grass-7.8.5/dist.aarch64-unknown-linux-gnu/bin:/home/abuild/rpmbuild/BUILD/grass-7.8.5/dist.aarch64-unknown-linux-gnu/scripts:/home/abuild/rpmbuild/BUILD/grass-7.8.5/dist.aarch64-unknown-linux-gnu/lib:/home/abuild/rpmbuild/BUILD/grass-7.8.5/dist.aarch64-unknown-linux-gnu/lib:" LC_ALL=C LANG=C LANGUAGE=C ./ctypesgen.py --cpp "gcc -E   ""     -I/home/abuild/rpmbuild/BUILD/grass-7.8.5/dist.aarch64-unknown-linux-gnu/include -I/home/abuild/rpmbuild/BUILD/grass-7.8.5/dist.aarch64-unknown-linux-gnu/include -D__GLIBC_HAVE_LONG_LONG" -lgrass_imagery.7.8   /home/abuild/rpmbuild/BUILD/grass-7.8.5/dist.aarch64-unknown-linux-gnu/include/grass/imagery.h /home/abuild/rpmbuild/BUILD/grass-7.8.5/dist.aarch64-unknown-linux-gnu/include/grass/defs/imagery.h -o OBJ.aarch64-unknown-linux-gnu/imagery.py
[  255s] Status: Preprocessing /tmp/tmpdgg74w2b.h
[  255s] Status: gcc -E        -I/home/abuild/rpmbuild/BUILD/grass-7.8.5/dist.aarch64-unknown-linux-gnu/include -I/home/abuild/rpmbuild/BUILD/grass-7.8.5/dist.aarch64-unknown-linux-gnu/include -D__GLIBC_HAVE_LONG_LONG -U __GNUC__ -dD "-Dinline=" "-D__inline__=" "-D__extension__=" "-D_Bool=uint8_t" "-D__const=const" "-D__asm__(x)=" "-D__asm(x)=" "-DCTYPESGEN=1" "/tmp/tmpdgg74w2b.h"
[  255s] Error: gcc -E        -I/home/abuild/rpmbuild/BUILD/grass-7.8.5/dist.aarch64-unknown-linux-gnu/include -I/home/abuild/rpmbuild/BUILD/grass-7.8.5/dist.aarch64-unknown-linux-gnu/include -D__GLIBC_HAVE_LONG_LONG: In file included from /tmp/tmpdgg74w2b.h:1:
[  255s] Error: gcc -E        -I/home/abuild/rpmbuild/BUILD/grass-7.8.5/dist.aarch64-unknown-linux-gnu/include -I/home/abuild/rpmbuild/BUILD/grass-7.8.5/dist.aarch64-unknown-linux-gnu/include -D__GLIBC_HAVE_LONG_LONG: /home/abuild/rpmbuild/BUILD/grass-7.8.5/dist.aarch64-unknown-linux-gnu/include/grass/gprojects.h:32:14: fatal error: ogr_srs_api.h: No such file or directory
[  255s] Error: gcc -E        -I/home/abuild/rpmbuild/BUILD/grass-7.8.5/dist.aarch64-unknown-linux-gnu/include -I/home/abuild/rpmbuild/BUILD/grass-7.8.5/dist.aarch64-unknown-linux-gnu/include -D__GLIBC_HAVE_LONG_LONG:    32 | #    include <ogr_srs_api.h>
[  255s] Error: gcc -E        -I/home/abuild/rpmbuild/BUILD/grass-7.8.5/dist.aarch64-unknown-linux-gnu/include -I/home/abuild/rpmbuild/BUILD/grass-7.8.5/dist.aarch64-unknown-linux-gnu/include -D__GLIBC_HAVE_LONG_LONG:       |              ^~~~~~~~~~~~~~~
[  255s] Error: gcc -E        -I/home/abuild/rpmbuild/BUILD/grass-7.8.5/dist.aarch64-unknown-linux-gnu/include -I/home/abuild/rpmbuild/BUILD/grass-7.8.5/dist.aarch64-unknown-linux-gnu/include -D__GLIBC_HAVE_LONG_LONG: compilation terminated.

To Reproduce
Try to build against gdal 3.3.0

Expected behavior
Compilation should pass.

Screenshots
N/A

System description (please complete the following information):

  • Operating System: Linux, openSUSE Tumbleweed
  • GRASS GIS version: 7.8.5

Additional context

@ggardet ggardet added the bug Something isn't working label Jun 16, 2021
@tigerfoot
Copy link

@rouault this is not a regression in gdal right, like missing during install ?
I saw the file in source tar.xz

@rouault
Copy link
Member

rouault commented Jun 16, 2021

@rouault this is not a regression in gdal right, like missing during install ?

no, ogr_srs_api.h is still installed by make install

@tigerfoot
Copy link

tigerfoot commented Jun 16, 2021

@rouault this is not a regression in gdal right, like missing during install ?

no, ogr_srs_api.h is still installed by make install
Ok thanks for the quick reply, I rechecked and its there as expected ... in
/usr/include/gdal/ogr_srs_api.h

@nilason
Copy link
Contributor

nilason commented Jun 16, 2021

This is probably the same issue as reported with #1563, fixed with #1567 for master and 7.8.6.

@nilason
Copy link
Contributor

nilason commented Jun 16, 2021

The error log extract quoted above is not the cause of the compilation failure. This is from the ctypesgen parsing which is cluttered with "false" error warnings.

@tigerfoot
Copy link

The error log extract quoted above is not the cause of the compilation failure. This is from the ctypesgen parsing which is cluttered with "false" error warnings.

I agree at least on x86_64 we have error in v-hull as you cited #1563
see
build error x86_64
Unfortunately arm is scheduled to be rebuild ...
https://build.opensuse.org/package/show/Application:Geo/grass

So clearly we will apply the patch, or 7.8.6 is about to be published in the next 48hours ?

@nilason
Copy link
Contributor

nilason commented Jun 16, 2021

It is very soon to be released I guess but perhaps not within 48 hrs.
See https://github.com/macports/macports-ports/blob/master/gis/grass7/files/patch-bool-fix.diff for a small temporary fix.

@tigerfoot
Copy link

Ok I used to pick direct commit (easier to maintain on OBS for OpenSUSE spec file)
https://github.com/OSGeo/grass/commit/b86314c7.patch

I'm testing a local build, and if ok submit fixes directly there.
@nilason thanks for your quick and efficient help!

If everything build fine until tomorrow we (me or @ggardet ) will close this issue.

@tigerfoot
Copy link

Ok perfect with that patch every plateform build correctly. So closing.

@nilason
Copy link
Contributor

nilason commented Jun 16, 2021

Ok perfect with that patch every plateform build correctly. So closing.

Great!

@nilason
Copy link
Contributor

nilason commented Sep 22, 2021

Closing this, please reopen if needed.

@nilason nilason closed this as completed Sep 22, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants