Skip to content
Snippets Groups Projects

Avoid different commands for intel and silicon on the Mac installation page,...

Closed Alex McLean requested to merge yaxu/ghcup-hs:yaxu-master-patch-89894 into master

Avoid different commands for intel and silicon on the Mac installation page, as the silicon instructions work for both.

As @maerwald says here, this could be better done in the script itself, but it needs a mac person to test it.

Merge request reports

Loading
Loading

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
  • Doesn't this require rosetta to be installed? I don't really think this is a good idea.

  • Sorry I don't know what rosetta is. :/

    Just keen to remove a new level of complexity on top of what is already a highly complex and error-prone installation process for getting access to a Haskell library and interpreter.

  • I found this man page last edited 2006: https://opensource.apple.com/source/system_cmds/system_cmds-550.10/arch.tproj/arch.1.auto.html

    "The other use of the arch command it to run a selected architecture of a universal binary. A universal binary contains code that can run on different architectures. By default, the operating system will select the architecture that most closely matches the processor type.

    So as far as I can tell, this use of arch to select an architecture has been around for a long time, and doesn't need rosetta installed.

  • Any possibility of merging this @maerwald ?

  • I'm generally not in favor of this. The idea is to add native Apple Silicon support soon anyway, so specifying the arch is a workaround, not the status quo.

  • I don't really understand this argument. The page already specifies the arch. This PR simplifies things for users who might not know what Apple Silicon is.

  • People have copy pasted the instructions from the ghcup website to tutorials etc. I can't update all those. They will need to be updated if Apple Silicon has native support. The way it's currently now makes chances less that there are incorrect instructions in the wild, since the Apple Silicon workaround instructions are fairly recent and are supposed to be removed soon.

  • 16:33 <Guest_55> I'm trying to install the Haskell platform with cup but when I run the command in terminal it tells me bad CPU type in executable.
    16:34 <merijn> No clue what cup is, but that error suggests you are installing x86 executables on the new M1 ARM macOS?
    16:36 <Guest_55> I meant ghcup, but yes I'm using the new M1 ARM macOS
    16:38 <maerwald> Guest_55: curl --proto '=https' --tlsv1.2 -sSf https://get-ghcup.haskell.org | arch -x86_64 /bin/bash
    16:41 <Guest_55> arch: posix_spawnp: /bin/bash: Bad CPU type in executable
    16:41 <Guest_55> (23) Failed writing body
    16:41 <Guest_55> this is what it tells me now
    16:47 <maerwald> Guest_55: softwareupdate --install-rosetta
    16:52 <Guest_55> thank you

    So... I think we need to update the apple silicon instructions to include softwareupdate --install-rosetta. That's one more reason to keep it separate for now.

  • @maerwald Ah thanks a lot for the info, yes agreed separate install instructions are probably needed then.

    I did find a script which installs it where needed: https://derflounder.wordpress.com/2020/11/17/installing-rosetta-2-on-apple-silicon-macs/

    Automatically accepting a license on the users behalf seems dubious though..

    Probably best to wait for the native build as you say.

  • obsolete now

  • closed

Please register or sign in to reply
Loading