WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: apache2.tcz has no perl interpreter in apxs file  (Read 4046 times)

Offline gutmensch

  • Retired Admins
  • Hero Member
  • *****
  • Posts: 605
  • I can make it disappear, have no fear!
    • remembrance blog
apache2.tcz has no perl interpreter in apxs file
« on: June 09, 2010, 05:40:58 AM »
the included perl script file /usr/local/bin/apxs shows:

#!/replace/with/path/to/perl/interpreter -w

instead of

#!/usr/local/bin/perl -w

This causes the php5 with apxs build to fail. maybe apache2 was built without being aware of perl?
Best regards,
Robert
If I seem unduly clear to you, you must have misunderstood what I said. (Alan Greenspan)

Offline robc

  • Sr. Member
  • ****
  • Posts: 447
Re: apache2.tcz has no perl interpreter in apxs file
« Reply #1 on: June 09, 2010, 12:09:00 PM »
the included perl script file /usr/local/bin/apxs shows:

#!/replace/with/path/to/perl/interpreter -w

instead of

#!/usr/local/bin/perl -w
Thank you for pointing this out, I forgot about needing to change the shebang in this script. Will make change and resubmit.
"Never give up! Never surrender!" - Commander Peter Quincy Taggart

"Make it so." - Captain Picard

Offline maro

  • Hero Member
  • *****
  • Posts: 1228
Re: apache2.tcz has no perl interpreter in apxs file
« Reply #2 on: June 09, 2010, 05:34:30 PM »
On the question of shebang lines I'd like to suggest to use: #!/usr/bin/env perl -w

This is IIRC the accepted way for a more generic way to specify the script interpreter. That would for example allow multiple versions of 'perl' to exist on a system and the choice of which one is "active" is controlled by $PATH instead of having to hard-code it into the shebang line.

It might be worth to include this suggestion in the extension creation guidelines.

Offline gutmensch

  • Retired Admins
  • Hero Member
  • *****
  • Posts: 605
  • I can make it disappear, have no fear!
    • remembrance blog
Re: apache2.tcz has no perl interpreter in apxs file
« Reply #3 on: June 10, 2010, 03:10:22 AM »
@maro: nice, didn't know about that possibility... and it's definitely the better way :)
If I seem unduly clear to you, you must have misunderstood what I said. (Alan Greenspan)

Offline mamasboy

  • Newbie
  • *
  • Posts: 3
Re: apache2.tcz has no perl interpreter in apxs file
« Reply #4 on: January 04, 2011, 07:23:31 AM »
Hi,

I'm trying to compile php5 and found there's an apxs problem...

the file starts with

#!/usr/bin/env perl -w -w

there's a double '-w' and I'm wondering if that's causing the problem

Offline robc

  • Sr. Member
  • ****
  • Posts: 447
Re: apache2.tcz has no perl interpreter in apxs file
« Reply #5 on: January 04, 2011, 12:27:47 PM »
Hi,

I'm trying to compile php5 and found there's an apxs problem...

the file starts with

#!/usr/bin/env perl -w -w

there's a double '-w' and I'm wondering if that's causing the problem
That shouldn't matter, apache2 does not automatically install perl, you will need the perl5 extension to use apxs.
"Never give up! Never surrender!" - Commander Peter Quincy Taggart

"Make it so." - Captain Picard