MacOS, compile for older Macs (crash)
Jan Wielemaker
J.Wielemaker at uva.nl
Fri Apr 26 09:25:01 UTC 2019
Hi,
I'm trying to build an application (SWI-Prolog) on MacOS using brand new
Mac running 10.14. The app should be running on 10.12 and later (Qt
5.12 is part of this and requires 10.12). So, I tried:
CFLAGS="-mmacosx-version-min=10.12 -O2" ./configure --prefix=$PREFIX \
--enable-shared --disable-static
This produces a fine library that passes all GMP and SWI-Prolog tests
on the build machine. However, one user reports that it crashes on
a 2009 MacPro running 10.13.6 while it runs on a more recent MacBook
running the same OS. The crash is
?- X is 1*(1 rdiv 2).
SWI-Prolog [thread 1 (main) at Thu Apr 25 17:29:30 2019]: received fatal
signal 4 (ill)
C-stack trace labeled "crash":
[0]
/Applications/SWI-Prolog-3.app/Contents/Frameworks/libswipl.8.1.5.dylib(save_backtrace+0xee)
[0x107c9094e]
[1]
/Applications/SWI-Prolog-3.app/Contents/Frameworks/libswipl.8.1.5.dylib(sigCrashHandler+0xb2)
[0x107c90f72]
[2]
/Applications/SWI-Prolog-3.app/Contents/Frameworks/libswipl.8.1.5.dylib(dispatch_signal+0x233)
[0x107c1d1c3]
[3] /usr/lib/system/libsystem_platform.dylib(_sigtramp+0x1a)
[0x7fff64fe6f5a]
[5]
/Applications/SWI-Prolog-3.app/Contents/Frameworks/libgmp.10.dylib(__gmpq_mul+0x1a9)
[0x107d16239]
[6]
/Applications/SWI-Prolog-3.app/Contents/Frameworks/libswipl.8.1.5.dylib(ar_mul+0xb0)
[0x107bba7c0]
According to otool -l, the 10.12 requirement is in libgmp.10.dylib.
Does anyone has a clue? Could it be that I also need a more
conservative CPU selection? Suggestions?
Notes: compiled with most recent Xcode, where gcc is in fact clang.
Report at
https://github.com/SWI-Prolog/issues/issues/83#issuecomment-486848264
Thanks --- Jan
More information about the gmp-discuss
mailing list