| author | desharna | 
| Thu, 29 Feb 2024 11:18:26 +0100 | |
| changeset 79806 | ba8fb71587ae | 
| parent 79782 | 8bde94328b05 | 
| permissions | -rw-r--r-- | 
| 64339 | 1  | 
Multi-platform support of Isabelle  | 
2  | 
==================================  | 
|
| 35610 | 3  | 
|
4  | 
Preamble  | 
|
5  | 
--------  | 
|
6  | 
||
7  | 
The general programming model is that of a stylized ML + Scala + POSIX  | 
|
| 68002 | 8  | 
environment, with a minimum of system-specific code in user-space  | 
9  | 
tools.  | 
|
| 35610 | 10  | 
|
| 67235 | 11  | 
The Isabelle system infrastructure provides some facilities to make  | 
12  | 
this work, e.g. see the ML and Scala modules File and Path, or  | 
|
| 48833 | 13  | 
functions like Isabelle_System.bash. The settings environment also  | 
| 61294 | 14  | 
provides some means for portability, e.g. the bash function  | 
15  | 
"platform_path" to keep the impression that Windows/Cygwin adheres to  | 
|
| 73646 | 16  | 
Isabelle/POSIX standards, although many executables are native on  | 
17  | 
Windows (notably Poly/ML and Java).  | 
|
| 35610 | 18  | 
|
19  | 
When producing add-on tools, it is important to stay within this clean  | 
|
| 67235 | 20  | 
room of Isabelle, and refrain from non-portable access to operating  | 
| 73646 | 21  | 
system functions. The Isabelle environment uses GNU bash and  | 
22  | 
Isabelle/Scala as portable system infrastructure, using somewhat  | 
|
23  | 
peculiar implementation techniques.  | 
|
| 35610 | 24  | 
|
25  | 
||
26  | 
Supported platforms  | 
|
27  | 
-------------------  | 
|
28  | 
||
| 72366 | 29  | 
A broad range of hardware and operating system platforms are supported  | 
30  | 
by building executables on base-line versions that are neither too old  | 
|
| 73646 | 31  | 
nor too new. Common OS families should work: Linux, macOS,  | 
32  | 
Windows. More exotic platforms are unsupported: NixOS, BSD, Solaris.  | 
|
| 72366 | 33  | 
|
| 73646 | 34  | 
Official platforms:  | 
| 35610 | 35  | 
|
| 78773 | 36  | 
x86_64-linux Ubuntu 18.04 LTS  | 
| 
79756
 
444e409e6c6f
official support for arm64-linux, despite a few missing tools;
 
wenzelm 
parents: 
79591 
diff
changeset
 | 
37  | 
arm64-linux Ubuntu 18.04 LTS (e.g. via "docker run -it ubuntu:18.04 bash")  | 
| 35610 | 38  | 
|
| 
78777
 
3b424f9cd5eb
update platforms: discontinue macOS 10.13 High Sierra, macOS 10.14 Mojave, macOS 10.15 Catalina;
 
wenzelm 
parents: 
78773 
diff
changeset
 | 
39  | 
x86_64-darwin macOS 11 Big Sur (mini1 Macmini8,1)  | 
| 
 
3b424f9cd5eb
update platforms: discontinue macOS 10.13 High Sierra, macOS 10.14 Mojave, macOS 10.15 Catalina;
 
wenzelm 
parents: 
78773 
diff
changeset
 | 
40  | 
macOS 12 Monterey (???)  | 
| 78484 | 41  | 
macOS 13 Ventura (mini3 Mac14,12 -- MacMini M2 Pro, 6+4 cores)  | 
| 
78771
 
d7f4c5c7bebb
more platform tests: initial support for macOS 14 Sonoma;
 
wenzelm 
parents: 
78743 
diff
changeset
 | 
42  | 
macOS 14 Sonoma (mini2 Macmini8,1)  | 
| 72366 | 43  | 
|
| 78484 | 44  | 
arm64-darwin macOS 11 Big Sur (assur Macmini9,1 -- MacMini M1, 4+4 cores)  | 
| 
76375
 
089e546f671f
more macOS platforms, without reference hardware;
 
wenzelm 
parents: 
76028 
diff
changeset
 | 
45  | 
macOS 12 Monterey (???)  | 
| 78484 | 46  | 
macOS 13 Ventura (mini3 Mac14,12 -- MacMini M2 Pro, 6+4 cores)  | 
| 
78771
 
d7f4c5c7bebb
more platform tests: initial support for macOS 14 Sonoma;
 
wenzelm 
parents: 
78743 
diff
changeset
 | 
47  | 
macOS 14 Sonoma (studio1 Mac13,2 M1 Ultra, 16+4 cores)  | 
| 73646 | 48  | 
|
| 72526 | 49  | 
x86_64-windows Windows 10  | 
| 
79782
 
8bde94328b05
update cygwin near 3.5.1-1, also see https://cygwin.com/pipermail/cygwin-announce/2024-February/011524.html and https://cygwin.com/pipermail/cygwin-announce/2024-February/011611.html
 
wenzelm 
parents: 
79756 
diff
changeset
 | 
50  | 
x86_64-cygwin Cygwin 3.5.x https://isabelle.sketis.net/cygwin_2024 (x86_64/release)  | 
| 72366 | 51  | 
|
| 36204 | 52  | 
|
| 66911 | 53  | 
64 bit vs. 32 bit platform personality  | 
54  | 
--------------------------------------  | 
|
| 36204 | 55  | 
|
| 67235 | 56  | 
Isabelle requires 64 bit hardware running a 64 bit operating  | 
| 72895 | 57  | 
system. Only Windows still supports native x86 executables, but the  | 
58  | 
POSIX emulation on Windows via Cygwin64 works exclusively for x86_64.  | 
|
| 65073 | 59  | 
|
| 72895 | 60  | 
The Isabelle settings environment provides variable  | 
61  | 
ISABELLE_PLATFORM64 to refer to the standard platform personality. On  | 
|
62  | 
Windows this is for Cygwin64, but the following native platform  | 
|
63  | 
identifiers are available as well:  | 
|
| 65073 | 64  | 
|
| 66732 | 65  | 
ISABELLE_WINDOWS_PLATFORM64  | 
| 65073 | 66  | 
ISABELLE_WINDOWS_PLATFORM32  | 
67  | 
||
| 
72894
 
bd2269b6cd99
updated "macOS" terminology: current Big Sur is already version 11;
 
wenzelm 
parents: 
72526 
diff
changeset
 | 
68  | 
These are always empty on Linux and macOS, and non-empty on  | 
| 72895 | 69  | 
Windows. For example, this is how to refer to native Windows and  | 
70  | 
fall-back on Unix (always 64 bit):  | 
|
71  | 
||
72  | 
  "${ISABELLE_WINDOWS_PLATFORM64:-$ISABELLE_PLATFORM64}"
 | 
|
| 65073 | 73  | 
|
| 72895 | 74  | 
And this is for old 32 bit executables on Windows, but still 64 bit on  | 
75  | 
Unix:  | 
|
76  | 
||
77  | 
  "${ISABELLE_WINDOWS_PLATFORM32:-$ISABELLE_PLATFORM64}"
 | 
|
| 65073 | 78  | 
|
| 73646 | 79  | 
For Apple Silicon the native platform is "$ISABELLE_APPLE_PLATFORM64"  | 
80  | 
(arm64-darwin), but thanks to Rosetta 2 "$ISABELLE_PLATFORM64"  | 
|
81  | 
(x64_64-darwin) works routinely with fairly good performance.  | 
|
82  | 
||
| 65073 | 83  | 
|
| 35610 | 84  | 
Dependable system tools  | 
85  | 
-----------------------  | 
|
86  | 
||
87  | 
The following portable system tools can be taken for granted:  | 
|
88  | 
||
| 73646 | 89  | 
* Scala on top of Java. Isabelle/Scala irons out many fine points of  | 
90  | 
the Java platform to make it fully portable as described above.  | 
|
| 64339 | 91  | 
|
| 68002 | 92  | 
* GNU bash as uniform shell on all platforms. The POSIX "standard"  | 
93  | 
shell /bin/sh does *not* work portably -- there are too many  | 
|
94  | 
non-standard implementations of it. On Debian and Ubuntu /bin/sh is  | 
|
95  | 
actually /bin/dash and introduces many oddities.  | 
|
| 35610 | 96  | 
|
97  | 
||
98  | 
Known problems  | 
|
99  | 
--------------  | 
|
100  | 
||
| 73646 | 101  | 
* macOS: If Homebrew or MacPorts is installed, there is some danger  | 
102  | 
that accidental references to its shared libraries are created  | 
|
| 41668 | 103  | 
(e.g. libgmp). Use otool -L to check if compiled binaries also work  | 
104  | 
without MacPorts.  | 
|
105  | 
||
| 55438 | 106  | 
* Common Unix tools like /bin/sh, /bin/kill, sed, ulimit are  | 
| 64339 | 107  | 
notoriously non-portable an should be avoided.  | 
| 66911 | 108  | 
|
| 73646 | 109  | 
* The traditional "uname" Unix tool only tells about its own  | 
110  | 
executable format, not the underlying platform!  |