-
Notifications
You must be signed in to change notification settings - Fork 803
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
Rationale for having the PROJ_LIB compile time string tested last #2399
Comments
I'm afraid people will never agree on the order into which things are tested. A rationale for PROJ_LIB env var having precedence on the compile time hardcoded value is that sometimes installation is moved away from its installation prefix (like Conda-based installs I believe) |
I agree this will probably never reach a consensus. That's why I was proposing (and can do a PR for this) a compile time switch to propose both behaviour : When building the lib targetting a system wide installation (usually unix environment philosphy) , then I agree that the PROJ_LIB env var priority is better, but when building the lib in order to integrate it as a part of a specific piece of software (as many MS Windows software do), I would prefer that a later install of another software using PROJ do not interfer with my software (e.g. when installing OSGEO4W the variable get set and this can mess up other instances of the dll) And this is a real world scenario that I actually faced. |
Agreed @Matioupi in fact I recently mentioned a similar issue on the gdal-dev list when testing GDAL 3.1.4 release candidate (with PROJ-master) on Windows. +1 |
#2476 is an attempt at addressing this issue. Please check that it works as intended |
I will test that, thanks ! |
Add build time option to make PROJ_LIB env var tested last (fixes #2399)
Hello,
I've seen a few issues about the PROJ lib environment variable / compilte time variable, I hope it's not a duplicate.
is there a rationale (that I missed) for having the PROJ_LIB compile time preprocessor variable tested at the very end of the sequence of default path search ?
PROJ/src/filemanager.cpp
Line 1608 in 64d46a6
I would personnaly prefer to give priority to the library hard-coded value if there is one defined at compile time.
If I understand current implementation (and observed behaviour), it's the opposite : the hardcoded internal path is tested in very last position and actually skipped if a PROJ_LIB environment variable is present.
What about adding a compile time switch to either build a proj lib with priority to compile time hard-coded value, or use the current implementation ?
The text was updated successfully, but these errors were encountered: