README revision 1.20
11.20Scjep$NetBSD: README,v 1.20 2021/07/04 12:57:48 cjep Exp $
21.1Stv
31.1StvSpecial notes for cross-hosting a NetBSD build on certain platforms.  
41.1StvOnly those platforms which have been tested to complete a "build.sh" run
51.1Stvare listed.
61.7Slukem
71.10SjmcAll hosts must have a POSIX compatible sh. /bin/sh is assumed unless 
81.10Sjmcotherwise set. This can be overridden by setting HOST_SH in the environment.
91.10Sjmc
101.10SjmcIn addition all hosts must provide the following local tools:
111.14Scjep  gzip
121.14Scjep  gcc
131.14Scjep  g++
141.14Scjep  zlib and headers (this requirement may be dropped in future)
151.10Sjmc
161.14ScjepFreeBSD
171.18Scjep-------
181.10Sjmc
191.15Scjepbuild.sh was recently tested on:
201.15Scjep* FreeBSD 13 (amd64, aarch64) 
211.15Scjep* FreeBSD 12.2 (amd64, aarch64)
221.15Scjep* FreeBSD 11.4 (amd64)
231.15Scjep* FreeBSD 10.4 (amd64)
241.1Stv
251.14ScjepLinux
261.18Scjep-----
271.1Stv
281.14Scjepbuild.sh has been tested on:
291.14Scjep* Amazon Linux 2 (x86)
301.15Scjep* Debian 10 (x86, aarch64)
311.15Scjep* Red Hat Enterprise Linux 8 (x86, aarch64)
321.14Scjep* SUSE Enterprise Server 15 (x86)
331.15Scjep* Ubuntu Server 20.04 (x86, aarch64)
341.15Scjep* Ubuntu Server 18.04 (x86)
351.14Scjep
361.14Scjep* The gcc and g++ package must be installed, along with the typical system 
371.14Scjep  development packages (glibc-devel, etc.). The g++ package is sometimes 
381.14Scjep  called gcc-c++.
391.1Stv
401.14Scjep* The ncurses-devel package must be installed (for nbinfo).
411.12Sjmc
421.14Scjep* The zlib and zlib-devel packages must be installed (these are
431.14Scjep  called zlib1g and zlib1g-dev on Debian and Ubuntu Linux)
441.1Stv
451.15Scjep* There is a known build problem on Linux/aarch64 with glibc <2.28
461.15Scjep
471.14ScjepmacOS/Darwin
481.18Scjep------------
491.1Stv
501.15Scjepbuild.sh was recently tested on:
511.17Scjep* macOS Big Sur (x86)
521.15Scjep* macOS Catalina
531.16Scjep* macOS High Sierra
541.15Scjep
551.17Scjepwith up to date Xcode command line tools and APFS filesystems. 
561.17ScjepPreviously, there have been issues building on case-insensitive 
571.17ScjepHFS filesystems. build.sh is not working yet on M1-based Macs.
581.9Sdbj
591.14ScjepHP-UX
601.18Scjep-----
611.9Sdbj
621.14Scjep* zlib must be available.
631.1Stv
641.19ScjepOpenBSD
651.19Scjep-------
661.19Scjep
671.19ScjepAs of -current 20210629, ./build.sh will build src on OpenBSD 6.9
681.20Scjepfor all targets except MIPS-based ones. 
691.20Scjep
701.20ScjepFor builds requiring the LLVM RT library (including X on amd64, 
711.20Scjepi386 and evbarm64-el), the build user's limits needs to be setup 
721.20Scjepfor higher memory usage, otherwise the build will fail. This can
731.20Scjepbe achieved by either building as root (not recommended) or
741.20Scjepby changing the datasize attribute to infinity for the relevant
751.20Scjepgroups and users in /etc/login.conf.
761.19Scjep
771.14ScjepNetBSD (earlier releases)
781.18Scjep-------------------------
791.1Stv
801.1Stv* Tested on NetBSD 1.5.2 (machine-independently).
811.1Stv* Should need no special setup.
821.14Scjep* _NETBSD_SOURCE is *not* to be defined/pulled in during compat/tools builds.
831.14Scjep  compat_defs.h will error out if it finds it defined. 
841.1Stv
851.14ScjepSolaris
861.18Scjep-------
871.1Stv
881.13Spalle(updated instruction for Solaris 11 further below)
891.13Spalle
901.4Sthorpej* Tested on Solaris/x86 8 (5.8) with gcc 2.95.2 and Solaris/sparc 8 (5.8)
911.4Sthorpej  with gcc 3.2 (not yet tested with SUNWspro).
921.1Stv
931.1Stv* $HOST_CC needs to be set properly (for gcc, it should be set to "gcc",
941.1Stv  otherwise the improper /usr/ucb/cc may be invoked by accident).
951.1Stv
961.4Sthorpej* The SUNWzlib package (or a built version of zlib visible to $HOST_CC,
971.4Sthorpej  such as SMCzlib from sunfreeware.com) must be installed.  This will be
981.4Sthorpej  fixed in the future to include zlib in libnbcompat.
991.1Stv
1001.1Stv* Needs the following paths, in this order, in $PATH:
1011.1Stv
1021.5Sthorpej      /usr/xpg4/bin
1031.4Sthorpej      /usr/ccs/bin
1041.4Sthorpej      <path to host C and C++ compilers>
1051.4Sthorpej      /usr/bin
1061.4Sthorpej
1071.4Sthorpej  /usr/ucb may optionally be placed before /usr/bin, per your preference,
1081.4Sthorpej  but /usr/ucb *MUST NOT* be before /usr/ccs/bin or before the path to
1091.4Sthorpej  the host C and C++ compilers.
1101.13Spalle
1111.13SpalleSolaris 11:
1121.13Spalle
1131.13Spalle* Solaris 11.3
1141.13Spalle * Set PATH to /usr/xpg6/bin:/usr/xpg4/bin:/usr/bin
1151.13Spalle * Set HOST_CC to /usr/bin/gcc
1161.13Spalle
1171.13Spalle* Solaris 11.4
1181.13Spalle * Install gcc-5 since the default installed gcc-7 has issues when compiling 
1191.13Spalle   toolchain version of groff (hypot())
1201.13Spalle * Set PATH to /usr/xpg7/bin:/usr/xpg6/bin:/usr/xpg4/bin:/usr/bin
1211.13Spalle * set HOST_CC to /usr/gcc/5/bin/gcc
1221.13Spalle * set HOST_CXX to /usr/gcc/5/bin/g++
123