Admin/PLATFORMS
author wenzelm
Tue, 24 Oct 2017 10:59:15 +0200
changeset 66911 d122c24a93d6
parent 66908 9b074f01a305
child 67088 89e82aed7813
permissions -rw-r--r--
misc tuning and modernization;
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
64339
321065f9f55b misc tuning and updates;
wenzelm
parents: 64337
diff changeset
     1
Multi-platform support of Isabelle
321065f9f55b misc tuning and updates;
wenzelm
parents: 64337
diff changeset
     2
==================================
35610
a5b7a0903441 Some notes on platform support of Isabelle.
wenzelm
parents:
diff changeset
     3
a5b7a0903441 Some notes on platform support of Isabelle.
wenzelm
parents:
diff changeset
     4
Preamble
a5b7a0903441 Some notes on platform support of Isabelle.
wenzelm
parents:
diff changeset
     5
--------
a5b7a0903441 Some notes on platform support of Isabelle.
wenzelm
parents:
diff changeset
     6
a5b7a0903441 Some notes on platform support of Isabelle.
wenzelm
parents:
diff changeset
     7
The general programming model is that of a stylized ML + Scala + POSIX
48833
10584ca5785f updates on 32 bit vs. 64 bit platforms;
wenzelm
parents: 46006
diff changeset
     8
environment, with as little system-specific code in user-space tools
10584ca5785f updates on 32 bit vs. 64 bit platforms;
wenzelm
parents: 46006
diff changeset
     9
as possible.
35610
a5b7a0903441 Some notes on platform support of Isabelle.
wenzelm
parents:
diff changeset
    10
a5b7a0903441 Some notes on platform support of Isabelle.
wenzelm
parents:
diff changeset
    11
The basic Isabelle system infrastructure provides some facilities to
48833
10584ca5785f updates on 32 bit vs. 64 bit platforms;
wenzelm
parents: 46006
diff changeset
    12
make this work, e.g. see the ML and Scala modules File and Path, or
10584ca5785f updates on 32 bit vs. 64 bit platforms;
wenzelm
parents: 46006
diff changeset
    13
functions like Isabelle_System.bash.  The settings environment also
61294
2d3d26e9b191 renamed jvmpath to platform_path;
wenzelm
parents: 59114
diff changeset
    14
provides some means for portability, e.g. the bash function
2d3d26e9b191 renamed jvmpath to platform_path;
wenzelm
parents: 59114
diff changeset
    15
"platform_path" to keep the impression that Windows/Cygwin adheres to
64339
321065f9f55b misc tuning and updates;
wenzelm
parents: 64337
diff changeset
    16
Isabelle/POSIX standards, although Poly/ML and the JVM are native on
321065f9f55b misc tuning and updates;
wenzelm
parents: 64337
diff changeset
    17
Windows.
35610
a5b7a0903441 Some notes on platform support of Isabelle.
wenzelm
parents:
diff changeset
    18
a5b7a0903441 Some notes on platform support of Isabelle.
wenzelm
parents:
diff changeset
    19
When producing add-on tools, it is important to stay within this clean
66911
d122c24a93d6 misc tuning and modernization;
wenzelm
parents: 66908
diff changeset
    20
room of Isabelle, and refrain from low-level access to the operating
d122c24a93d6 misc tuning and modernization;
wenzelm
parents: 66908
diff changeset
    21
system. The Isabelle environment uses peculiar scripts for GNU bash and
d122c24a93d6 misc tuning and modernization;
wenzelm
parents: 66908
diff changeset
    22
perl to get the plumbing right. This style should be imitated as far as
d122c24a93d6 misc tuning and modernization;
wenzelm
parents: 66908
diff changeset
    23
possible.
35610
a5b7a0903441 Some notes on platform support of Isabelle.
wenzelm
parents:
diff changeset
    24
a5b7a0903441 Some notes on platform support of Isabelle.
wenzelm
parents:
diff changeset
    25
a5b7a0903441 Some notes on platform support of Isabelle.
wenzelm
parents:
diff changeset
    26
Supported platforms
a5b7a0903441 Some notes on platform support of Isabelle.
wenzelm
parents:
diff changeset
    27
-------------------
a5b7a0903441 Some notes on platform support of Isabelle.
wenzelm
parents:
diff changeset
    28
a5b7a0903441 Some notes on platform support of Isabelle.
wenzelm
parents:
diff changeset
    29
The following hardware and operating system platforms are officially
36204
16c371c6ff86 some updates on multi-platform support;
wenzelm
parents: 35610
diff changeset
    30
supported by the Isabelle distribution (and bundled tools), with the
64339
321065f9f55b misc tuning and updates;
wenzelm
parents: 64337
diff changeset
    31
following base-line versions (which have been selected to be neither
36204
16c371c6ff86 some updates on multi-platform support;
wenzelm
parents: 35610
diff changeset
    32
too old nor too new):
35610
a5b7a0903441 Some notes on platform support of Isabelle.
wenzelm
parents:
diff changeset
    33
63520
2803d2b8f85d Linux platform base-line is Ubuntu 12.04 LTS;
wenzelm
parents: 62011
diff changeset
    34
  x86_64-linux      Ubuntu 12.04 LTS
35610
a5b7a0903441 Some notes on platform support of Isabelle.
wenzelm
parents:
diff changeset
    35
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
    36
  x86_64-darwin     Mac OS X 10.9 Mavericks (macbroy2 MacPro4,1)
64406
492de9062cd2 more specific hardware information: relevant for ultimate Mac OS X version;
wenzelm
parents: 64402
diff changeset
    37
                    Mac OS X 10.10 Yosemite (macbroy31 MacBookPro6,2)
64402
4f0acbd97491 latest Mac OS X versions *are* still supported, but presently without formal reference systems;
wenzelm
parents: 64387
diff changeset
    38
                    Mac OS X 10.11 El Capitan (?)
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
    39
                    macOS 10.12 Sierra (macbroy30 MacBookPro6,2)
48833
10584ca5785f updates on 32 bit vs. 64 bit platforms;
wenzelm
parents: 46006
diff changeset
    40
64339
321065f9f55b misc tuning and updates;
wenzelm
parents: 64337
diff changeset
    41
  x86_64-windows    Windows 7
66691
a8703e8ee1d3 basic support for x86_64-cygwin;
wenzelm
parents: 66529
diff changeset
    42
  x86_64-cygwin     Cygwin 2.8 http://isabelle.in.tum.de/cygwin_2017 (x86_64/release)
36204
16c371c6ff86 some updates on multi-platform support;
wenzelm
parents: 35610
diff changeset
    43
16c371c6ff86 some updates on multi-platform support;
wenzelm
parents: 35610
diff changeset
    44
All of the above platforms are 100% supported by Isabelle -- end-users
44876
243e2a413787 some updates of PLATFORMS;
wenzelm
parents: 42424
diff changeset
    45
should not have to care about the differences (at least in theory).
35610
a5b7a0903441 Some notes on platform support of Isabelle.
wenzelm
parents:
diff changeset
    46
64339
321065f9f55b misc tuning and updates;
wenzelm
parents: 64337
diff changeset
    47
Fringe platforms like BSD or Solaris are not supported.
36204
16c371c6ff86 some updates on multi-platform support;
wenzelm
parents: 35610
diff changeset
    48
16c371c6ff86 some updates on multi-platform support;
wenzelm
parents: 35610
diff changeset
    49
66911
d122c24a93d6 misc tuning and modernization;
wenzelm
parents: 66908
diff changeset
    50
64 bit vs. 32 bit platform personality
d122c24a93d6 misc tuning and modernization;
wenzelm
parents: 66908
diff changeset
    51
--------------------------------------
36204
16c371c6ff86 some updates on multi-platform support;
wenzelm
parents: 35610
diff changeset
    52
66911
d122c24a93d6 misc tuning and modernization;
wenzelm
parents: 66908
diff changeset
    53
Isabelle requires 64 bit hardware running a 64 bit operating. Windows
d122c24a93d6 misc tuning and modernization;
wenzelm
parents: 66908
diff changeset
    54
and Mac OS X allow x86 executables as well, but for Linux this requires
d122c24a93d6 misc tuning and modernization;
wenzelm
parents: 66908
diff changeset
    55
separate installation of 32 bit shared libraries. The POSIX emulation on
d122c24a93d6 misc tuning and modernization;
wenzelm
parents: 66908
diff changeset
    56
Windows via Cygwin64 is exclusively for x86_64.
d122c24a93d6 misc tuning and modernization;
wenzelm
parents: 66908
diff changeset
    57
d122c24a93d6 misc tuning and modernization;
wenzelm
parents: 66908
diff changeset
    58
ML works both for x86_64 and x86, and the latter is preferred for space
d122c24a93d6 misc tuning and modernization;
wenzelm
parents: 66908
diff changeset
    59
and performance reasons. Java is always for x86_64 on all platforms.
48833
10584ca5785f updates on 32 bit vs. 64 bit platforms;
wenzelm
parents: 46006
diff changeset
    60
49144
84699f37481d misc tuning;
wenzelm
parents: 48836
diff changeset
    61
Add-on executables are expected to work without manual user
66911
d122c24a93d6 misc tuning and modernization;
wenzelm
parents: 66908
diff changeset
    62
configuration. Each component settings script needs to determine the
49144
84699f37481d misc tuning;
wenzelm
parents: 48836
diff changeset
    63
platform details appropriately.
48833
10584ca5785f updates on 32 bit vs. 64 bit platforms;
wenzelm
parents: 46006
diff changeset
    64
65073
b5bf76cf2b4e more uniform platform settings;
wenzelm
parents: 64406
diff changeset
    65
48833
10584ca5785f updates on 32 bit vs. 64 bit platforms;
wenzelm
parents: 46006
diff changeset
    66
The Isabelle settings environment provides the following variables to
10584ca5785f updates on 32 bit vs. 64 bit platforms;
wenzelm
parents: 46006
diff changeset
    67
help configuring platform-dependent tools:
10584ca5785f updates on 32 bit vs. 64 bit platforms;
wenzelm
parents: 46006
diff changeset
    68
10584ca5785f updates on 32 bit vs. 64 bit platforms;
wenzelm
parents: 46006
diff changeset
    69
  ISABELLE_PLATFORM64  (potentially empty)
66691
a8703e8ee1d3 basic support for x86_64-cygwin;
wenzelm
parents: 66529
diff changeset
    70
  ISABELLE_PLATFORM32  (potentially empty)
48833
10584ca5785f updates on 32 bit vs. 64 bit platforms;
wenzelm
parents: 46006
diff changeset
    71
  ISABELLE_PLATFORM
36204
16c371c6ff86 some updates on multi-platform support;
wenzelm
parents: 35610
diff changeset
    72
66911
d122c24a93d6 misc tuning and modernization;
wenzelm
parents: 66908
diff changeset
    73
The ISABELLE_PLATFORM setting variable prefers the 32 bit personality of
d122c24a93d6 misc tuning and modernization;
wenzelm
parents: 66908
diff changeset
    74
the platform, if possible. Using regular bash notation, tools may
d122c24a93d6 misc tuning and modernization;
wenzelm
parents: 66908
diff changeset
    75
express their preference for 64 bit with a fall-back for 32 bit as
d122c24a93d6 misc tuning and modernization;
wenzelm
parents: 66908
diff changeset
    76
follows:
48833
10584ca5785f updates on 32 bit vs. 64 bit platforms;
wenzelm
parents: 46006
diff changeset
    77
10584ca5785f updates on 32 bit vs. 64 bit platforms;
wenzelm
parents: 46006
diff changeset
    78
  "${ISABELLE_PLATFORM64:-$ISABELLE_PLATFORM32}"
36204
16c371c6ff86 some updates on multi-platform support;
wenzelm
parents: 35610
diff changeset
    79
65073
b5bf76cf2b4e more uniform platform settings;
wenzelm
parents: 64406
diff changeset
    80
b5bf76cf2b4e more uniform platform settings;
wenzelm
parents: 64406
diff changeset
    81
There is a second set of settings for native Windows (instead of the
b5bf76cf2b4e more uniform platform settings;
wenzelm
parents: 64406
diff changeset
    82
POSIX emulation of Cygwin used before):
b5bf76cf2b4e more uniform platform settings;
wenzelm
parents: 64406
diff changeset
    83
66732
e566fb4d43d4 more and updated documentation;
wenzelm
parents: 66728
diff changeset
    84
  ISABELLE_WINDOWS_PLATFORM64
65073
b5bf76cf2b4e more uniform platform settings;
wenzelm
parents: 64406
diff changeset
    85
  ISABELLE_WINDOWS_PLATFORM32
b5bf76cf2b4e more uniform platform settings;
wenzelm
parents: 64406
diff changeset
    86
  ISABELLE_WINDOWS_PLATFORM
b5bf76cf2b4e more uniform platform settings;
wenzelm
parents: 64406
diff changeset
    87
b5bf76cf2b4e more uniform platform settings;
wenzelm
parents: 64406
diff changeset
    88
It can be used like this:
b5bf76cf2b4e more uniform platform settings;
wenzelm
parents: 64406
diff changeset
    89
b5bf76cf2b4e more uniform platform settings;
wenzelm
parents: 64406
diff changeset
    90
  "${ISABELLE_WINDOWS_PLATFORM:-$ISABELLE_PLATFORM}"
b5bf76cf2b4e more uniform platform settings;
wenzelm
parents: 64406
diff changeset
    91
b5bf76cf2b4e more uniform platform settings;
wenzelm
parents: 64406
diff changeset
    92
  "${ISABELLE_WINDOWS_PLATFORM64:-${ISABELLE_WINDOWS_PLATFORM32:-${ISABELLE_PLATFORM64:-$ISABELLE_PLATFORM32}}}"
b5bf76cf2b4e more uniform platform settings;
wenzelm
parents: 64406
diff changeset
    93
b5bf76cf2b4e more uniform platform settings;
wenzelm
parents: 64406
diff changeset
    94
35610
a5b7a0903441 Some notes on platform support of Isabelle.
wenzelm
parents:
diff changeset
    95
Dependable system tools
a5b7a0903441 Some notes on platform support of Isabelle.
wenzelm
parents:
diff changeset
    96
-----------------------
a5b7a0903441 Some notes on platform support of Isabelle.
wenzelm
parents:
diff changeset
    97
a5b7a0903441 Some notes on platform support of Isabelle.
wenzelm
parents:
diff changeset
    98
The following portable system tools can be taken for granted:
a5b7a0903441 Some notes on platform support of Isabelle.
wenzelm
parents:
diff changeset
    99
64339
321065f9f55b misc tuning and updates;
wenzelm
parents: 64337
diff changeset
   100
* Scala on top of Java 8.  Isabelle/Scala irons out many oddities and
321065f9f55b misc tuning and updates;
wenzelm
parents: 64337
diff changeset
   101
  portability issues of the Java platform.
321065f9f55b misc tuning and updates;
wenzelm
parents: 64337
diff changeset
   102
66911
d122c24a93d6 misc tuning and modernization;
wenzelm
parents: 66908
diff changeset
   103
* GNU bash as uniform shell on all platforms. The POSIX "standard" shell
d122c24a93d6 misc tuning and modernization;
wenzelm
parents: 66908
diff changeset
   104
  /bin/sh does *not* work -- there are too many non-standard
d122c24a93d6 misc tuning and modernization;
wenzelm
parents: 66908
diff changeset
   105
  implementations of it. On Debian and Ubuntu /bin/sh is actually
d122c24a93d6 misc tuning and modernization;
wenzelm
parents: 66908
diff changeset
   106
  /bin/dash and thus introduces many oddities.
35610
a5b7a0903441 Some notes on platform support of Isabelle.
wenzelm
parents:
diff changeset
   107
58780
1f8c0da85664 discontinued python from standard system environment;
wenzelm
parents: 55438
diff changeset
   108
* Perl as largely portable system programming language, with its
1f8c0da85664 discontinued python from standard system environment;
wenzelm
parents: 55438
diff changeset
   109
  fairly robust support for processes, signals, sockets etc.
35610
a5b7a0903441 Some notes on platform support of Isabelle.
wenzelm
parents:
diff changeset
   110
a5b7a0903441 Some notes on platform support of Isabelle.
wenzelm
parents:
diff changeset
   111
a5b7a0903441 Some notes on platform support of Isabelle.
wenzelm
parents:
diff changeset
   112
Known problems
a5b7a0903441 Some notes on platform support of Isabelle.
wenzelm
parents:
diff changeset
   113
--------------
a5b7a0903441 Some notes on platform support of Isabelle.
wenzelm
parents:
diff changeset
   114
55391
eae296b5ef33 Mac OS X Lion (macbroy6) is baseline for portable executables;
wenzelm
parents: 49144
diff changeset
   115
* Mac OS X: If MacPorts is installed there is some danger that
41668
62ed9f31ea90 more platform hints;
wenzelm
parents: 41458
diff changeset
   116
  accidental references to its shared libraries are created
62ed9f31ea90 more platform hints;
wenzelm
parents: 41458
diff changeset
   117
  (e.g. libgmp).  Use otool -L to check if compiled binaries also work
62ed9f31ea90 more platform hints;
wenzelm
parents: 41458
diff changeset
   118
  without MacPorts.
62ed9f31ea90 more platform hints;
wenzelm
parents: 41458
diff changeset
   119
55391
eae296b5ef33 Mac OS X Lion (macbroy6) is baseline for portable executables;
wenzelm
parents: 49144
diff changeset
   120
* Mac OS X: If MacPorts is installed and its version of Perl takes
35610
a5b7a0903441 Some notes on platform support of Isabelle.
wenzelm
parents:
diff changeset
   121
  precedence over /usr/bin/perl in the PATH, then the end-user needs
36204
16c371c6ff86 some updates on multi-platform support;
wenzelm
parents: 35610
diff changeset
   122
  to take care of installing extra modules, e.g. for HTTP support.
16c371c6ff86 some updates on multi-platform support;
wenzelm
parents: 35610
diff changeset
   123
  Such add-ons are usually included in Apple's /usr/bin/perl by
16c371c6ff86 some updates on multi-platform support;
wenzelm
parents: 35610
diff changeset
   124
  default.
35610
a5b7a0903441 Some notes on platform support of Isabelle.
wenzelm
parents:
diff changeset
   125
66911
d122c24a93d6 misc tuning and modernization;
wenzelm
parents: 66908
diff changeset
   126
* The Java runtime has its own idea about the underlying platform, which
d122c24a93d6 misc tuning and modernization;
wenzelm
parents: 66908
diff changeset
   127
  affects Java native libraries in particular. In Isabelle/Scala the
d122c24a93d6 misc tuning and modernization;
wenzelm
parents: 66908
diff changeset
   128
  function isabelle.Platform.jvm_platform identifies the JVM platform.
d122c24a93d6 misc tuning and modernization;
wenzelm
parents: 66908
diff changeset
   129
  In the settings environment, ISABELLE_JAVA_PLATFORM provides the same
d122c24a93d6 misc tuning and modernization;
wenzelm
parents: 66908
diff changeset
   130
  information without running the JVM.
55438
3b95e70c5cb3 more platform notes;
wenzelm
parents: 55391
diff changeset
   131
3b95e70c5cb3 more platform notes;
wenzelm
parents: 55391
diff changeset
   132
* Common Unix tools like /bin/sh, /bin/kill, sed, ulimit are
64339
321065f9f55b misc tuning and updates;
wenzelm
parents: 64337
diff changeset
   133
  notoriously non-portable an should be avoided.
66911
d122c24a93d6 misc tuning and modernization;
wenzelm
parents: 66908
diff changeset
   134
d122c24a93d6 misc tuning and modernization;
wenzelm
parents: 66908
diff changeset
   135
* The traditional "uname" Unix tool only tells about its own executable
d122c24a93d6 misc tuning and modernization;
wenzelm
parents: 66908
diff changeset
   136
  format, not the underlying platform!