Annotation of pkgsrc/bootstrap/README.Linux, revision 1.12

1.12    ! gdt         1: $NetBSD: README.Linux,v 1.11 2022/05/01 08:06:46 nia Exp $
1.1       grant       2: 
1.10      gdt         3: # General
1.1       grant       4: 
1.10      gdt         5: Generally, bootstrapping on GNU/Linux is expected to Just Work with
                      6: gcc.
                      7: 
                      8: # Compilers
                      9: 
                     10: ## gcc
                     11: 
                     12: gcc is the standard approach.
                     13: 
                     14: As of 2022 it has been reported that systems with gcc 4.8 (e.g. RHEL7)
                     15: do not bootstrap, but that gcc7 (AWS-flavored RHEL7) and gcc8 (RHEL8) succeed.
                     16: 
                     17: ## clang
                     18: 
                     19: There are no reports of success or failure with clang.
                     20: 
                     21: ## icc
                     22: 
1.12    ! gdt        23: It was reported in 2008 that icc (Intel C++ Compiler) 8.0 and 8.1
1.10      gdt        24: have been tested on i386.  See the old section at the end.
                     25: 
                     26: # Debian and derivatives
1.4       dmcmahil   27: 
1.6       sevan      28: For Debian and derivatives such as Ubuntu the following packages should be
1.10      gdt        29: installed prior to attempting bootstrap:
1.6       sevan      30: 
1.9       cjep       31: apt-get install cvs libncurses5 libncurses5-dev gcc g++ zlib1g-dev \
                     32:                        zlib1g libssl-dev libudev-dev
1.6       sevan      33: 
1.11      nia        34: # NixOS
                     35: 
                     36: stdenv.cc should be installed prior to attempting bootstrap.
                     37: 
                     38: Please note that if you run the Nix garbage collector and it collects
                     39: libc, every pkgsrc binary (including binaries generated during bootstrap)
                     40: will need to be rebuilt.
                     41: 
1.12    ! gdt        42: # musl
        !            43: 
        !            44: Linux with musl was reported to work in 2022.
        !            45: 
        !            46: # Termux (Android)
        !            47: 
        !            48: In 2022, unprivileged bootstrap failed.
        !            49: 
1.10      gdt        50: #  RedHat and derivatives
                     51: 
1.12    ! gdt        52: ## Very old hints about libattr (2008)
1.6       sevan      53: 
1.4       dmcmahil   54: Some versions of Linux (RHEL3 Update 2 for i386 for example) have a
                     55: /usr/lib/libacl.la libtool archive file that lists /lib/libattr.la as a
                     56: dependency.  However, libattr.la does not exist in /lib/libattr.la.  If
                     57: this is the case, the bootstrap will fail with
                     58: 
                     59: grep: /lib/libattr.la: No such file or directory
                     60: /usr/pkgsrc/bootstrap/work/wrk/pkgtools/pkg_install/work/.tools/bin/sed: can't read /lib/libattr.la: No such file or directory
                     61: libtool: link: `/lib/libattr.la' is not a valid libtool archive
                     62: 
1.5       prlw1      63: The solution is to copy /usr/lib/libattr.la to /lib/libattr.la with:
1.4       dmcmahil   64: 
                     65: cp -p /usr/lib/libattr.la /lib
                     66: 
1.12    ! gdt        67: # Very old information
1.4       dmcmahil   68: 
1.12    ! gdt        69: ## Details of using icc (last update 2005
1.2       grant      70: 
                     71: To bootstrap using icc, assuming the default icc installation
                     72: directory:
                     73: 
                     74:        env CC=/opt/intel_cc_80/bin/icc LDFLAGS=-static-libcxa \
                     75:                ac_cv___attribute__=yes ./bootstrap
                     76: 
1.3       grant      77: note: icc 8.1 needs the `-i-static' argument instead of
                     78: -static-libcxa.
                     79: 
1.2       grant      80: icc supports __attribute__, but the GNU configure test uses a nested
                     81: function, which icc does not support. #undef'ing __attribute__ has the
                     82: unfortunate side-effect of breaking many of the Linux header files, which
                     83: cannot be compiled properly without __attribute__. The test must be
                     84: overridden so that __attribute__ is assumed supported by the compiler.
                     85: 
                     86: After bootstrapping, you should set PKGSRC_COMPILER in mk.conf:
                     87: 
                     88:        PKGSRC_COMPILER=icc
                     89: 
                     90: The default installation directory for icc is /opt/intel_cc_80, which
                     91: is also the pkgsrc default. If you have installed it into a different
                     92: directory, set ICCBASE in mk.conf:
                     93: 
                     94:        ICCBASE=/opt/icc
                     95: 
                     96: pkgsrc uses the static linking method of the runtime libraries
                     97: provided by icc, so binaries can be run on other systems which do not
                     98: have the shared libraries installed.
                     99: 
                    100: Libtool, however, extracts a list of libraries from the ld(1) command
                    101: run when linking a C++ shared library and records it, throwing away
                    102: the -Bstatic and -Bdynamic options interspersed between the libraries.
                    103: This means that libtool-linked C++ shared libraries will have a
                    104: runtime dependency on the icc libraries until this is fixed in
                    105: libtool.

CVSweb <webmaster@jp.NetBSD.org>