git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jakub Narebski <jnareb@gmail.com>
To: "Denis Bueno" <dbueno@gmail.com>
Cc: "Git Mailing List" <git@vger.kernel.org>
Subject: Re: git-instaweb portability issue (maybe?)
Date: Fri, 13 Jun 2008 07:22:59 -0700 (PDT)	[thread overview]
Message-ID: <m3abhpqusj.fsf@localhost.localdomain> (raw)
In-Reply-To: <6dbd4d000806130626pfdb06f2qbfea6f1909710b7b@mail.gmail.com>

"Denis Bueno" <dbueno@gmail.com> writes:

> I'm on OS X 10.4.11 on Intel using git 1.5.5.3.
> 
> I'd been trying to use the git-instaweb script (both with and without
> arguments) with lighttpd (which I installed through Macports) without
> success, seeing the following kind of bizarre error message:
> 
>     funsat[290] > git instaweb
>     /opt/local/bin/git-instaweb: line 6033: /usr/bin/env perl: No such
> file or directory
>     2008-06-13 09:09:31: (log.c.75) server started
> 
>     funsat[291] > 2008-06-13 09:09:31: (mod_cgi.c.998) CGI failed:
> Exec format error /Volumes/work/funsat/.git/gitweb/gitweb.cgi
>     mod_cgi.c.1001: aborted
>     2008-06-13 09:09:31: (mod_cgi.c.584) cgi died, pid: 23237
> 
> "/usr/bin/env perl: No such file or directory"? Huh?  I certainly have
> perl installed, so I don't know what that's about.
> 
> That line simply calls perl by the $PERL variable, which is set at the
> top of the script, like so:
> 
>     PERL='/usr/bin/env perl'

This depends on how git was build (on compile time configuration).
git-instaweb.sh (source of git-instaweb) has

        PERL='@@PERL@@'

which is set to value of $PERL_PATH (or, to be more exact, its squoted
version) during building git-instaweb.  So you can simply use

  $ make PERL_PATH=/usr/bin/perl
  # make PERL_PATH=/usr/bin/perl install

or whatever, or you can use ./configure script

  $ make configure
  $ ./configure --with-perl=/usr/bin/perl


On Linux for example the path to perl is set explicitely, instead of
using "/usr/bin/env perl" construct.  The 'env' construct has the
following disadvantages:
 - it uses first Perl find in your $PATH, so if git works for you or
   don't work depends on user's personal configuration
   (reproductability, convenience and security).
 - AFAIK it doesn't allow to pass switches to Perl


P.S. Check if you have new enough Perl (there are problems with
Unicode support in old Perl), and if you have CGI.pm new enough
installed for gitweb.

-- 
Jakub Narebski
Poland
ShadeHawk on #git

      parent reply	other threads:[~2008-06-13 14:24 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-06-13 13:26 git-instaweb portability issue (maybe?) Denis Bueno
2008-06-13 13:38 ` Denis Bueno
2008-06-13 13:46   ` Asheesh Laroia
2008-06-13 13:59     ` Denis Bueno
2008-06-13 14:10       ` Chris Ridd
2008-06-13 14:16         ` Asheesh Laroia
2008-06-13 14:42           ` Chris Ridd
2008-06-13 14:47             ` Denis Bueno
2008-06-13 14:21   ` Luciano Rocha
2008-06-13 14:39     ` Denis Bueno
2008-06-13 15:13       ` Luciano Rocha
2008-06-13 15:32         ` Jakub Narebski
2008-06-13 15:39           ` Luciano Rocha
2008-06-13 14:22 ` Jakub Narebski [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=m3abhpqusj.fsf@localhost.localdomain \
    --to=jnareb@gmail.com \
    --cc=dbueno@gmail.com \
    --cc=git@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).