README revision 1.19 1 $NetBSD: README,v 1.19 2021/06/29 10:02:34 cjep Exp $
2
3 Special notes for cross-hosting a NetBSD build on certain platforms.
4 Only those platforms which have been tested to complete a "build.sh" run
5 are listed.
6
7 All hosts must have a POSIX compatible sh. /bin/sh is assumed unless
8 otherwise set. This can be overridden by setting HOST_SH in the environment.
9
10 In addition all hosts must provide the following local tools:
11 gzip
12 gcc
13 g++
14 zlib and headers (this requirement may be dropped in future)
15
16 FreeBSD
17 -------
18
19 build.sh was recently tested on:
20 * FreeBSD 13 (amd64, aarch64)
21 * FreeBSD 12.2 (amd64, aarch64)
22 * FreeBSD 11.4 (amd64)
23 * FreeBSD 10.4 (amd64)
24
25 Linux
26 -----
27
28 build.sh has been tested on:
29 * Amazon Linux 2 (x86)
30 * Debian 10 (x86, aarch64)
31 * Red Hat Enterprise Linux 8 (x86, aarch64)
32 * SUSE Enterprise Server 15 (x86)
33 * Ubuntu Server 20.04 (x86, aarch64)
34 * Ubuntu Server 18.04 (x86)
35
36 * The gcc and g++ package must be installed, along with the typical system
37 development packages (glibc-devel, etc.). The g++ package is sometimes
38 called gcc-c++.
39
40 * The ncurses-devel package must be installed (for nbinfo).
41
42 * The zlib and zlib-devel packages must be installed (these are
43 called zlib1g and zlib1g-dev on Debian and Ubuntu Linux)
44
45 * There is a known build problem on Linux/aarch64 with glibc <2.28
46
47 macOS/Darwin
48 ------------
49
50 build.sh was recently tested on:
51 * macOS Big Sur (x86)
52 * macOS Catalina
53 * macOS High Sierra
54
55 with up to date Xcode command line tools and APFS filesystems.
56 Previously, there have been issues building on case-insensitive
57 HFS filesystems. build.sh is not working yet on M1-based Macs.
58
59 HP-UX
60 -----
61
62 * zlib must be available.
63
64 OpenBSD
65 -------
66
67 As of -current 20210629, ./build.sh will build src on OpenBSD 6.9
68 for some platforms. Known problems:
69 * MIPS targets do not currently build.
70 * The LLVM RT library will not build and consequently nor will X on
71 amd64 and i386.
72
73 NetBSD (earlier releases)
74 -------------------------
75
76 * Tested on NetBSD 1.5.2 (machine-independently).
77 * Should need no special setup.
78 * _NETBSD_SOURCE is *not* to be defined/pulled in during compat/tools builds.
79 compat_defs.h will error out if it finds it defined.
80
81 Solaris
82 -------
83
84 (updated instruction for Solaris 11 further below)
85
86 * Tested on Solaris/x86 8 (5.8) with gcc 2.95.2 and Solaris/sparc 8 (5.8)
87 with gcc 3.2 (not yet tested with SUNWspro).
88
89 * $HOST_CC needs to be set properly (for gcc, it should be set to "gcc",
90 otherwise the improper /usr/ucb/cc may be invoked by accident).
91
92 * The SUNWzlib package (or a built version of zlib visible to $HOST_CC,
93 such as SMCzlib from sunfreeware.com) must be installed. This will be
94 fixed in the future to include zlib in libnbcompat.
95
96 * Needs the following paths, in this order, in $PATH:
97
98 /usr/xpg4/bin
99 /usr/ccs/bin
100 <path to host C and C++ compilers>
101 /usr/bin
102
103 /usr/ucb may optionally be placed before /usr/bin, per your preference,
104 but /usr/ucb *MUST NOT* be before /usr/ccs/bin or before the path to
105 the host C and C++ compilers.
106
107 Solaris 11:
108
109 * Solaris 11.3
110 * Set PATH to /usr/xpg6/bin:/usr/xpg4/bin:/usr/bin
111 * Set HOST_CC to /usr/bin/gcc
112
113 * Solaris 11.4
114 * Install gcc-5 since the default installed gcc-7 has issues when compiling
115 toolchain version of groff (hypot())
116 * Set PATH to /usr/xpg7/bin:/usr/xpg6/bin:/usr/xpg4/bin:/usr/bin
117 * set HOST_CC to /usr/gcc/5/bin/gcc
118 * set HOST_CXX to /usr/gcc/5/bin/g++
119