tbabej / vit

Placeholder to demostrate issue porting for VIT.
0 stars 0 forks source link

[VT-128] configure hardcodes /usr/bin/perl as required dependency #127

Open tbabej opened 6 years ago

tbabej commented 6 years ago

Alick Zhao on 2016-03-08T04:00:12Z says:

Hi,

It seems that in the configure file, perl is needed exactly at /usr/bin/perl, which is not the case with Mac OS X [1].

It might also cause issues on Fedora, since /bin is essentially a symbolic link to /usr/bin/ there. Interestingly, this does not happen if one logs in normally, because /bin is not in the default PATH. However, when using sudo, /bin/ is before /usr/bin in PATH, and thus configure fails.

Besides, more generally, if the user maintains his own version of perl in a nonstandard path, and wishes to build against it, configure will fail too.

[1] https://trac.macports.org/ticket/39373

tbabej commented 6 years ago

Migrated metadata:

Created: 2016-03-08T04:00:12Z
Modified: 2017-12-17T23:05:35Z
tbabej commented 6 years ago

Scott Kostyshak on 2016-03-08T06:29:45Z says:

Thanks for the report. You make good points. If someone posts a patch, I'll take a look.

tbabej commented 6 years ago

Eric Hymowitz on 2016-11-18T03:01:36Z says:

I don't have a patch, but you could probably handle it in the Makefile with a %PERL% tag the same way you have %TASK% and %CLEAR%.

tbabej commented 6 years ago

Paul Beckingham on 2016-11-18T13:19:14Z says:

Workaround:

$ /path/to/my/special/perl configure

Edit: Not a workaround, I misunderstood - configure is a shell script.

tbabej commented 6 years ago

Eric Hymowitz on 2016-11-18T13:33:39Z says:

$ configure PERL=/usr/bin/perl

worked for me.

tbabej commented 6 years ago

Alick Zhao on 2017-12-15T18:33:03Z says:

Seems to me configure PERL=/path/to/perlalso works in spec files for RPM packaging. So change the wording of suggestion to "please try configure PERL=/path/to/your/perl" might suffice, so that people with perl not under /usr/bin will know how to walkaround. I can prepare a patch for that if I get a +1.

tbabej commented 6 years ago

Scott Kostyshak on 2017-12-17T02:34:08Z says:

How is it possible that setting PERL environment variable works? It seems that inside vit.pl the following is hardcoded:

{code:java}

  1. !/usr/bin/perl -w {code}

I agree we should improve this and not rely on paths. If we must rely on a default path, would it be better to rely on the following? {code:java} /usr/bin/env perl {code}

By the way, I don't know much about these kinds of issues as I'm only familiar with Debian derivatives. Also, as you can tell by "git log configure" I haven't touched the configure script.

tbabej commented 6 years ago

Alick Zhao on 2017-12-17T23:05:35Z says:

Then if there is no perl under /usr/bin, vit probably won't work either, even if configure goes through with a customized value for $PERL. This is exactly the case with Mac OS X.

 

Maybe we should just take the patches used by the Macports guys? [1] Basically they changed perl to env perl in shebang, and removed the configure warnings entirely when the found perl is not /usr/bin/perl.

 

[1] https://trac.macports.org/changeset/106751