0

We want to install git on our system which runs HP UX 11.31 and the standard version of Perl (5.8.8e) which comes with the system. It is of utmost importance that the perl command keeps referring to Perl 5.8.8e so that our scripts run fine.

Git has a dependency on Perl 5.28. Mind, it was working fine with Perl 5.8.8e but we'd rather not risk running into issues later, so we installed it in a separate folder.

Now how can we make sure that git uses the correct version of Perl?

bluppfisk
  • 2,538
  • 3
  • 27
  • 56
  • Re "*Git has a dependency on Perl 5.28*", That's not true. The docs doesn't even mention it requires Perl (though it does mention it requires some Perl modules), so I suspect it only requires Perl 5.8. – ikegami Jan 09 '19 at 20:00
  • http://hpux.connect.org.uk/hppd/hpux/Development/Tools/git-2.20.1/ on this website it states perl as a dependency. But yes it doesn't necessarily mean it has to be 5.28. Just wanted to be sure. – bluppfisk Jan 10 '19 at 08:26
  • Have you considered moving away from a version of Perl that is over twelve years old? What is preventing you from doing that? – Dave Cross Jan 10 '19 at 09:18
  • rrreaaaaallly strict system administrators and lots of legacy code. And expensive devs. And a general culture of "if it ain't broken don't fix it." which is fair enough. It should be possible to run them side-by-side. – bluppfisk Jan 10 '19 at 09:23
  • 1
    @bluppfisk, No, that doesn't say git depends on 5.28. It says that package requires the perl 5.28 package. It says that because the git package was created on a system with perl 5.28, not because git requires 5.28 (which came out earlier this year and which I've never installed, even though I've been using git for many many years) – ikegami Jan 10 '19 at 09:37
  • okay good! I noticed the only reason there's a perl "dependency" seems to be that there's a perl API included in the source code. – bluppfisk Jan 10 '19 at 12:23

1 Answers1

2

The Perl scripts that Git runs begin with #! lines. In the Git source, these lines read #!/usr/bin/perl, but as you build Git to install it, the source-builder replaces these with the correct path. So if the correct path for a correct version of Perl is /usr/local/bin/perl, tell the build to use that; if it's /compat/perl5.28, tell the build to use that, and so on.

torek
  • 448,244
  • 59
  • 642
  • 775