Skip to content

Commit

Permalink
Merge pull request #359 from lamech/master
Browse files Browse the repository at this point in the history
Provide simple MacOS build instructions.
  • Loading branch information
thomas-maeder authored Jul 29, 2023
2 parents 0abdeef + a0c89ee commit 11c4012
Show file tree
Hide file tree
Showing 3 changed files with 52 additions and 130 deletions.
52 changes: 52 additions & 0 deletions readme-macos.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
To install on MacOS (tested on an M2 Macbook Pro in 2023 under MacOS Monerey):

1. Popeye's build system requires an up-to-date `clang`, `ld` etc. which are not provided by Apple by default.

```
$ brew install llvm
```

2. Either copy the following lines into your .zshrc to point at the newly installed tools, or execute the following commands in a shell where you will be building Popeye:

```
export PATH="/opt/homebrew/opt/llvm/bin:$PATH"
export LDFLAGS="-L/opt/homebrew/opt/llvm/lib"
export CPPFLAGS="-I/opt/homebrew/opt/llvm/include"
```

3. At the top level of the Popeye source code distribution, edit `makefile.defaults`. Find the line that says `TOOLCHAIN` and ensure it is pointing at `clang`:

```
TOOLCHAIN=clang
```

4. Now simply run `make -f makefile.unx`, which, after compiling and linking 500-odd source files, should result in a working Popeye binary called `py` in the current directory.

5. (Optional: basic testing) Launch `py` with no arguments. It should display the following header (or some variation, depending on your MacOS version):

`Popeye Darwin-21.6.0-arm-64Bit v4.87 (1024 MB)`

Now paste the following into the terminal:

```
BeginProblem
Stipulation #2
Option Variation NoBoard
Pieces
White Rb8 Kb3
Black Kb1
EndProblem
```

Popeye should respond by solving the problem, then exiting with no errors:

```
1.Rb8-c8 ! zugzwang.
1...Kb1-a1
2.Rc8-c1 #


solution finished. Time = 0.018 s
```

6. (Optional: comprehensive testing) Run any of the self-test scripts (`solveExamples.sh` is quite comprehensive, for instance) to confirm all functionality works.
124 changes: 0 additions & 124 deletions toolchains/i686-apple-darwin9/make.incl

This file was deleted.

6 changes: 0 additions & 6 deletions toolchains/i686-apple-darwin9/makefile.local

This file was deleted.

0 comments on commit 11c4012

Please sign in to comment.