Annotation of pkgsrc/bootstrap/README.Linux, revision 1.11
1.11 ! nia 1: $NetBSD: README.Linux,v 1.10 2022/04/07 15:16:55 gdt 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:
23: Long ago, it was reported that icc (Intel C++ Compiler) 8.0 and 8.1
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.10 gdt 42: # RedHat and derivatives
43:
44: ## Old, undated, information
1.6 sevan 45:
1.4 dmcmahil 46: Some versions of Linux (RHEL3 Update 2 for i386 for example) have a
47: /usr/lib/libacl.la libtool archive file that lists /lib/libattr.la as a
48: dependency. However, libattr.la does not exist in /lib/libattr.la. If
49: this is the case, the bootstrap will fail with
50:
51: grep: /lib/libattr.la: No such file or directory
52: /usr/pkgsrc/bootstrap/work/wrk/pkgtools/pkg_install/work/.tools/bin/sed: can't read /lib/libattr.la: No such file or directory
53: libtool: link: `/lib/libattr.la' is not a valid libtool archive
54:
1.5 prlw1 55: The solution is to copy /usr/lib/libattr.la to /lib/libattr.la with:
1.4 dmcmahil 56:
57: cp -p /usr/lib/libattr.la /lib
58:
1.10 gdt 59: # General old, undated information
1.4 dmcmahil 60:
1.10 gdt 61: ## Details of using icc
1.2 grant 62:
63: To bootstrap using icc, assuming the default icc installation
64: directory:
65:
66: env CC=/opt/intel_cc_80/bin/icc LDFLAGS=-static-libcxa \
67: ac_cv___attribute__=yes ./bootstrap
68:
1.3 grant 69: note: icc 8.1 needs the `-i-static' argument instead of
70: -static-libcxa.
71:
1.2 grant 72: icc supports __attribute__, but the GNU configure test uses a nested
73: function, which icc does not support. #undef'ing __attribute__ has the
74: unfortunate side-effect of breaking many of the Linux header files, which
75: cannot be compiled properly without __attribute__. The test must be
76: overridden so that __attribute__ is assumed supported by the compiler.
77:
78: After bootstrapping, you should set PKGSRC_COMPILER in mk.conf:
79:
80: PKGSRC_COMPILER=icc
81:
82: The default installation directory for icc is /opt/intel_cc_80, which
83: is also the pkgsrc default. If you have installed it into a different
84: directory, set ICCBASE in mk.conf:
85:
86: ICCBASE=/opt/icc
87:
88: pkgsrc uses the static linking method of the runtime libraries
89: provided by icc, so binaries can be run on other systems which do not
90: have the shared libraries installed.
91:
92: Libtool, however, extracts a list of libraries from the ld(1) command
93: run when linking a C++ shared library and records it, throwing away
94: the -Bstatic and -Bdynamic options interspersed between the libraries.
95: This means that libtool-linked C++ shared libraries will have a
96: runtime dependency on the icc libraries until this is fixed in
97: libtool.
CVSweb <webmaster@jp.NetBSD.org>