Re: FC31 can't find my module subs

2019-11-03 Thread ToddAndMargo via perl6-users

On 11/3/19 11:31 PM, JJ Merelo wrote:

Again, running stuff and installing it as root is never a good idea



Most of my programs are for system administration and I have
no choice but to run them as root.


Re: FC31 can't find my module subs

2019-11-03 Thread ToddAndMargo via perl6-users

On 11/3/19 11:31 PM, JJ Merelo wrote:
Again, running stuff and installing it as root is never a good idea. 
It's not a good idea either to dump your modules in a directory, the 
proper way to do that is through zef install, running as a 
non-privileged user. The privileges of the .precomp directory might be 
one thing, but there might be other at work here.


El lun., 4 nov. 2019 a las 8:22, ToddAndMargo via perl6-users 
(mailto:perl6-users@perl.org>>) escribió:


Oh and it does find and read the modules.   If I
give it a bad module name, I get the finger wagged
at me:

# perl6 -I/home/linuxutil/p6lib -e 'use BadName;  ModuleTest;
ModuleTst;'
===SORRY!===
Could not find BadName at line 1 in:
      file#/home/linuxutil/p6lib
      inst#/root/.perl6
      inst#/opt/rakudo-pkg/share/perl6/site
      inst#/opt/rakudo-pkg/share/perl6/vendor
      inst#/opt/rakudo-pkg/share/perl6/core
      ap#
      nqp#
      perl5#


As opposed to something it can find:

# perl6 -I/home/linuxutil/p6lib -e 'use ModuleTest;  ModuleTest;
ModuleTst;'
===SORRY!=== Error while compiling /home/linuxutil/p6lib/ModuleTest.pm6
(ModuleTest)
Undeclared name:
      ModuleTest used at line 4



--
JJ



Problem still occurs with selinux disabled

--
~~
Computers are like air conditioners.
They malfunction when you open windows
~~


Re: FC31 can't find my module subs

2019-11-03 Thread JJ Merelo
Again, running stuff and installing it as root is never a good idea. It's
not a good idea either to dump your modules in a directory, the proper way
to do that is through zef install, running as a non-privileged user. The
privileges of the .precomp directory might be one thing, but there might be
other at work here.

El lun., 4 nov. 2019 a las 8:22, ToddAndMargo via perl6-users (<
perl6-users@perl.org>) escribió:

> Oh and it does find and read the modules.   If I
> give it a bad module name, I get the finger wagged
> at me:
>
> # perl6 -I/home/linuxutil/p6lib -e 'use BadName;  ModuleTest; ModuleTst;'
> ===SORRY!===
> Could not find BadName at line 1 in:
>  file#/home/linuxutil/p6lib
>  inst#/root/.perl6
>  inst#/opt/rakudo-pkg/share/perl6/site
>  inst#/opt/rakudo-pkg/share/perl6/vendor
>  inst#/opt/rakudo-pkg/share/perl6/core
>  ap#
>  nqp#
>  perl5#
>
>
> As opposed to something it can find:
>
> # perl6 -I/home/linuxutil/p6lib -e 'use ModuleTest;  ModuleTest;
> ModuleTst;'
> ===SORRY!=== Error while compiling /home/linuxutil/p6lib/ModuleTest.pm6
> (ModuleTest)
> Undeclared name:
>  ModuleTest used at line 4
>


-- 
JJ


Re: FC31 can't find my module subs

2019-11-03 Thread ToddAndMargo via perl6-users

Oh and it does find and read the modules.   If I
give it a bad module name, I get the finger wagged
at me:

# perl6 -I/home/linuxutil/p6lib -e 'use BadName;  ModuleTest; ModuleTst;'
===SORRY!===
Could not find BadName at line 1 in:
file#/home/linuxutil/p6lib
inst#/root/.perl6
inst#/opt/rakudo-pkg/share/perl6/site
inst#/opt/rakudo-pkg/share/perl6/vendor
inst#/opt/rakudo-pkg/share/perl6/core
ap#
nqp#
perl5#


As opposed to something it can find:

# perl6 -I/home/linuxutil/p6lib -e 'use ModuleTest;  ModuleTest; ModuleTst;'
===SORRY!=== Error while compiling /home/linuxutil/p6lib/ModuleTest.pm6 
(ModuleTest)

Undeclared name:
ModuleTest used at line 4


Re: FC31 can't find my module subs

2019-11-03 Thread ToddAndMargo via perl6-users

On 11/3/19 10:58 PM, JJ Merelo wrote:
The only thing I can think of is not having permission to write in that 
directory or in the directory you're running your program. In that case, 
perl6 will not be able to create a .precomp hidden directory, and that 
might result in what you're seeing. I see your modules are installed as 
root, which is probably not a good idea. if you're running your program 
as tony, you don't have write permission in /home/linuxutil/p6lib/ (as 
seen in the directory), and that might result in the eventual error 
you're seeing.


Just chown -R tony /home/linuxutil/p6lib and that should work.

JJ


I am so, so screwed if I don't get this working.

I have even tried prior versions:

rakudo-pkg-Fedora29-2018.11-01.x86_64.rpm
rakudo-pkg-Fedora29-2019.03.1-01.x86_64.rpm
rakudo-pkg-Fedora30-2019.03.1-03.x86_64.rpm
rakudo-pkg-Fedora30-2019.07.1-03.x86_64.rpm

and the one in the Fedora repo

it does the same thing for users tony, todd, root

I renamed p6lib/.precomp and it recreate one
as soon as I ran something (as root this time)

[root@rn6 p6lib]# mv .precomp .precomp.000

[root@rn6 p6lib]# ../GetPublicIP.pl6
===SORRY!=== Error while compiling /home/linuxutil/p6lib/../GetPublicIP.pl6
Undeclared names:
RunNoShell used at lines 19, 23
WriteSecondaryClipboard used at line 24

[root@rn6 p6lib]# ls -al .precomp*
.precomp:
total 12
drwxr-xr-x. 3 root root  4096 Nov  3 23:12 .
drwxrwxr-x. 4 tony users 4096 Nov  3 23:12 ..
drwxr-xr-x. 8 root root  4096 Nov  3 23:12 
843FBB0CEFE0FB475EBFA7FEAEEADA648E562FF7

-rw-r--r--. 1 root root 0 Nov  3 23:12 .lock

.precomp.000:
total 32
drwxr-xr-x.  8 root root  4096 Nov  3 18:46 .
drwxrwxr-x.  4 tony users 4096 Nov  3 23:12 ..
drwxr-xr-x. 10 root root  4096 Nov  3 18:46 
07375CA427616339BBFC24962204EEB83B2CEE6A
drwxr-xr-x.  8 root root  4096 Nov  3 14:32 
4912B1FACD657C183C02A1B78AD3A2E03B1CC2D0
drwxr-xr-x. 12 root root  4096 Nov  3 18:27 
843FBB0CEFE0FB475EBFA7FEAEEADA648E562FF7
drwxr-xr-x. 10 root root  4096 Nov  3 18:45 
B584C5F1DFA3585D8CEABA17618A6737431E2D00
drwxr-xr-x. 43 root root  4096 Jun 11 15:46 
B7E59BC9C829B78CEACC421073F5F16FDE0DA86F
drwxr-xr-x.  9 root root  4096 Apr 28  2019 
D806D91A85A9EF22D75A1EBA54A6A27D1E3A7068

-rw-r--r--.  1 root root 0 Apr 28  2019 .lock



--
~~
Computers are like air conditioners.
They malfunction when you open windows
~~


Re: FC31 can't find my module subs

2019-11-03 Thread JJ Merelo
The only thing I can think of is not having permission to write in that
directory or in the directory you're running your program. In that case,
perl6 will not be able to create a .precomp hidden directory, and that
might result in what you're seeing. I see your modules are installed as
root, which is probably not a good idea. if you're running your program as
tony, you don't have write permission in /home/linuxutil/p6lib/ (as seen in
the directory), and that might result in the eventual error you're seeing.

Just chown -R tony /home/linuxutil/p6lib and that should work.

JJ


Re: FC31 can't find my module subs

2019-11-03 Thread ToddAndMargo via perl6-users
El lun., 4 nov. 2019 a las 6:48, ToddAndMargo via perl6-users 
(mailto:perl6-users@perl.org>>) escribió:


On 11/3/19 6:56 PM, ToddAndMargo via perl6-users wrote:
 > On 11/3/19 3:15 PM, ToddAndMargo via perl6-users wrote:
 >> Hi All,
 >>
 >> Help!
 >>
 >> I just upgraded Fedora from 30 to 31.
 >>
 >> I upgraded to rakudo-pkg-Fedora31-2019.07.1-03.x86_64.rpm
 >> from https://github.com/nxadm/rakudo-pkg/releases
 >>
 >> Now P6 can not find my subs inside my modules:
 >>
 >> # perl6 -I/home/linuxutil/p6lib -MPrintColors -e 'PrintGreen(
"Hi\n" );'
 >>  ===SORRY!=== Error while compiling -e
 >>  Undeclared name:
 >>  PrintGreen used at line 1
 >>
 >> [editorial comment] HHH! [/editorial comment]
 >>
 >> The stock "rakudo" and "rakudo-zef" that resides in the
 >> Fedora repo's has the same issue.
 >>
 >> Many thanks,
 >> -T
 >
 >
 > I am hamstrung on so may fronts if I don't get this working!
 >
 > I gets uglier:
 >
 > # cat p6lib/ModuleTest.pm6
 > sub ModuleTest() is export( :ModuleTest ) { say "Hi"; }
 > sub ModuleTst()  is export( :ModuleTst )  { say "Bye"; }
 >
 >
 > # perl6 -I./p6lib -e 'use ModuleTest :ModuleTest :ModuleTst;
ModuleTest;
 > ModuleTst;'
 >
 > ===SORRY!=== Error while compiling -e
 > Undeclared name:
 >      ModuleTst used at line 1
 >
 >
 > And way uglier.  I removed the ":"
 > # cat p6lib/ModuleTest.pm6
 >
 > # sub ModuleTest() is export( :ModuleTest ) { say  "Hi"; }
 > # sub ModuleTst()  is export( :ModuleTst )  { say "Bye"; }
 > sub ModuleTest() is export( ModuleTest ) { say  "Hi"; }
 > sub ModuleTst()  is export( ModuleTst )  { say "Bye"; }
 >
 >
 > # perl6 -I/home/linuxutil/p6lib -e 'use ModuleTest;  ModuleTest;
 > ModuleTst;'
 > ===SORRY!=== Error while compiling
/home/linuxutil/p6lib/ModuleTest.pm6
 > (ModuleTest)
 > Undeclared name:
 >      ModuleTest used at line 4
 >
 > And, And, depending on the position of the moon overhead,
 > sometimes it works.    AAAHHH!


I just reproduced this problem on a fresh Fedora 31
virtual machine that has never before been touched by
perl6 (rakudo)



--
JJ




On 11/3/19 10:27 PM, JJ Merelo wrote:
> What's the content of /home/linuxutil/p6lib?
>

/home/linuxutil/p6lib is where I stash my p6 modules.
ModuleTest.pm6 is one of them.

This error is occurring across all my programs
that call my custom modules.

And in case that was not what you asked:

# ls -al /home/linuxutil/p6lib/
total 80
drwxrwxr-x.  3 root root   4096 Nov  3 18:53 .
drwxr-xr-x. 27 root root  12288 Jun 11 15:44 ..
-rw-r--r--.  1 tony users  1972 Apr 28  2019 CheckSystemDependancy.pm6
-rwxr-xr-x.  1 tony users 11367 Nov  3 18:30 CurlUtils.pm6
-rwxr-xr-x.  1 tony users  2435 Apr 28  2019 eMailDate.pm6
-rwxr-xr-x.  1 tony users 0 Apr 26  2019 FileVer.pm6
-rwxrwxrwx.  1 tony users   295 Nov  3 18:52 ModuleTest.pm6
-rw-r--r--.  1 tony users  4194 Apr 26  2019 Net.FTP.Inline.Perl5.pm6
-rwxr-xr-x.  1 tony users  2226 Apr 28  2019 PauseLib.pm6
drwxr-xr-x.  8 root root   4096 Nov  3 18:46 .precomp
-rwxr-xr-x.  1 tony users  1425 Apr 28  2019 PrintColors.pm6
-rw-r--r--.  1 tony users  2360 Apr 26  2019 Raw.pm6
-rwxr-xr-x.  1 tony users  5380 Nov  3 18:15 RunNoShellLib.pm6
-rw-r--r--.  1 tony users  3177 Nov  3 18:29 X11Clipboard.pm6
-rw-r--r--.  1 tony users  2748 Apr 26  2019 Xlib.pm6






--
~~
Computers are like air conditioners.
They malfunction when you open windows
~~


Re: FC31 can't find my module subs

2019-11-03 Thread JJ Merelo
What's the content of /home/linuxutil/p6lib?

El lun., 4 nov. 2019 a las 6:48, ToddAndMargo via perl6-users (<
perl6-users@perl.org>) escribió:

> On 11/3/19 6:56 PM, ToddAndMargo via perl6-users wrote:
> > On 11/3/19 3:15 PM, ToddAndMargo via perl6-users wrote:
> >> Hi All,
> >>
> >> Help!
> >>
> >> I just upgraded Fedora from 30 to 31.
> >>
> >> I upgraded to rakudo-pkg-Fedora31-2019.07.1-03.x86_64.rpm
> >> from https://github.com/nxadm/rakudo-pkg/releases
> >>
> >> Now P6 can not find my subs inside my modules:
> >>
> >> # perl6 -I/home/linuxutil/p6lib -MPrintColors -e 'PrintGreen( "Hi\n" );'
> >>  ===SORRY!=== Error while compiling -e
> >>  Undeclared name:
> >>  PrintGreen used at line 1
> >>
> >> [editorial comment] HHH! [/editorial comment]
> >>
> >> The stock "rakudo" and "rakudo-zef" that resides in the
> >> Fedora repo's has the same issue.
> >>
> >> Many thanks,
> >> -T
> >
> >
> > I am hamstrung on so may fronts if I don't get this working!
> >
> > I gets uglier:
> >
> > # cat p6lib/ModuleTest.pm6
> > sub ModuleTest() is export( :ModuleTest ) { say "Hi"; }
> > sub ModuleTst()  is export( :ModuleTst )  { say "Bye"; }
> >
> >
> > # perl6 -I./p6lib -e 'use ModuleTest :ModuleTest :ModuleTst; ModuleTest;
> > ModuleTst;'
> >
> > ===SORRY!=== Error while compiling -e
> > Undeclared name:
> >  ModuleTst used at line 1
> >
> >
> > And way uglier.  I removed the ":"
> > # cat p6lib/ModuleTest.pm6
> >
> > # sub ModuleTest() is export( :ModuleTest ) { say  "Hi"; }
> > # sub ModuleTst()  is export( :ModuleTst )  { say "Bye"; }
> > sub ModuleTest() is export( ModuleTest ) { say  "Hi"; }
> > sub ModuleTst()  is export( ModuleTst )  { say "Bye"; }
> >
> >
> > # perl6 -I/home/linuxutil/p6lib -e 'use ModuleTest;  ModuleTest;
> > ModuleTst;'
> > ===SORRY!=== Error while compiling /home/linuxutil/p6lib/ModuleTest.pm6
> > (ModuleTest)
> > Undeclared name:
> >  ModuleTest used at line 4
> >
> > And, And, depending on the position of the moon overhead,
> > sometimes it works.AAAHHH!
>
>
> I just reproduced this problem on a fresh Fedora 31
> virtual machine that has never before been touched by
> perl6 (rakudo)
>


-- 
JJ


Re: env?

2019-11-03 Thread William Michels via perl6-users
I've seen this message as well. I believe it's the default message you
get when you start up the Perl6 (Raku) REPL, but don't have Readline
or Linenoise installed (or your machine needs help knowing where to
look).

Maybe try 'echo $PATH' at a terminal prompt, and see if your new
machine has the same directory listings as your old machine?

HTH, Bill.



On Sun, Nov 3, 2019 at 9:26 PM ToddAndMargo via perl6-users
 wrote:
>
> Hi All,
>
> Fedora 13 (Linux)
> rakudo-pkg-Fedora31-2019.07.1-03.x86_64.rpm
>
> At the top of all my Perl 6 programs, I place
> #!/usr/bin/env perl6
>
> So I decided to run env by itself and see what I got:
>
>   $ /usr/bin/env perl6
>   You may want to `zef install Readline` or `zef install
>   Linenoise` or use rlwrap for a line editor
>
>   To exit type 'exit' or '^D'
>
> Is this suppose to happen?
>
> Many thanks,
> -T
>
>
> --
> ~~
> When you say, "I wrote a program that
> crashed Windows," people just stare at
> you blankly and say, "Hey, I got those
> with the system, for free."
>   -- Linus Torvalds
> ~~


Re: FC31 can't find my module subs

2019-11-03 Thread ToddAndMargo via perl6-users

On 11/3/19 6:56 PM, ToddAndMargo via perl6-users wrote:

On 11/3/19 3:15 PM, ToddAndMargo via perl6-users wrote:

Hi All,

Help!

I just upgraded Fedora from 30 to 31.

I upgraded to rakudo-pkg-Fedora31-2019.07.1-03.x86_64.rpm
from https://github.com/nxadm/rakudo-pkg/releases

Now P6 can not find my subs inside my modules:

# perl6 -I/home/linuxutil/p6lib -MPrintColors -e 'PrintGreen( "Hi\n" );'
 ===SORRY!=== Error while compiling -e
 Undeclared name:
 PrintGreen used at line 1

[editorial comment] HHH! [/editorial comment]

The stock "rakudo" and "rakudo-zef" that resides in the
Fedora repo's has the same issue.

Many thanks,
-T



I am hamstrung on so may fronts if I don't get this working!

I gets uglier:

# cat p6lib/ModuleTest.pm6
sub ModuleTest() is export( :ModuleTest ) { say "Hi"; }
sub ModuleTst()  is export( :ModuleTst )  { say "Bye"; }


# perl6 -I./p6lib -e 'use ModuleTest :ModuleTest :ModuleTst; ModuleTest; 
ModuleTst;'


===SORRY!=== Error while compiling -e
Undeclared name:
     ModuleTst used at line 1


And way uglier.  I removed the ":"
# cat p6lib/ModuleTest.pm6

# sub ModuleTest() is export( :ModuleTest ) { say  "Hi"; }
# sub ModuleTst()  is export( :ModuleTst )  { say "Bye"; }
sub ModuleTest() is export( ModuleTest ) { say  "Hi"; }
sub ModuleTst()  is export( ModuleTst )  { say "Bye"; }


# perl6 -I/home/linuxutil/p6lib -e 'use ModuleTest;  ModuleTest; 
ModuleTst;'
===SORRY!=== Error while compiling /home/linuxutil/p6lib/ModuleTest.pm6 
(ModuleTest)

Undeclared name:
     ModuleTest used at line 4

And, And, depending on the position of the moon overhead,
sometimes it works.    AAAHHH!



I just reproduced this problem on a fresh Fedora 31
virtual machine that has never before been touched by
perl6 (rakudo)


env?

2019-11-03 Thread ToddAndMargo via perl6-users

Hi All,

Fedora 13 (Linux)
rakudo-pkg-Fedora31-2019.07.1-03.x86_64.rpm

At the top of all my Perl 6 programs, I place
#!/usr/bin/env perl6

So I decided to run env by itself and see what I got:

 $ /usr/bin/env perl6
 You may want to `zef install Readline` or `zef install
 Linenoise` or use rlwrap for a line editor

 To exit type 'exit' or '^D'

Is this suppose to happen?

Many thanks,
-T


--
~~
When you say, "I wrote a program that
crashed Windows," people just stare at
you blankly and say, "Hey, I got those
with the system, for free."
 -- Linus Torvalds
~~


Re: FC31 can't find my module subs

2019-11-03 Thread ToddAndMargo via perl6-users

On 11/3/19 3:15 PM, ToddAndMargo via perl6-users wrote:

Hi All,

Help!

I just upgraded Fedora from 30 to 31.

I upgraded to rakudo-pkg-Fedora31-2019.07.1-03.x86_64.rpm
from https://github.com/nxadm/rakudo-pkg/releases

Now P6 can not find my subs inside my modules:

# perl6 -I/home/linuxutil/p6lib -MPrintColors -e 'PrintGreen( "Hi\n" );'
     ===SORRY!=== Error while compiling -e
     Undeclared name:
     PrintGreen used at line 1

[editorial comment] HHH! [/editorial comment]

The stock "rakudo" and "rakudo-zef" that resides in the
Fedora repo's has the same issue.

Many thanks,
-T



I am hamstrung on so may fronts if I don't get this working!

I gets uglier:

# cat p6lib/ModuleTest.pm6
sub ModuleTest() is export( :ModuleTest ) { say "Hi"; }
sub ModuleTst()  is export( :ModuleTst )  { say "Bye"; }


# perl6 -I./p6lib -e 'use ModuleTest :ModuleTest :ModuleTst; 
ModuleTest; ModuleTst;'


===SORRY!=== Error while compiling -e
Undeclared name:
ModuleTst used at line 1


And way uglier.  I removed the ":"
# cat p6lib/ModuleTest.pm6

# sub ModuleTest() is export( :ModuleTest ) { say  "Hi"; }
# sub ModuleTst()  is export( :ModuleTst )  { say "Bye"; }
sub ModuleTest() is export( ModuleTest ) { say  "Hi"; }
sub ModuleTst()  is export( ModuleTst )  { say "Bye"; }


# perl6 -I/home/linuxutil/p6lib -e 'use ModuleTest;  ModuleTest; ModuleTst;'
===SORRY!=== Error while compiling /home/linuxutil/p6lib/ModuleTest.pm6 
(ModuleTest)

Undeclared name:
ModuleTest used at line 4

And, And, depending on the position of the moon overhead,
sometimes it works.AAAHHH!


Re: FC31 can't find my module subs

2019-11-03 Thread ToddAndMargo via perl6-users

On 11/3/19 3:56 PM, ToddAndMargo via perl6-users wrote:

ReadSecondaryClipboard ]


that was a typo.  original code has a ; at the end


Re: FC31 can't find my module subs

2019-11-03 Thread ToddAndMargo via perl6-users

On 11/3/19 3:15 PM, ToddAndMargo via perl6-users wrote:

Hi All,

Help!

I just upgraded Fedora from 30 to 31.

I upgraded to rakudo-pkg-Fedora31-2019.07.1-03.x86_64.rpm
from https://github.com/nxadm/rakudo-pkg/releases

Now P6 can not find my subs inside my modules:

# perl6 -I/home/linuxutil/p6lib -MPrintColors -e 'PrintGreen( "Hi\n" );'
     ===SORRY!=== Error while compiling -e
     Undeclared name:
     PrintGreen used at line 1

[editorial comment] HHH! [/editorial comment]

The stock "rakudo" and "rakudo-zef" that resides in the
Fedora repo's has the same issue.

Many thanks,
-T



Have you guys changed the way you import things?  Does this
no longer work?

use lib '/home/linuxutil/p6lib';
use RunNoShell;
use X11Clipboard; ReadSecondaryClipboard ]
use CheckSystemDependancy;


FC31 can't find my module subs

2019-11-03 Thread ToddAndMargo via perl6-users

Hi All,

Help!

I just upgraded Fedora from 30 to 31.

I upgraded to rakudo-pkg-Fedora31-2019.07.1-03.x86_64.rpm
from https://github.com/nxadm/rakudo-pkg/releases

Now P6 can not find my subs inside my modules:

# perl6 -I/home/linuxutil/p6lib -MPrintColors -e 'PrintGreen( "Hi\n" );'
===SORRY!=== Error while compiling -e
Undeclared name:
PrintGreen used at line 1

[editorial comment] HHH! [/editorial comment]

The stock "rakudo" and "rakudo-zef" that resides in the
Fedora repo's has the same issue.

Many thanks,
-T