author | wenzelm |
Wed, 07 Oct 2020 20:43:59 +0200 | |
changeset 72390 | ed95980cf198 |
parent 72371 | 3e84f4e9651a |
child 72483 | ca6a3ea1f7c4 |
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 |
|
64339 | 16 |
Isabelle/POSIX standards, although Poly/ML and the JVM are native on |
17 |
Windows. |
|
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 |
21 |
system functions. The Isabelle environment uses peculiar scripts for |
|
68002 | 22 |
GNU bash and perl as system glue: this style should be observed as far |
23 |
as possible. |
|
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 |
|
31 |
nor too new. Common OS families work: Linux, Windows, macOS, but |
|
32 |
exotic ones are unsupported: BSD, Solaris, NixOS. |
|
33 |
||
34 |
Official (full support): |
|
35610 | 35 |
|
69725 | 36 |
x86_64-linux Ubuntu 14.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) |
72366 | 40 |
macOS 10.15 Catalina (laramac01 Macmini8,1) |
41 |
||
42 |
x86_64-windows Windows 7 |
|
43 |
x86_64-cygwin Cygwin 3.1.x https://isabelle.sketis.net/cygwin_2021 (x86_64/release) |
|
44 |
||
45 |
Old (partial support): |
|
46 |
||
67088 | 47 |
x86_64-darwin Mac OS X 10.10 Yosemite (macbroy31 MacBookPro6,2) |
48 |
Mac OS X 10.11 El Capitan (macbroy2 MacPro4,1) |
|
65369
27c1b5e952bd
macbroy30 is on 10.12 Sierra (already since 04-Mar-2017) -- discontinued support for 10.8 Mountain Lion;
wenzelm
parents:
65073
diff
changeset
|
49 |
macOS 10.12 Sierra (macbroy30 MacBookPro6,2) |
48833 | 50 |
|
72366 | 51 |
New (experimental): |
72359 | 52 |
|
72371
3e84f4e9651a
clarified arm64-linux base line: prefer Pi OS, which is based on slightly older Debian;
wenzelm
parents:
72366
diff
changeset
|
53 |
arm64-linux Raspberry Pi OS 64bit beta (Debian 10 / Buster) |
36204 | 54 |
|
55 |
||
66911 | 56 |
64 bit vs. 32 bit platform personality |
57 |
-------------------------------------- |
|
36204 | 58 |
|
67235 | 59 |
Isabelle requires 64 bit hardware running a 64 bit operating |
60 |
system. Windows and Mac OS X allow x86 executables as well, but for |
|
61 |
Linux this requires separate installation of 32 bit shared |
|
68002 | 62 |
libraries. The POSIX emulation on Windows via Cygwin64 works |
63 |
exclusively for x86_64. |
|
66911 | 64 |
|
68002 | 65 |
Poly/ML supports both for x86_64 and x86, and the latter is preferred |
66 |
for space and performance reasons. Java is always the x86_64 version |
|
67 |
on all platforms. |
|
48833 | 68 |
|
49144 | 69 |
Add-on executables are expected to work without manual user |
66911 | 70 |
configuration. Each component settings script needs to determine the |
49144 | 71 |
platform details appropriately. |
48833 | 72 |
|
65073 | 73 |
|
68002 | 74 |
The Isabelle settings environment provides the following important |
75 |
variables to help configuring platform-dependent tools: |
|
48833 | 76 |
|
77 |
ISABELLE_PLATFORM64 (potentially empty) |
|
66691 | 78 |
ISABELLE_PLATFORM32 (potentially empty) |
36204 | 79 |
|
68002 | 80 |
Each can be empty, but not both at the same time. Using GNU bash |
81 |
notation, tools may express their platform preference, e.g. first 64 |
|
82 |
bit and second 32 bit, or the opposite: |
|
48833 | 83 |
|
84 |
"${ISABELLE_PLATFORM64:-$ISABELLE_PLATFORM32}" |
|
68002 | 85 |
"${ISABELLE_PLATFORM32:-$ISABELLE_PLATFORM64}" |
36204 | 86 |
|
65073 | 87 |
|
68002 | 88 |
There is a another set of settings for native Windows (instead of the |
65073 | 89 |
POSIX emulation of Cygwin used before): |
90 |
||
66732 | 91 |
ISABELLE_WINDOWS_PLATFORM64 |
65073 | 92 |
ISABELLE_WINDOWS_PLATFORM32 |
93 |
||
68002 | 94 |
These are always empty on Linux and Mac OS X, and non-empty on |
95 |
Windows. They can be used like this to prefer native Windows and then |
|
96 |
Unix (first 64 bit second 32 bit): |
|
65073 | 97 |
|
98 |
"${ISABELLE_WINDOWS_PLATFORM64:-${ISABELLE_WINDOWS_PLATFORM32:-${ISABELLE_PLATFORM64:-$ISABELLE_PLATFORM32}}}" |
|
99 |
||
100 |
||
35610 | 101 |
Dependable system tools |
102 |
----------------------- |
|
103 |
||
104 |
The following portable system tools can be taken for granted: |
|
105 |
||
68002 | 106 |
* Scala on top of Java. Isabelle/Scala irons out many oddities and |
64339 | 107 |
portability issues of the Java platform. |
108 |
||
68002 | 109 |
* GNU bash as uniform shell on all platforms. The POSIX "standard" |
110 |
shell /bin/sh does *not* work portably -- there are too many |
|
111 |
non-standard implementations of it. On Debian and Ubuntu /bin/sh is |
|
112 |
actually /bin/dash and introduces many oddities. |
|
35610 | 113 |
|
58780
1f8c0da85664
discontinued python from standard system environment;
wenzelm
parents:
55438
diff
changeset
|
114 |
* Perl as largely portable system programming language, with its |
1f8c0da85664
discontinued python from standard system environment;
wenzelm
parents:
55438
diff
changeset
|
115 |
fairly robust support for processes, signals, sockets etc. |
35610 | 116 |
|
117 |
||
118 |
Known problems |
|
119 |
-------------- |
|
120 |
||
55391
eae296b5ef33
Mac OS X Lion (macbroy6) is baseline for portable executables;
wenzelm
parents:
49144
diff
changeset
|
121 |
* Mac OS X: If MacPorts is installed there is some danger that |
41668 | 122 |
accidental references to its shared libraries are created |
123 |
(e.g. libgmp). Use otool -L to check if compiled binaries also work |
|
124 |
without MacPorts. |
|
125 |
||
55391
eae296b5ef33
Mac OS X Lion (macbroy6) is baseline for portable executables;
wenzelm
parents:
49144
diff
changeset
|
126 |
* Mac OS X: If MacPorts is installed and its version of Perl takes |
35610 | 127 |
precedence over /usr/bin/perl in the PATH, then the end-user needs |
36204 | 128 |
to take care of installing extra modules, e.g. for HTTP support. |
129 |
Such add-ons are usually included in Apple's /usr/bin/perl by |
|
130 |
default. |
|
35610 | 131 |
|
55438 | 132 |
* Common Unix tools like /bin/sh, /bin/kill, sed, ulimit are |
64339 | 133 |
notoriously non-portable an should be avoided. |
66911 | 134 |
|
135 |
* The traditional "uname" Unix tool only tells about its own executable |
|
136 |
format, not the underlying platform! |