5

I am running Mac OS Ventura (13.0) on M1 Pro chipset.

I am successfully compiling GMP version 6.2.1, but most of unit tests are failing.

Either with

Segmentation fault: 11

or with

Abort trap: 6

Version:           GNU MP 6.2.1
Host type:         aarch64-apple-darwin22.1.0
ABI:               64
Install prefix:    /usr/local
Compiler:          gcc
Static libraries:  yes
Shared libraries:  yes

============================================================================
Testsuite summary for GNU MP 6.2.1
============================================================================
# TOTAL: 50
# PASS:  14
# SKIP:  0
# XFAIL: 0
# FAIL:  36
# XPASS: 0
# ERROR: 0
============

Example:

../../test-driver: line 107: 36102 Segmentation fault: 11  "$@" > $log_file 2>&1
FAIL: t-toom22
../../test-driver: line 107: 36121 Abort trap: 6           "$@" > $log_file 2>&1
odysseasg
  • 121
  • 1
  • 8

1 Answers1

1

It seems that the build and tests are broken on macOS Ventura only. Luckily, according to my tests there is no need to go to the "unstable master branch" or snapshots but you can apply a specific patch (from gmplib!) to the official GMP 6.2.1 source tree.

https://gmplib.org/repo/gmp/raw-rev/5f32dbc41afc

The same patch is also used by Homebrew to build gmp on macOS Ventura. See in https://github.com/Homebrew/homebrew-core/blob/HEAD/Formula/gmp.rb

pd95
  • 1,999
  • 1
  • 20
  • 33