104 lines
2.9 KiB
Text
104 lines
2.9 KiB
Text
$NetBSD: README.Linux,v 1.14 2022/06/15 20:17:32 schmonz Exp $
|
|
|
|
# General
|
|
|
|
Generally, bootstrapping on GNU/Linux is expected to Just Work with
|
|
gcc.
|
|
|
|
# Compilers
|
|
|
|
## gcc
|
|
|
|
gcc is the standard approach.
|
|
|
|
As of 2022 it has been reported that systems with gcc 4.8 (e.g. RHEL7)
|
|
do not bootstrap, but that gcc7 (AWS-flavored RHEL7) and gcc8 (RHEL8) succeed.
|
|
|
|
## clang
|
|
|
|
There are no reports of success or failure with clang.
|
|
|
|
## icc
|
|
|
|
It was reported in 2008 that icc (Intel C++ Compiler) 8.0 and 8.1
|
|
have been tested on i386. See the old section at the end.
|
|
|
|
# Alpine and derivatives
|
|
|
|
After bootstrap, if you want to be using pkgsrc build/install locking,
|
|
install a more featureful ps(1) than BusyBox's:
|
|
|
|
apk add procps
|
|
|
|
You may also find that pkgsrc needs a more featureful date(1),
|
|
such as GNU's:
|
|
|
|
apk add coreutils
|
|
|
|
# Debian and derivatives
|
|
|
|
For Debian and derivatives such as Ubuntu the following packages should be
|
|
installed prior to attempting bootstrap:
|
|
|
|
apt-get install cvs libncurses5 libncurses5-dev gcc g++ zlib1g-dev \
|
|
zlib1g libssl-dev libudev-dev
|
|
|
|
# RedHat and derivatives
|
|
|
|
In 2022, pkgsrc bootstrapped ok on RHEL 8.5, and packages generally worked.
|
|
|
|
# NixOS
|
|
|
|
stdenv.cc should be installed prior to attempting bootstrap.
|
|
|
|
Please note that if you run the Nix garbage collector and it collects
|
|
libc, every pkgsrc binary (including binaries generated during bootstrap)
|
|
will need to be rebuilt.
|
|
|
|
# musl
|
|
|
|
Linux with musl was reported to work in 2022.
|
|
|
|
# Termux (Android)
|
|
|
|
In 2022, unprivileged bootstrap failed.
|
|
|
|
# Very old information
|
|
|
|
## Details of using icc (last update 2005
|
|
|
|
To bootstrap using icc, assuming the default icc installation
|
|
directory:
|
|
|
|
env CC=/opt/intel_cc_80/bin/icc LDFLAGS=-static-libcxa \
|
|
ac_cv___attribute__=yes ./bootstrap
|
|
|
|
note: icc 8.1 needs the `-i-static' argument instead of
|
|
-static-libcxa.
|
|
|
|
icc supports __attribute__, but the GNU configure test uses a nested
|
|
function, which icc does not support. #undef'ing __attribute__ has the
|
|
unfortunate side-effect of breaking many of the Linux header files, which
|
|
cannot be compiled properly without __attribute__. The test must be
|
|
overridden so that __attribute__ is assumed supported by the compiler.
|
|
|
|
After bootstrapping, you should set PKGSRC_COMPILER in mk.conf:
|
|
|
|
PKGSRC_COMPILER=icc
|
|
|
|
The default installation directory for icc is /opt/intel_cc_80, which
|
|
is also the pkgsrc default. If you have installed it into a different
|
|
directory, set ICCBASE in mk.conf:
|
|
|
|
ICCBASE=/opt/icc
|
|
|
|
pkgsrc uses the static linking method of the runtime libraries
|
|
provided by icc, so binaries can be run on other systems which do not
|
|
have the shared libraries installed.
|
|
|
|
Libtool, however, extracts a list of libraries from the ld(1) command
|
|
run when linking a C++ shared library and records it, throwing away
|
|
the -Bstatic and -Bdynamic options interspersed between the libraries.
|
|
This means that libtool-linked C++ shared libraries will have a
|
|
runtime dependency on the icc libraries until this is fixed in
|
|
libtool.
|