Skip to content

Crafty won't build on non-Intel macOS #14

Open

Description

@bkline

Issue

Even after editing the Makefile as instructed to remove -mpopcnt the build chokes on any macOS computer currently sold by Apple.

./lock.h:57:8: error: invalid output constraint '=&q' in
      asm
   57 |       :"=&q"(dummy)
      |        ^
./lock.h:69:8: error: invalid input constraint 'q' in asm
   69 |       :"q"(lock)
      |        ^
In file included from crafty.c:27:
./utility.c:2074:38: warning: 'sscanf' may overflow;
      destination buffer in argument 3 has size 64, but the corresponding
      specifier may require size 65 [-Wfortify-source]
 2074 |               sscanf(buffer, "%64s", analysis_move);
      |                                      ^
1 warning and 2 errors generated.

Environment

  • Computer: MacBook Pro 14-inch, 2021
  • Chip: Apple M1 Pro
  • Memory: 32 GB
  • macOS: Tahoe 26.6.2
  • clang: 21.0.0
  • Target: arm64-apple-darwin25.6.0
  • Thread model: posix

Solution

I've solved the problem for myself by creating my own branch. If I provide a pull request which modifies lock.h and Makefile so that Apple silicon builds are supported, would you be interested? Would you want that warning addressed as well, or would you prefer to deal with that problem separately?

Activity

  1. MichaelB7 commented on Aug 28, 2026

    @MichaelB7
    Owner
  2. bkline commented on Aug 28, 2026

    @bkline
    Author

    Enjoy your retirement, Michael. I just retired at 78 (though only reluctantly, when the current administration shut down the programs I was supporting at the National Cancer Institute). I'm mostly bicycling, reading with my wife, helping her with her master gardener activities, contributing to open source software projects, and playing chess with my son and my granddaughter.

    Cheers,
    Bob

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions