shawnlaffan / perl-alien-proj

Perl Alien package to compile the Proj library
GNU Lesser General Public License v3.0
3 stars 1 forks source link

Alien::proj does not build on older systems (because newer C++ required by proj 9.x.x?) #15

Open eserte opened 1 month ago

eserte commented 1 month ago

On older systems (e.g. CentOS 7) the build fails because proj 9.x.x seems to make use of C++ compiler options not supported here. This can look like

c++: error: unrecognized command line option ‘-Wdate-time’
c++: error: unrecognized command line option ‘-Wduplicated-cond’
c++: error: unrecognized command line option ‘-Wduplicated-branches’
c++: error: unrecognized command line option ‘-Wextra-semi’

(see http://www.cpantesters.org/cpan/report/d7a39936-10ea-11ef-82ca-bf1f6e8775ea for a sample build)

Older proj (e.g. 8.x.x) work fine. My idea would be to introduce a configuration possibility to use older proj versions to be used). A sketch is implemented here: https://www.cpan.org/modules/by-module/GD/SREZIC/patches/Alien-proj-1.27-proj-version-lt.patch

A sample CPAN distroprefs file which applies this patch and sets ALIEN_PROJ_CONFIG_ARGS='--proj-version-lt=9.0.0': https://github.com/eserte/srezic-cpan-distroprefs/blob/master/Alien-proj.yml

eserte commented 1 month ago

Here's a log of a successful build on CentOS 7 using this patch https://github.com/eserte/ci-helper-cpan-pm/actions/runs/9163701923/job/25193398598#step:13:1

shawnlaffan commented 1 month ago

Happy to consider a PR.