Tiny Core Linux

Tiny Core Extensions => TCE Bugs => Topic started by: gutmensch on June 09, 2010, 05:40:58 AM

Title: apache2.tcz has no perl interpreter in apxs file
Post by: gutmensch 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
Title: Re: apache2.tcz has no perl interpreter in apxs file
Post by: robc 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.
Title: Re: apache2.tcz has no perl interpreter in apxs file
Post by: maro 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.
Title: Re: apache2.tcz has no perl interpreter in apxs file
Post by: gutmensch on June 10, 2010, 03:10:22 AM
@maro: nice, didn't know about that possibility... and it's definitely the better way :)
Title: Re: apache2.tcz has no perl interpreter in apxs file
Post by: mamasboy 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
Title: Re: apache2.tcz has no perl interpreter in apxs file
Post by: robc 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.