git/list[1] front-page[2] threads[3] people[4] search[5] about
 

git-instaweb portability issue (maybe?)

From
Denis Bueno <dbueno@gmail.com>
Date
Jun 13, 2008, 13:26 UTC
Message-ID
<6dbd4d000806130626pfdb06f2qbfea6f1909710b7b@mail.gmail.com>
Hi,
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'

If I change this line to point to my perl directly, it works. On a hunch, I changed it to:

    PERL="/usr/bin/env perl"  # note the double-quotes

And now it works. Could this be changed for future releases of git? Does this in fact increase portability, or is something more sinister going on?

Thanks.
-- 
 Denis
Next: Denis Bueno
Message 1 of 14 in “git-instaweb portability issue (maybe?)”
  1. Denis BuenoJun 13, 2008
  2. Denis BuenoJun 13, 2008
  3. Asheesh LaroiaJun 13, 2008
  4. Denis BuenoJun 13, 2008
  5. Chris RiddJun 13, 2008
  6. Asheesh LaroiaJun 13, 2008
  7. Chris RiddJun 13, 2008
  8. Denis BuenoJun 13, 2008
  9. Luciano RochaJun 13, 2008
  10. Denis BuenoJun 13, 2008
  11. Luciano RochaJun 13, 2008
  12. Jakub NarebskiJun 13, 2008
  13. Luciano RochaJun 13, 2008
  14. Jakub NarebskiJun 13, 2008

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.