Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

share/perl6/vendor/short creation as root - when installed via brew #192

Closed
rcmlz opened this issue Sep 5, 2023 · 6 comments
Closed

share/perl6/vendor/short creation as root - when installed via brew #192

rcmlz opened this issue Sep 5, 2023 · 6 comments

Comments

@rcmlz
Copy link

rcmlz commented Sep 5, 2023

Bug Description

  • installing rakudo-star on Mac Montery via brew.sh (brew install rakudo-star) as admin user 'privuser'
  • run a raku script as unprevilegded user
  • get error: failed to create directory '/usr/local/Cellar/rakudo-star/2023.08/share/perl6/vendor/short' with mode '0o777': Failed to mkdir: Permission denied

Reproduction path

git clone https://github.com/rcmlz/perlweeklychallenge-club
cd perlweeklychallenge-club
git checkout origin/raku-benchmark-scaleability
raku test/benchmark-scalabiity.raku DEMO

However, running as privileged user (sudoers) works

sudo raku test/benchmark-scalabiity.raku DEMO

and inspection of the folders show

ls -aslh /usr/local/Cellar/rakudo-star/2023.08/share/perl6/vendor/ 
total 8
0 drwxr-xr-x  4 privuser admin   128B  5 Sep 11:21 .
0 drwxr-xr-x  7 privuser admin   224B 22 Aug 01:57 ..
0 drwxr-xr-x  2 root    admin    64B  5 Sep 11:21 short
8 -rw-r--r--  1 privuser  admin     1B 22 Aug 01:57 version

that running as sudo user created a folder 'short'.

Conclusion

Apparently the folder /usr/local/Cellar/rakudo-star/2023.08/share/perl6/vendor/short is not created during setup but only on first run - which requires sudo rights. I assume this is not intended behaviour.

@AntonOks
Copy link
Collaborator

AntonOks commented Sep 5, 2023

Thanks for your bug report.

I will not be able to help any soon. I have now Mac available... and also in the next couple of days, I've only a ARM based Windows10 box, so a "win32" emulation... and there is no (recent) win32 Raku version, and so also no win32 Star....

Anyhow, as Star nowadays is just "the similar Rakudo version + some additional modules", the problem must be somewhere else.

From a quick search, I found:#

From what I would have understood from those discussions:

  • Remove your local Star (Rakudo?) installation.
  • Make sure also the related dir's in your HOME and wherever you modules are stored (RAKULIB?) are also deleted.
  • Re-install RAKUDO (if there is a "brew rakudo" package?! ) or Star...

@AntonOks
Copy link
Collaborator

AntonOks commented Sep 9, 2023

@rcmlz - Hi. Any opinion on the feedback above? Any chance to install Star new / from zero?

@rcmlz
Copy link
Author

rcmlz commented Sep 10, 2023

Hello @AntonOks

I encountered this error on a fresh Radudo-Star installation on a freshly installed Mac.

For me it was not a problem to run Raku once with sudo/root to fix this.

However, I thought that error might be an issue in general. Perhaps I am wrong. Just wanted to let you know about that error.

@AntonOks
Copy link
Collaborator

AntonOks commented Sep 11, 2023

Hmm, strange.
To rule out Star, any change to remove your Star installation completely and install the same "bare bone" Rakudo installation?

Else, lacking of any better idea right now, I may have to "missuse" the GitHub osx runners for that kind of test :|

@rcmlz
Copy link
Author

rcmlz commented Sep 13, 2023

I get the same error when running on github runners, so nothing to do with Star ... sorry for the confusion

https://github.com/rcmlz/perlweeklychallenge-club/blob/raku-benchmark-scaleability/.github/workflows/manual_raku_benchmark.yml

Failed to create directory '/usr/lib/perl6/site/short' with mode '0o777': Failed to mkdir: Permission denied
in any statement_control at /usr/lib/perl6/lib/Perl6/Grammar.moarvm line 1

@AntonOks
Copy link
Collaborator

AntonOks commented Oct 5, 2023

as it's not a Star issue AND there is an open issue in Rakudo, I'm hereby closing this one

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants