NetBSD/tools/compat
palle 6042d5e3e5 Update build instructions for Solaris 10 hosts 2023-09-02 18:45:48 +00:00
..
buildaux tools/compat: provide nb_check_cc_flag.m4 2023-07-20 15:15:23 +00:00
crypto
dev
fs/msdosfs
sys
ufs
Makefile tools/compat: use autoreconf, support MAKEVERBOSE 2023-05-30 18:27:04 +00:00
README Update build instructions for Solaris 10 hosts 2023-09-02 18:45:48 +00:00
aclocal.m4 tools/compat: regen 2023-07-20 15:18:34 +00:00
cdbr.h
cdbw.h
compat_defs.h tools/compat/compat_defs.h: improve NAME_MAX compat 2023-07-21 22:05:04 +00:00
compat_getopt.h
compat_pwd.h
configure tools/compat: regen 2023-07-20 16:22:30 +00:00
configure.ac tools: binstall can use posix_spawn() instead of vfork() 2023-07-20 16:21:23 +00:00
db.h
defs.mk.in tools/compat: support all bsd.own.mk disabled warnings 2023-06-03 09:10:13 +00:00
dprintf.c
fgetln.c
flock.c
fpurge.c
fts.h
getline.c
getmode.c
glob.h
issetugid.c
lchflags.c
lchmod.c
lchown.c
md2.h
md4.h
md5.h
mpool.h
namespace.h
nbtool_config.h.in tools/compat: regen 2023-07-20 16:22:30 +00:00
ndbm.h
nl_types.h
pread.c
putc_unlocked.c
pwrite.c
regex.h PR/57500: Palle Lyckegaard: include missing tools/compat/regex.h for 2023-07-03 18:50:42 +00:00
rmd160.h
setenv.c
setgroupent.c
setpassent.c
setprogname.c
sha1.h
sha2.h
snprintf.c
tzfile.h
vis.h

README

$NetBSD: README,v 1.29 2023/09/02 18:45:48 palle Exp $

Special notes for cross-hosting a NetBSD build on certain platforms.  
Only those platforms which have been tested to complete a "build.sh" run
are listed.

All hosts must have a POSIX compatible sh. /bin/sh is assumed unless 
otherwise set. This can be overridden by setting HOST_SH in the environment.

In addition all hosts must provide the following local tools:
  gzip
  gcc
  g++
  zlib and headers (this requirement may be dropped in future)

FreeBSD
-------

build.sh was recently tested on:
* FreeBSD 13 (amd64, aarch64) 
* FreeBSD 12.2 (amd64, aarch64)
* FreeBSD 11.4 (amd64)
* FreeBSD 10.4 (amd64)

Linux
-----

build.sh has been tested on:
* Amazon Linux 2 (x86)
* Debian 10 (x86, aarch64)
* Red Hat Enterprise Linux 8 (x86, aarch64)
* SUSE Enterprise Server 15 (x86)
* Ubuntu Server 20.04 (x86, aarch64)
* Ubuntu Server 18.04 (x86)

* The gcc and g++ package must be installed, along with the typical system 
  development packages (glibc-devel, etc.). The g++ package is sometimes 
  called gcc-c++.

* The ncurses-devel package must be installed (for nbinfo).

* The zlib and zlib-devel packages must be installed (these are
  called zlib1g and zlib1g-dev on Debian and Ubuntu Linux)

* There is a known build problem on Linux/aarch64 with glibc <2.28

macOS/Darwin
------------

build.sh was recently tested on:
* macOS Big Sur (x86)
* macOS Catalina
* macOS High Sierra

with up to date Xcode command line tools and APFS filesystems. 
Previously, there have been issues building on case-insensitive 
HFS filesystems. build.sh is not working yet on M1-based Macs.

HP-UX
-----

* zlib must be available.

OpenBSD
-------

As of -current 20210629, ./build.sh will build src on OpenBSD 6.9
for all platforms.

Due to the default limits placed on user accounts, the host may experience
memory exhaustion on builds requiring the LLVM RT library (including 
X on amd64, i386 and evbarm64-el) and for MIPS targets.

This can be avoided by building as root (not ideal) or by asking your
administrator to increase your limits in login.conf. These two variables
seem to be sufficient:
        :datasize=infinity:\
        :stacksize-cur=8M:\

NetBSD (earlier releases)
-------------------------

* Tested on NetBSD 1.5.2 (machine-independently).
* Should need no special setup.
* _NETBSD_SOURCE is *not* to be defined/pulled in during compat/tools builds.
  compat_defs.h will error out if it finds it defined. 

Solaris
-------

(updated instruction for Solaris 10 and 11 further below)

* Tested on Solaris/x86 8 (5.8) with gcc 2.95.2 and Solaris/sparc 8 (5.8)
  with gcc 3.2 (not yet tested with SUNWspro).

* $HOST_CC needs to be set properly (for gcc, it should be set to "gcc",
  otherwise the improper /usr/ucb/cc may be invoked by accident).

* The SUNWzlib package (or a built version of zlib visible to $HOST_CC,
  such as SMCzlib from sunfreeware.com) must be installed.  This will be
  fixed in the future to include zlib in libnbcompat.

* Needs the following paths, in this order, in $PATH:

      /usr/xpg4/bin
      /usr/ccs/bin
      <path to host C and C++ compilers>
      /usr/bin

  /usr/ucb may optionally be placed before /usr/bin, per your preference,
  but /usr/ucb *MUST NOT* be before /usr/ccs/bin or before the path to
  the host C and C++ compilers.


Solaris 10:

* Solaris 10 1/13 (u11)
 * POSIX.1-2001, SUSv3 (see standards(7))
 * Using gcc-5 from opencsw.org
 * Set PATH to /usr/xpg6/bin:/usr/xpg4/bin:/usr/bin:/usr/ccs/bin
 * Set HOST_CC to /opt/csw/bin/gcc
 * Set HOST_SH to /usr/bin/bash


Solaris 11:

* Solaris 11.3
 * POSIX.1-2001, SUSv3 (see standards(7))
 * Using gcc-12 from pkgsrc.org (installed in $GCC12INSTALLDIR)
 * Set PATH to /usr/xpg6/bin:/usr/xpg4/bin:/usr/bin:$GCC12INSTALLDIR/bin
 * Set HOST_CC to $GCC12INSTALLDIR/bin/gcc
 * Set HOST_SH to /usr/bin/bash

* Solaris 11.4 (CBE)
 * POSIX.1-2008, SUSv4 (see standards(7))
 * Using gcc-11
 * Set PATH to /usr/xpg7/bin:/usr/xpg6/bin:/usr/xpg4/bin:/usr/bin
 * Set HOST_CC to /usr/bin/gcc
 * Set HOST_SH to /usr/bin/bash

* Solaris 11.4 (SRU57)
 * POSIX.1-2008, SUSv4 (see standards(7))
 * Using gcc-12
 * Set PATH to /usr/xpg7/bin:/usr/xpg6/bin:/usr/xpg4/bin:/usr/bin
 * Set HOST_CC to /usr/bin/gcc
 * Set HOST_SH to /usr/bin/bash