| @@ -1,74 +1,82 @@ | | | @@ -1,74 +1,82 @@ |
1 | $NetBSD: README.Linux,v 1.11 2022/05/01 08:06:46 nia Exp $ | | 1 | $NetBSD: README.Linux,v 1.12 2022/06/01 12:12:20 gdt Exp $ |
2 | | | 2 | |
3 | # General | | 3 | # General |
4 | | | 4 | |
5 | Generally, bootstrapping on GNU/Linux is expected to Just Work with | | 5 | Generally, bootstrapping on GNU/Linux is expected to Just Work with |
6 | gcc. | | 6 | gcc. |
7 | | | 7 | |
8 | # Compilers | | 8 | # Compilers |
9 | | | 9 | |
10 | ## gcc | | 10 | ## gcc |
11 | | | 11 | |
12 | gcc is the standard approach. | | 12 | gcc is the standard approach. |
13 | | | 13 | |
14 | As of 2022 it has been reported that systems with gcc 4.8 (e.g. RHEL7) | | 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. | | 15 | do not bootstrap, but that gcc7 (AWS-flavored RHEL7) and gcc8 (RHEL8) succeed. |
16 | | | 16 | |
17 | ## clang | | 17 | ## clang |
18 | | | 18 | |
19 | There are no reports of success or failure with clang. | | 19 | There are no reports of success or failure with clang. |
20 | | | 20 | |
21 | ## icc | | 21 | ## icc |
22 | | | 22 | |
23 | Long ago, it was reported that icc (Intel C++ Compiler) 8.0 and 8.1 | | 23 | It was reported in 2008 that icc (Intel C++ Compiler) 8.0 and 8.1 |
24 | have been tested on i386. See the old section at the end. | | 24 | have been tested on i386. See the old section at the end. |
25 | | | 25 | |
26 | # Debian and derivatives | | 26 | # Debian and derivatives |
27 | | | 27 | |
28 | For Debian and derivatives such as Ubuntu the following packages should be | | 28 | For Debian and derivatives such as Ubuntu the following packages should be |
29 | installed prior to attempting bootstrap: | | 29 | installed prior to attempting bootstrap: |
30 | | | 30 | |
31 | apt-get install cvs libncurses5 libncurses5-dev gcc g++ zlib1g-dev \ | | 31 | apt-get install cvs libncurses5 libncurses5-dev gcc g++ zlib1g-dev \ |
32 | zlib1g libssl-dev libudev-dev | | 32 | zlib1g libssl-dev libudev-dev |
33 | | | 33 | |
34 | # NixOS | | 34 | # NixOS |
35 | | | 35 | |
36 | stdenv.cc should be installed prior to attempting bootstrap. | | 36 | stdenv.cc should be installed prior to attempting bootstrap. |
37 | | | 37 | |
38 | Please note that if you run the Nix garbage collector and it collects | | 38 | Please note that if you run the Nix garbage collector and it collects |
39 | libc, every pkgsrc binary (including binaries generated during bootstrap) | | 39 | libc, every pkgsrc binary (including binaries generated during bootstrap) |
40 | will need to be rebuilt. | | 40 | will need to be rebuilt. |
41 | | | 41 | |
| | | 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 | |
42 | # RedHat and derivatives | | 50 | # RedHat and derivatives |
43 | | | 51 | |
44 | ## Old, undated, information | | 52 | ## Very old hints about libattr (2008) |
45 | | | 53 | |
46 | Some versions of Linux (RHEL3 Update 2 for i386 for example) have a | | 54 | 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 | | 55 | /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 | | 56 | dependency. However, libattr.la does not exist in /lib/libattr.la. If |
49 | this is the case, the bootstrap will fail with | | 57 | this is the case, the bootstrap will fail with |
50 | | | 58 | |
51 | grep: /lib/libattr.la: No such file or directory | | 59 | 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 | | 60 | /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 | | 61 | libtool: link: `/lib/libattr.la' is not a valid libtool archive |
54 | | | 62 | |
55 | The solution is to copy /usr/lib/libattr.la to /lib/libattr.la with: | | 63 | The solution is to copy /usr/lib/libattr.la to /lib/libattr.la with: |
56 | | | 64 | |
57 | cp -p /usr/lib/libattr.la /lib | | 65 | cp -p /usr/lib/libattr.la /lib |
58 | | | 66 | |
59 | # General old, undated information | | 67 | # Very old information |
60 | | | 68 | |
61 | ## Details of using icc | | 69 | ## Details of using icc (last update 2005 |
62 | | | 70 | |
63 | To bootstrap using icc, assuming the default icc installation | | 71 | To bootstrap using icc, assuming the default icc installation |
64 | directory: | | 72 | directory: |
65 | | | 73 | |
66 | env CC=/opt/intel_cc_80/bin/icc LDFLAGS=-static-libcxa \ | | 74 | env CC=/opt/intel_cc_80/bin/icc LDFLAGS=-static-libcxa \ |
67 | ac_cv___attribute__=yes ./bootstrap | | 75 | ac_cv___attribute__=yes ./bootstrap |
68 | | | 76 | |
69 | note: icc 8.1 needs the `-i-static' argument instead of | | 77 | note: icc 8.1 needs the `-i-static' argument instead of |
70 | -static-libcxa. | | 78 | -static-libcxa. |
71 | | | 79 | |
72 | icc supports __attribute__, but the GNU configure test uses a nested | | 80 | icc supports __attribute__, but the GNU configure test uses a nested |
73 | function, which icc does not support. #undef'ing __attribute__ has the | | 81 | function, which icc does not support. #undef'ing __attribute__ has the |
74 | unfortunate side-effect of breaking many of the Linux header files, which | | 82 | unfortunate side-effect of breaking many of the Linux header files, which |