yonaskolb / Mint

A package manager that installs and runs executable Swift packages
MIT License
2.27k stars 122 forks source link

Error with R.swift on Mac M1 #233

Open ibr-murad opened 2 years ago

ibr-murad commented 2 years ago

Hi all!

Environment: MacBook Pro 13 M1 2020, macOS 12.2.1, Xcode 13.2.1

I have a problem with build project when I added R.swift with Mint. Xcode get me this error.

Screenshot 2022-02-15 at 18 46 07

My steps:

I guess problem this path or shell, because when I run mint list in terminal I see Installed mint packages

Screenshot 2022-02-15 at 19 02 02

Thanks a lot for any help!

AkisArou commented 2 years ago

Same exact thing happens to me also. Any update on this?

AF-cgi commented 2 years ago

Hi guys, I think their is a mistake on the documentation from R.swift. I think the command mint run R.swift rswift generate "$SRCROOT/R.generated.swift" should be replaced with mint run R.swift generate "$SRCROOT/R.generated.swift". I have installed R.swift on my machine via Mint. As I run mint run R.swift --help I figured out that their is no command rswift. Maybe that's the issue.

abin0992 commented 2 years ago

We are facing same error. Any solutions / updates?

AF-cgi commented 2 years ago

@abin0992

We are facing same error. Any solutions / updates?

What do you get if you run mint run R.swift --help?

abin0992 commented 2 years ago

We fixed this by adding the following before R.swift run phase script

if [ `uname -m` == 'arm64' ] && [ -d /opt/homebrew/bin/ ]; then
  export PATH=/opt/homebrew/bin:$PATH
fi
Screenshot 2022-09-01 at 14 29 53
ykws commented 1 year ago

Duplicated #201