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

libgis: allow bypass of compatibility test #3378

Merged
merged 2 commits into from
Feb 5, 2024

Conversation

metzm
Copy link
Contributor

@metzm metzm commented Jan 26, 2024

The compatibility test for C modules in https://github.com/OSGeo/grass/blob/main/lib/gis/gisinit.c is stricter than it needs to be, because GRASS has versioned shared libraries including major and minor version. That means, a C module compiled against an older version will not run simply because it will not find the old shared libraries.

With a bugfix release, binary compatibility is preserved and the test is not needed. This PR introduces a mechanism to bypass the shared libs compatibility test if the env var GRASS_COMPATIBILITY_TEST is set to 0 (zero). In this case a warning is issued and the module is allowed to execute. If this new env var is not set, the default behaviour with fatal error in case of different GIS_H_VERSIONs is preserved.

The motivation for this new mechanism is that for many users it might not be easy to reinstall or recompile addons written in C for each new bugfix release.

@metzm metzm added C Related code is in C libraries labels Jan 26, 2024
@metzm metzm added this to the 8.4.0 milestone Jan 26, 2024
@metzm metzm requested a review from neteler January 26, 2024 09:46
@github-actions github-actions bot added HTML Related code is in HTML docs labels Jan 31, 2024
Copy link
Member

@neteler neteler left a comment

Choose a reason for hiding this comment

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

Looks good to me, thanks.

@metzm metzm merged commit a1cadc7 into OSGeo:main Feb 5, 2024
25 checks passed
@metzm metzm deleted the libgis_compat_test branch February 5, 2024 16:53
jadenabrams100 pushed a commit to ncsu-csc472-spring2024/grass-CI-playground that referenced this pull request Feb 21, 2024
* define answer and message

* explain new env var in the docs
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C Related code is in C docs HTML Related code is in HTML libraries
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants