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

GitHub actions: compile driver on Ubuntu #1

Merged
merged 20 commits into from
May 3, 2022

Conversation

neteler
Copy link
Member

@neteler neteler commented Apr 29, 2022

First attempt to compile GDAL-GRASS driver including tests for GRASS GIS raster and vector maps.

@neteler neteler added enhancement New feature or request CI GitHub Actions related labels Apr 29, 2022
@neteler neteler marked this pull request as ready for review April 29, 2022 16:57
@neteler
Copy link
Member Author

neteler commented Apr 29, 2022

All compiles and the tests are executed.

Still:

gdalinfo /home/runner/grassdata/nc_spm_08_micro/PERMANENT/cellhd/elevation
ERROR 1: libgrass_vector.7.8.so: cannot open shared object file: No such file or directory
ERROR 1: libgrass_vector.7.8.so: cannot open shared object file: No such file or directory
ERROR 1: libgrass_dgl.7.8.so: cannot open shared object file: No such file or directory
ERROR 1: libgrass_dgl.7.8.so: cannot open shared object file: No such file or directory
ERROR 4: `/home/runner/grassdata/nc_spm_08_micro/PERMANENT/cellhd/elevation' not recognized as a supported file format.
gdalinfo failed - unable to open '/home/runner/grassdata/nc_spm_08_micro/PERMANENT/cellhd/elevation'.

For this, the upcoming release of GRASS 7.8.8 (relevant change: OSGeo/grass#2280) is needed

@metzm
Copy link
Collaborator

metzm commented May 2, 2022

With current released GRASS versions, you need to add the location of GRASS libraries to /etc/ld.so.conf.d/ or to LD_LIBRARY_PATH for the plugin to work.

rm -f nc_spm_08_micro.zip )

# workaround for GRASS GIS < 7.8.8
export LD_LIBRARY_PATH=$(pkg-config --libs-only-L grass | sed 's+-L++g')
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I see this ($(pkg-config --libs-only-L grass | sed 's+-L++g')) is resolved as LD_LIBRARY_PATH=/usr/lib/grass7.8/lib

shouldn't it be LD_LIBRARY_PATH=/usr/lib/grass78/lib (without dot)?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If it is certain it is G78 then
LD_LIBRARY_PATH=$(grass78 --config path) could be an alternative.

Copy link
Member Author

@neteler neteler May 2, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh right, I overlooked the dot!

Watch outcome here:
https://github.com/neteler/gdal-grass/actions/

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

IMHO, a generic way to set LD_LIBRARY_PATH that works with both GRASS 7 and GRASS 8 should be used if possible.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

IMHO, a generic way to set LD_LIBRARY_PATH that works with both GRASS 7 and GRASS 8 should be used if possible.

Absolutely. As grass.pc seem to be broken an alternative is: grass --config path which seems to work. But pre-G8 it is grass78 --config path etc.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Success! And yes, changed now to "versionless" with grass as well.

https://github.com/neteler/gdal-grass/actions/runs/2260092078

Thanks for your assistance!

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Success! And yes, changed now to "versionless" with grass as well.

https://github.com/neteler/gdal-grass/actions/runs/2260092078

Thanks for your assistance!

Great! Is grass78 symlinked to grass on Linux?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just an explainer if it wasn't obvious. LD_LIBRARY_PATH needs to be set for being picked up by ctypesgen, for loading the libraries.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great! Is grass78 symlinked to grass on Linux?

At least on Debian, Ubuntu and Fedora yes.

@neteler neteler self-assigned this May 2, 2022
@neteler neteler merged commit 29e776c into OSGeo:main May 3, 2022
@neteler neteler deleted the GHA_ubuntu_compilation branch May 3, 2022 08:00
@neteler neteler added this to the 1.0.0 milestone Jun 3, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CI GitHub Actions related enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants