1 1.29 palle $NetBSD: README,v 1.29 2023/09/02 18:45:48 palle Exp $ 2 1.1 tv 3 1.1 tv Special notes for cross-hosting a NetBSD build on certain platforms. 4 1.1 tv Only those platforms which have been tested to complete a "build.sh" run 5 1.1 tv are listed. 6 1.7 lukem 7 1.10 jmc All hosts must have a POSIX compatible sh. /bin/sh is assumed unless 8 1.10 jmc otherwise set. This can be overridden by setting HOST_SH in the environment. 9 1.10 jmc 10 1.10 jmc In addition all hosts must provide the following local tools: 11 1.14 cjep gzip 12 1.14 cjep gcc 13 1.14 cjep g++ 14 1.14 cjep zlib and headers (this requirement may be dropped in future) 15 1.10 jmc 16 1.14 cjep FreeBSD 17 1.18 cjep ------- 18 1.10 jmc 19 1.15 cjep build.sh was recently tested on: 20 1.15 cjep * FreeBSD 13 (amd64, aarch64) 21 1.15 cjep * FreeBSD 12.2 (amd64, aarch64) 22 1.15 cjep * FreeBSD 11.4 (amd64) 23 1.15 cjep * FreeBSD 10.4 (amd64) 24 1.1 tv 25 1.14 cjep Linux 26 1.18 cjep ----- 27 1.1 tv 28 1.14 cjep build.sh has been tested on: 29 1.14 cjep * Amazon Linux 2 (x86) 30 1.15 cjep * Debian 10 (x86, aarch64) 31 1.15 cjep * Red Hat Enterprise Linux 8 (x86, aarch64) 32 1.14 cjep * SUSE Enterprise Server 15 (x86) 33 1.15 cjep * Ubuntu Server 20.04 (x86, aarch64) 34 1.15 cjep * Ubuntu Server 18.04 (x86) 35 1.14 cjep 36 1.14 cjep * The gcc and g++ package must be installed, along with the typical system 37 1.14 cjep development packages (glibc-devel, etc.). The g++ package is sometimes 38 1.14 cjep called gcc-c++. 39 1.1 tv 40 1.14 cjep * The ncurses-devel package must be installed (for nbinfo). 41 1.12 jmc 42 1.14 cjep * The zlib and zlib-devel packages must be installed (these are 43 1.14 cjep called zlib1g and zlib1g-dev on Debian and Ubuntu Linux) 44 1.1 tv 45 1.15 cjep * There is a known build problem on Linux/aarch64 with glibc <2.28 46 1.15 cjep 47 1.14 cjep macOS/Darwin 48 1.18 cjep ------------ 49 1.1 tv 50 1.15 cjep build.sh was recently tested on: 51 1.17 cjep * macOS Big Sur (x86) 52 1.15 cjep * macOS Catalina 53 1.16 cjep * macOS High Sierra 54 1.15 cjep 55 1.17 cjep with up to date Xcode command line tools and APFS filesystems. 56 1.17 cjep Previously, there have been issues building on case-insensitive 57 1.17 cjep HFS filesystems. build.sh is not working yet on M1-based Macs. 58 1.9 dbj 59 1.14 cjep HP-UX 60 1.18 cjep ----- 61 1.9 dbj 62 1.14 cjep * zlib must be available. 63 1.1 tv 64 1.19 cjep OpenBSD 65 1.19 cjep ------- 66 1.19 cjep 67 1.19 cjep As of -current 20210629, ./build.sh will build src on OpenBSD 6.9 68 1.21 cjep for all platforms. 69 1.20 cjep 70 1.21 cjep Due to the default limits placed on user accounts, the host may experience 71 1.21 cjep memory exhaustion on builds requiring the LLVM RT library (including 72 1.21 cjep X on amd64, i386 and evbarm64-el) and for MIPS targets. 73 1.21 cjep 74 1.21 cjep This can be avoided by building as root (not ideal) or by asking your 75 1.21 cjep administrator to increase your limits in login.conf. These two variables 76 1.21 cjep seem to be sufficient: 77 1.21 cjep :datasize=infinity:\ 78 1.21 cjep :stacksize-cur=8M:\ 79 1.19 cjep 80 1.14 cjep NetBSD (earlier releases) 81 1.18 cjep ------------------------- 82 1.1 tv 83 1.1 tv * Tested on NetBSD 1.5.2 (machine-independently). 84 1.1 tv * Should need no special setup. 85 1.14 cjep * _NETBSD_SOURCE is *not* to be defined/pulled in during compat/tools builds. 86 1.14 cjep compat_defs.h will error out if it finds it defined. 87 1.1 tv 88 1.14 cjep Solaris 89 1.18 cjep ------- 90 1.1 tv 91 1.26 palle (updated instruction for Solaris 10 and 11 further below) 92 1.13 palle 93 1.4 thorpej * Tested on Solaris/x86 8 (5.8) with gcc 2.95.2 and Solaris/sparc 8 (5.8) 94 1.4 thorpej with gcc 3.2 (not yet tested with SUNWspro). 95 1.1 tv 96 1.1 tv * $HOST_CC needs to be set properly (for gcc, it should be set to "gcc", 97 1.1 tv otherwise the improper /usr/ucb/cc may be invoked by accident). 98 1.1 tv 99 1.4 thorpej * The SUNWzlib package (or a built version of zlib visible to $HOST_CC, 100 1.4 thorpej such as SMCzlib from sunfreeware.com) must be installed. This will be 101 1.4 thorpej fixed in the future to include zlib in libnbcompat. 102 1.1 tv 103 1.1 tv * Needs the following paths, in this order, in $PATH: 104 1.1 tv 105 1.5 thorpej /usr/xpg4/bin 106 1.4 thorpej /usr/ccs/bin 107 1.4 thorpej <path to host C and C++ compilers> 108 1.4 thorpej /usr/bin 109 1.4 thorpej 110 1.4 thorpej /usr/ucb may optionally be placed before /usr/bin, per your preference, 111 1.4 thorpej but /usr/ucb *MUST NOT* be before /usr/ccs/bin or before the path to 112 1.4 thorpej the host C and C++ compilers. 113 1.13 palle 114 1.26 palle 115 1.26 palle Solaris 10: 116 1.26 palle 117 1.26 palle * Solaris 10 1/13 (u11) 118 1.26 palle * POSIX.1-2001, SUSv3 (see standards(7)) 119 1.26 palle * Using gcc-5 from opencsw.org 120 1.29 palle * Set PATH to /usr/xpg6/bin:/usr/xpg4/bin:/usr/bin:/usr/ccs/bin 121 1.26 palle * Set HOST_CC to /opt/csw/bin/gcc 122 1.26 palle * Set HOST_SH to /usr/bin/bash 123 1.26 palle 124 1.26 palle 125 1.13 palle Solaris 11: 126 1.13 palle 127 1.13 palle * Solaris 11.3 128 1.26 palle * POSIX.1-2001, SUSv3 (see standards(7)) 129 1.28 palle * Using gcc-12 from pkgsrc.org (installed in $GCC12INSTALLDIR) 130 1.27 palle * Set PATH to /usr/xpg6/bin:/usr/xpg4/bin:/usr/bin:$GCC12INSTALLDIR/bin 131 1.28 palle * Set HOST_CC to $GCC12INSTALLDIR/bin/gcc 132 1.26 palle * Set HOST_SH to /usr/bin/bash 133 1.13 palle 134 1.22 palle * Solaris 11.4 (CBE) 135 1.24 palle * POSIX.1-2008, SUSv4 (see standards(7)) 136 1.24 palle * Using gcc-11 137 1.24 palle * Set PATH to /usr/xpg7/bin:/usr/xpg6/bin:/usr/xpg4/bin:/usr/bin 138 1.24 palle * Set HOST_CC to /usr/bin/gcc 139 1.25 palle * Set HOST_SH to /usr/bin/bash 140 1.22 palle 141 1.22 palle * Solaris 11.4 (SRU57) 142 1.23 palle * POSIX.1-2008, SUSv4 (see standards(7)) 143 1.22 palle * Using gcc-12 144 1.13 palle * Set PATH to /usr/xpg7/bin:/usr/xpg6/bin:/usr/xpg4/bin:/usr/bin 145 1.22 palle * Set HOST_CC to /usr/bin/gcc 146 1.23 palle * Set HOST_SH to /usr/bin/bash 147