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