README revision 1.19
11.19Scjep$NetBSD: README,v 1.19 2021/06/29 10:02:34 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.19Scjepfor some platforms. Known problems: 691.19Scjep* MIPS targets do not currently build. 701.19Scjep* The LLVM RT library will not build and consequently nor will X on 711.19Scjep amd64 and i386. 721.19Scjep 731.14ScjepNetBSD (earlier releases) 741.18Scjep------------------------- 751.1Stv 761.1Stv* Tested on NetBSD 1.5.2 (machine-independently). 771.1Stv* Should need no special setup. 781.14Scjep* _NETBSD_SOURCE is *not* to be defined/pulled in during compat/tools builds. 791.14Scjep compat_defs.h will error out if it finds it defined. 801.1Stv 811.14ScjepSolaris 821.18Scjep------- 831.1Stv 841.13Spalle(updated instruction for Solaris 11 further below) 851.13Spalle 861.4Sthorpej* Tested on Solaris/x86 8 (5.8) with gcc 2.95.2 and Solaris/sparc 8 (5.8) 871.4Sthorpej with gcc 3.2 (not yet tested with SUNWspro). 881.1Stv 891.1Stv* $HOST_CC needs to be set properly (for gcc, it should be set to "gcc", 901.1Stv otherwise the improper /usr/ucb/cc may be invoked by accident). 911.1Stv 921.4Sthorpej* The SUNWzlib package (or a built version of zlib visible to $HOST_CC, 931.4Sthorpej such as SMCzlib from sunfreeware.com) must be installed. This will be 941.4Sthorpej fixed in the future to include zlib in libnbcompat. 951.1Stv 961.1Stv* Needs the following paths, in this order, in $PATH: 971.1Stv 981.5Sthorpej /usr/xpg4/bin 991.4Sthorpej /usr/ccs/bin 1001.4Sthorpej <path to host C and C++ compilers> 1011.4Sthorpej /usr/bin 1021.4Sthorpej 1031.4Sthorpej /usr/ucb may optionally be placed before /usr/bin, per your preference, 1041.4Sthorpej but /usr/ucb *MUST NOT* be before /usr/ccs/bin or before the path to 1051.4Sthorpej the host C and C++ compilers. 1061.13Spalle 1071.13SpalleSolaris 11: 1081.13Spalle 1091.13Spalle* Solaris 11.3 1101.13Spalle * Set PATH to /usr/xpg6/bin:/usr/xpg4/bin:/usr/bin 1111.13Spalle * Set HOST_CC to /usr/bin/gcc 1121.13Spalle 1131.13Spalle* Solaris 11.4 1141.13Spalle * Install gcc-5 since the default installed gcc-7 has issues when compiling 1151.13Spalle toolchain version of groff (hypot()) 1161.13Spalle * Set PATH to /usr/xpg7/bin:/usr/xpg6/bin:/usr/xpg4/bin:/usr/bin 1171.13Spalle * set HOST_CC to /usr/gcc/5/bin/gcc 1181.13Spalle * set HOST_CXX to /usr/gcc/5/bin/g++ 119