README revision 1.17
11.17Scjep$NetBSD: README,v 1.17 2021/06/28 07:16:46 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.14Scjep======= 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.1Stv===== 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.14Scjep============ 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.9Sdbj===== 611.9Sdbj 621.14Scjep* zlib must be available. 631.1Stv 641.14ScjepNetBSD (earlier releases) 651.14Scjep========================= 661.1Stv 671.1Stv* Tested on NetBSD 1.5.2 (machine-independently). 681.1Stv* Should need no special setup. 691.14Scjep* _NETBSD_SOURCE is *not* to be defined/pulled in during compat/tools builds. 701.14Scjep compat_defs.h will error out if it finds it defined. 711.1Stv 721.14ScjepSolaris 731.14Scjep======= 741.1Stv 751.13Spalle(updated instruction for Solaris 11 further below) 761.13Spalle 771.4Sthorpej* Tested on Solaris/x86 8 (5.8) with gcc 2.95.2 and Solaris/sparc 8 (5.8) 781.4Sthorpej with gcc 3.2 (not yet tested with SUNWspro). 791.1Stv 801.1Stv* $HOST_CC needs to be set properly (for gcc, it should be set to "gcc", 811.1Stv otherwise the improper /usr/ucb/cc may be invoked by accident). 821.1Stv 831.4Sthorpej* The SUNWzlib package (or a built version of zlib visible to $HOST_CC, 841.4Sthorpej such as SMCzlib from sunfreeware.com) must be installed. This will be 851.4Sthorpej fixed in the future to include zlib in libnbcompat. 861.1Stv 871.1Stv* Needs the following paths, in this order, in $PATH: 881.1Stv 891.5Sthorpej /usr/xpg4/bin 901.4Sthorpej /usr/ccs/bin 911.4Sthorpej <path to host C and C++ compilers> 921.4Sthorpej /usr/bin 931.4Sthorpej 941.4Sthorpej /usr/ucb may optionally be placed before /usr/bin, per your preference, 951.4Sthorpej but /usr/ucb *MUST NOT* be before /usr/ccs/bin or before the path to 961.4Sthorpej the host C and C++ compilers. 971.13Spalle 981.13SpalleSolaris 11: 991.13Spalle 1001.13Spalle* Solaris 11.3 1011.13Spalle * Set PATH to /usr/xpg6/bin:/usr/xpg4/bin:/usr/bin 1021.13Spalle * Set HOST_CC to /usr/bin/gcc 1031.13Spalle 1041.13Spalle* Solaris 11.4 1051.13Spalle * Install gcc-5 since the default installed gcc-7 has issues when compiling 1061.13Spalle toolchain version of groff (hypot()) 1071.13Spalle * Set PATH to /usr/xpg7/bin:/usr/xpg6/bin:/usr/xpg4/bin:/usr/bin 1081.13Spalle * set HOST_CC to /usr/gcc/5/bin/gcc 1091.13Spalle * set HOST_CXX to /usr/gcc/5/bin/g++ 110