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

Add note that C++ is required #9

Open johannessen opened 2 years ago

johannessen commented 2 years ago

I tried installing Alien::proj on a system that didn’t have a C++ compiler. Not being aware of the compiler being missing, I spent some time looking through your recent changes regarding cmake, searching for a problem that didn’t exist.

I feel like a note in the documentation would be useful.

This PR also adds a check for C++ that prints a message right at the start if no suitable compiler can be found. Not sure how helpful this will turn out to be, but I suppose it can’t hurt?

shawnlaffan commented 2 years ago

Thanks for this. I've been on the lookout for something like this for a while.

mohawk2 commented 1 month ago

Maybe merge and release this? :-}

shawnlaffan commented 1 month ago

ExtUtils::CppGuess might be a better option as Alien::proj does not itself use c++ (it is only needed for the share builds). The most recent version of that module fails on many systems, though: https://github.com/tsee/extutils-cppguess/issues/30.

mohawk2 commented 1 month ago

EU::CppG has always reported a "failure" (refused to install) if it couldn't find a C++ compiler. ExtUtils::F77 does very similar. What is it you think it should do in that circumstance?

Here, it seems that A:proj could detect it needed to do a share install, and dynamically add a dependency on EU:CppG, since I gather from this discussion it needs a C++ compiler for that to succeed.