Macaulay2 / M2

The primary source code repository for Macaulay2, a system for computing in commutative algebra, algebraic geometry and related fields.
https://macaulay2.com
347 stars 231 forks source link

building M2 on Apple silicon MacOS Sonoma #3421

Open mikestillman opened 2 months ago

mikestillman commented 2 months ago

This issue will contain my experiments for compiling M2 on Apple silicon, on MacOS Sonoma, and with different compilers, cmake/autotools, etc. I have found a number of issues, and now I want to be systematic about this.

My use of this as an issue is experimental (for me!)

Here is the first list to try

mikestillman commented 2 months ago

@d-torrance @mahrud When compiling on appleclang, on MacOS Sonoma (maybe others too), I get the following problem during ctest. This same problem happens with every test in the normal directory.

Try

ctest -R normal/000-core.m2 -V

Running this gives on my apple M1 mac:

4155: Test command: /Users/mike/src/M2-current-branches/M2-development/M2/BUILD/mike/builds.tmp/cmake-appleclang/usr-dist/arm64-Darwin-macOS-14.6.1/bin/M2 "-q" "--stop" "--silent" "--no-debug" "--no-randomize" "-e" "errorDepth=1" "-e" "debugLevel=0" "-e" "gbTrace=" "-e" "path=join(path,{"/Users/mike/src/M2-current-branches/M2-development/M2/Macaulay2/tests/","/Users/mike/src/M2-current-branches/M2-development/M2/packages/"})" "-e" "input("/Users/mike/src/M2-current-branches/M2-development/M2/Macaulay2/tests/normal/000-core.m2")" "-e" "exit 0"
4155: Working Directory: /Users/mike/src/M2-current-branches/M2-development/M2/Macaulay2/tests/normal
4155: Environment variables: 
4155:  GC_MAXIMUM_HEAP_SIZE=400M
4155: Test timeout computed to be: 900
4155: currentString:2:0:(3):[2]: error: syntax error at '-*end of file*-'
4155: ../../m2/startup.m2.in:619:14:(0): --backtrace: parse error--
1/1 Test #4155: normal/000-core.m2 ...............***Failed    0.34 sec

0% tests passed, 1 tests failed out of 1

On a branch that I have where development was last merged into it a month or two ago (I think July, but I can check), the ctest's work fine.

Perhaps some recent change to startup.m2.in is involved?

mahrud commented 2 months ago

Seems like a file system problem almost. Have you tried this on the main branch?

mahrud commented 2 months ago
  • Question: How do I tell what the default target for ninja is?

Run ninja -t browse. It'll list the targets that ninja all will run, and you can click through to see the subtargets.