Skip Menu |
Report information
Id: 123497
Status: open
Priority: 0/
Queue: perl6

Owner: Nobody
Requestors: gabor [at] szabgab.com
Cc:
AdminCc:

Severity: (no value)
Tag: (no value)
Platform: (no value)
Patch Status: (no value)
VM: (no value)



Date: Thu, 25 Dec 2014 21:42:38 +0200
To: "rakudobug [...] perl.org" <rakudobug [...] perl.org>
From: Gabor Szabo <gabor [...] szabgab.com>
Subject: p6doc does not work on OSX (Rakudo * 2014.09)
Download (untitled) / with headers
text/plain 419b

This is a fresh compillation using MoarVM


$ p6doc

/Users/gabor/rakudo-star-2014.09/install/bin/p6doc: line 4: my: command not found

/Users/gabor/rakudo-star-2014.09/install/bin/p6doc: line 5: has: command not found

/Users/gabor/rakudo-star-2014.09/install/bin/p6doc: line 6: syntax error near unexpected token `('

/Users/gabor/rakudo-star-2014.09/install/bin/p6doc: line 6: `    multi method gist(X::P6doc:D:) {'


Date: Sat, 27 Dec 2014 09:18:24 +0200
Subject: Re: [perl #123497] AutoReply: p6doc does not work on OSX (Rakudo * 2014.09)
From: Gabor Szabo <gabor [...] szabgab.com>
To: perl6-bugs-followup [...] perl.org
Same in Rakudo Star 2014.12 and 2014.12.1
Date: Sat, 27 Dec 2014 09:24:09 +0200
Subject: Re: [perl #123497] AutoReply: p6doc does not work on OSX (Rakudo * 2014.09)
From: Gabor Szabo <gabor [...] szabgab.com>
To: perl6-bugs-followup [...] perl.org
Download (untitled) / with headers
text/plain 160b

When running as

perl6 /Users/gabor/rakudo-star-2014.12.1/install/bin/p6doc

or as

perl6-m /Users/gabor/rakudo-star-2014.12.1/install/bin/p6doc

then it works.


Date: Mon, 29 Dec 2014 06:53:47 +0200
From: Gabor Szabo <gabor [...] szabgab.com>
To: perl6-bugs-followup [...] perl.org
Subject: Re: [perl #123497] AutoReply: p6doc does not work on OSX (Rakudo * 2014.09)
Download (untitled) / with headers
text/plain 781b
The same happens with panda. If I try to run directly I get

/Users/gabor/rakudo-star-2014.12.1/install/bin/panda: line 2: use: command not found

/Users/gabor/rakudo-star-2014.12.1/install/bin/panda: line 3: use: command not found

/Users/gabor/rakudo-star-2014.12.1/install/bin/panda: line 4: use: command not found

/Users/gabor/rakudo-star-2014.12.1/install/bin/panda: line 5: use: command not found

/Users/gabor/rakudo-star-2014.12.1/install/bin/panda: line 9: syntax error near unexpected token `('

/Users/gabor/rakudo-star-2014.12.1/install/bin/panda: line 9: `    @*ARGS = %*ENV<PANDA_DEFAULT_OPTS> ~ (@*ARGS ?? ' ' ~ @*ARGS !! '');'


but if I run

perl6 /Users/gabor/rakudo-star-2014.12.1/install/bin/panda

then it works.

Is there something broken in my environment?


Subject: Re: [perl #123497] AutoReply: p6doc does not work on OSX (Rakudo * 2014.09)
To: perl6-bugs-followup [...] perl.org
From: Gabor Szabo <gabor [...] szabgab.com>
Date: Sat, 10 Jan 2015 13:45:04 +0200
Download (untitled) / with headers
text/plain 101b
If I put    

#!/usr/bin/env perl6

as the sh-bang of either of those script, they start to work.

Gabor


Date: Sat, 10 Jan 2015 12:48:31 +0100
Subject: Re: [perl #123497] AutoReply: p6doc does not work on OSX (Rakudo * 2014.09)
From: Tobias Leich <email [...] froggs.de>
To: perl6-compiler [...] perl.org
Download (untitled) / with headers
text/plain 192b
what was in there before? Am 10.01.2015 um 12:45 schrieb Gabor Szabo: Show quoted text
> If I put > > #!/usr/bin/env perl6 > > as the sh-bang of either of those script, they start to work. > > Gabor > >
Date: Sat, 10 Jan 2015 13:57:08 +0200
Subject: Re: [perl #123497] AutoReply: p6doc does not work on OSX (Rakudo * 2014.09)
From: Gabor Szabo <gabor [...] szabgab.com>
To: perl6-bugs-followup [...] perl.org
Download (untitled) / with headers
text/plain 345b
/Users/gabor/rakudo-star-2014.12.1/install/bin/perl6-m

On Sat, Jan 10, 2015 at 1:49 PM, Tobias Leich via RT <perl6-bugs-followup@perl.org> wrote:
Show quoted text
what was in there before?

Am 10.01.2015 um 12:45 schrieb Gabor Szabo:
> If I put
>
> #!/usr/bin/env perl6
>
> as the sh-bang of either of those script, they start to work.
>

Date: Sat, 10 Jan 2015 13:57:41 +0200
To: perl6-bugs-followup [...] perl.org
From: Gabor Szabo <gabor [...] szabgab.com>
Subject: Re: [perl #123497] AutoReply: p6doc does not work on OSX (Rakudo * 2014.09)
Download (untitled) / with headers
text/plain 519b
Or more specifically 

#!/Users/gabor/rakudo-star-2014.12.1/install/bin/perl6-m

On Sat, Jan 10, 2015 at 1:57 PM, Gabor Szabo <gabor@szabgab.com> wrote:
Show quoted text
/Users/gabor/rakudo-star-2014.12.1/install/bin/perl6-m


On Sat, Jan 10, 2015 at 1:49 PM, Tobias Leich via RT <perl6-bugs-followup@perl.org> wrote:
what was in there before?

Am 10.01.2015 um 12:45 schrieb Gabor Szabo:
> If I put
>
> #!/usr/bin/env perl6
>
> as the sh-bang of either of those script, they start to work.
>



To: perl6-compiler [...] perl.org
From: Moritz Lenz <moritz [...] faui2k3.org>
Date: Sat, 10 Jan 2015 13:27:16 +0100
Subject: Re: [perl #123497] AutoReply: p6doc does not work on OSX (Rakudo * 2014.09)
Download (untitled) / with headers
text/plain 427b
On 10.01.2015 12:45, Gabor Szabo wrote: Show quoted text
> If I put > > #!/usr/bin/env perl6 > > as the sh-bang of either of those script, they start to work.
That's quite dangerous. Precompiled modules (on which scripts often depend) only work with the rakudo that compiled them. If a different one is in $PATH before that, the scripts will start to fail with weird errors. Does #!/usr/bin/env /full/path/to/perl6-m work? Cheers, Moritz
Date: Sat, 10 Jan 2015 15:04:44 +0200
Subject: Re: [perl #123497] AutoReply: p6doc does not work on OSX (Rakudo * 2014.09)
To: perl6-bugs-followup [...] perl.org
From: Gabor Szabo <gabor [...] szabgab.com>
Download (untitled) / with headers
text/plain 848b


On Sat, Jan 10, 2015 at 2:27 PM, Moritz Lenz via RT <perl6-bugs-followup@perl.org> wrote:
Show quoted text
On 10.01.2015 12:45, Gabor Szabo wrote:
> If I put
>
> #!/usr/bin/env perl6
>
> as the sh-bang of either of those script, they start to work.

That's quite dangerous. Precompiled modules (on which scripts often
depend) only work with the rakudo that compiled them. If a different one
is in $PATH before that, the scripts will start to fail with weird errors.

Well, I am not suggesting it should be set that way, I don't know how it 'should' be.
I was just reporting what worked and what did not work for me.

 
Show quoted text

Does #!/usr/bin/env /full/path/to/perl6-m work?


yes, I just tried putting this in p6doc:

#!/usr/bin/env /Users/gabor/rakudo-star-2014.12.1/install/bin/perl6-m

and then I could run p6doc on the command line.

Gabor



Download (untitled) / with headers
text/plain 344b
Hi Gabor, On Thu Dec 25 11:42:56 2014, gabor@szabgab.com wrote: Show quoted text
> This is a fresh compillation using MoarVM > > > $ p6doc > > /Users/gabor/rakudo-star-2014.09/install/bin/p6doc: line 4: my: command not > found
Can you please try http://rakudo.org/downloads/star/rakudo-star-2014.12.2.tar.gz and see if it fixes your issue? Cheers, Moritz
Download (untitled) / with headers
text/plain 1.1k
On Tue Feb 03 02:36:35 2015, moritz wrote: Show quoted text
> > $ p6doc > > > > /Users/gabor/rakudo-star-2014.09/install/bin/p6doc: line 4: my: > > command not > > found
> > Can you please try http://rakudo.org/downloads/star/rakudo-star- > 2014.12.2.tar.gz and see if it fixes your issue?
I just stumbled across this today. It looks like this issue has been partially worked-around by adding #!/usr/bin/env to the shebang line for p6doc. The original problem is caused by /usr/local/bin/perl6 being a shell script. OSX does not allow a shebang script as the interpreter for another shebang script. On my system this is: $ cat /usr/local/bin/perl6 #!/bin/sh exec /usr/local/Cellar/rakudo-star/2016.01/bin/moar --execname="$0" --libpath="/usr/local/Cellar/rakudo-star/2016.01/share/nqp/lib" --libpath="/usr/local/Cellar/rakudo-star/2016.01/share/perl6/lib" --libpath="/usr/local/Cellar/rakudo-star/2016.01/share/perl6/runtime" /usr/local/Cellar/rakudo-star/2016.01/share/perl6/runtime/perl6.moarvm "$@" A proper fix could be to replace /usr/local/bin/perl6 with a native binary executable which does the same work as the above shell script.


This service is sponsored and maintained by Best Practical Solutions and runs on Perl.org infrastructure.

For issues related to this RT instance (aka "perlbug"), please contact perlbug-admin at perl.org