author | wenzelm |
Fri, 16 Sep 2022 16:34:45 +0200 | |
changeset 76176 | d6bd84eb94a3 |
parent 76028 | 105867f98630 |
child 76375 | 089e546f671f |
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 |
|
73598 | 36 |
x86_64-linux Ubuntu 16.04 LTS |
35610 | 37 |
|
72366 | 38 |
x86_64-darwin macOS 10.13 High Sierra (lapbroy68 MacBookPro11,2) |
72390 | 39 |
macOS 10.14 Mojave (mini2 Macmini8,1) |
76027 | 40 |
macOS 10.15 Catalina (???) |
74063
ff466b272267
clarified version: Apple now counts like 11, 12, ...;
wenzelm
parents:
73646
diff
changeset
|
41 |
macOS 11 Big Sur (mini1 Macmini8,1) |
76027 | 42 |
macOS 12 Monterey (laramac01 Macmini8,1) |
75634 | 43 |
macOS 13 Ventura (???) |
72366 | 44 |
|
74063
ff466b272267
clarified version: Apple now counts like 11, 12, ...;
wenzelm
parents:
73646
diff
changeset
|
45 |
arm64-darwin macOS 11 Big Sur |
73646 | 46 |
|
72526 | 47 |
x86_64-windows Windows 10 |
76028 | 48 |
x86_64-cygwin Cygwin 3.3.x https://isabelle.sketis.net/cygwin_2022 (x86_64/release) |
72366 | 49 |
|
73646 | 50 |
Experimental platforms: |
72359 | 51 |
|
72371
3e84f4e9651a
clarified arm64-linux base line: prefer Pi OS, which is based on slightly older Debian;
wenzelm
parents:
72366
diff
changeset
|
52 |
arm64-linux Raspberry Pi OS 64bit beta (Debian 10 / Buster) |
36204 | 53 |
|
54 |
||
66911 | 55 |
64 bit vs. 32 bit platform personality |
56 |
-------------------------------------- |
|
36204 | 57 |
|
67235 | 58 |
Isabelle requires 64 bit hardware running a 64 bit operating |
72895 | 59 |
system. Only Windows still supports native x86 executables, but the |
60 |
POSIX emulation on Windows via Cygwin64 works exclusively for x86_64. |
|
65073 | 61 |
|
72895 | 62 |
The Isabelle settings environment provides variable |
63 |
ISABELLE_PLATFORM64 to refer to the standard platform personality. On |
|
64 |
Windows this is for Cygwin64, but the following native platform |
|
65 |
identifiers are available as well: |
|
65073 | 66 |
|
66732 | 67 |
ISABELLE_WINDOWS_PLATFORM64 |
65073 | 68 |
ISABELLE_WINDOWS_PLATFORM32 |
69 |
||
72894
bd2269b6cd99
updated "macOS" terminology: current Big Sur is already version 11;
wenzelm
parents:
72526
diff
changeset
|
70 |
These are always empty on Linux and macOS, and non-empty on |
72895 | 71 |
Windows. For example, this is how to refer to native Windows and |
72 |
fall-back on Unix (always 64 bit): |
|
73 |
||
74 |
"${ISABELLE_WINDOWS_PLATFORM64:-$ISABELLE_PLATFORM64}" |
|
65073 | 75 |
|
72895 | 76 |
And this is for old 32 bit executables on Windows, but still 64 bit on |
77 |
Unix: |
|
78 |
||
79 |
"${ISABELLE_WINDOWS_PLATFORM32:-$ISABELLE_PLATFORM64}" |
|
65073 | 80 |
|
73646 | 81 |
For Apple Silicon the native platform is "$ISABELLE_APPLE_PLATFORM64" |
82 |
(arm64-darwin), but thanks to Rosetta 2 "$ISABELLE_PLATFORM64" |
|
83 |
(x64_64-darwin) works routinely with fairly good performance. |
|
84 |
||
65073 | 85 |
|
35610 | 86 |
Dependable system tools |
87 |
----------------------- |
|
88 |
||
89 |
The following portable system tools can be taken for granted: |
|
90 |
||
73646 | 91 |
* Scala on top of Java. Isabelle/Scala irons out many fine points of |
92 |
the Java platform to make it fully portable as described above. |
|
64339 | 93 |
|
68002 | 94 |
* GNU bash as uniform shell on all platforms. The POSIX "standard" |
95 |
shell /bin/sh does *not* work portably -- there are too many |
|
96 |
non-standard implementations of it. On Debian and Ubuntu /bin/sh is |
|
97 |
actually /bin/dash and introduces many oddities. |
|
35610 | 98 |
|
99 |
||
100 |
Known problems |
|
101 |
-------------- |
|
102 |
||
73646 | 103 |
* macOS: If Homebrew or MacPorts is installed, there is some danger |
104 |
that accidental references to its shared libraries are created |
|
41668 | 105 |
(e.g. libgmp). Use otool -L to check if compiled binaries also work |
106 |
without MacPorts. |
|
107 |
||
55438 | 108 |
* Common Unix tools like /bin/sh, /bin/kill, sed, ulimit are |
64339 | 109 |
notoriously non-portable an should be avoided. |
66911 | 110 |
|
73646 | 111 |
* The traditional "uname" Unix tool only tells about its own |
112 |
executable format, not the underlying platform! |