• Status New
  • Percent Complete
    0%
  • Task Type Bug Report
  • Category Packages → Packages: Build-list
  • Assigned To No-one
  • Operating System i686
  • Severity Low
  • Priority Medium
  • Reported Version
  • Due in Version Undecided
  • Due Date Undecided
  • Votes
  • Private
Attached to Project: Archlinux32
Opened by Andreas Baumann - 12.05.2019

FS#71 - rust doesn't rebuild

We need llvm 7.0 instead of 7.1.
If we muss a llvm update, bootstrapping rust fails (due to a to old libLLVM.so).
defined multiple times

  1. -> /build/rust/src/rustc-1.34.1-src/build/i686-unknown-linux-gnu/stage2-tools/i686-unknown-linux-gnu/release/build/typenum-02dad87448159bce/out/consts.rs:2112:5

|
2110 | pub type U1024 = UInt, B0>, B0>, B0>, B0>, B0>, B0>, B0>, B0>, B0>, B0>;

   |     ------------------------------------------------------------------------------------------------------------------------------------- previous definition of the type `U1024` here

2111 | pub type P1024 = PInt; pub type N1024 = NInt;
2112 | pub type U1024 = UInt, B0>, B0>, B0>, B0>, B0>, B0>, B0>, B0>, B0>, B0>;

   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `U1024` redefined here

https://github.com/paholg/typenum/commit/14a3322d1081fd63d5eb44bf8ab8f90676208228

Can anobody tell me, how we apply patches to downloaded artifacts while building?!

Admin
Erich Eckner commented on 13.05.2019 04:32

> Can anobody tell me, how we apply patches to downloaded artifacts while building?!

I only have a racy solutions for that. Put the following at the start of build():

while true; do
find $rust-build-dir-path -type f -name $name-to-patch -execdir patch -p1 -i $srcdir/patch \; && break
done &

Admin
Erich Eckner commented on 29.07.2019 09:25

trying to compile rust 1.34 with llvm-libs 7:

error[E0428]: the name `U1024` is defined multiple times
    --> /build/rust/src/rustc-1.34.0-src/build/i686-unknown-linux-gnu/stage2-tools/i686-unknown-linux-gnu/release/build/typenum-101079a7a9ba8c17/out/consts.rs:2112:5
     |
2110 |     pub type U1024 = UInt, B0>, B0>, B0>, B0>, B0>, B0>, B0>, B0>, B0>, B0>;
     |     ------------------------------------------------------------------------------------------------------------------------------------- previous definition of the type `U1024` here
2111 |     pub type P1024 = PInt; pub type N1024 = NInt;
2112 |     pub type U1024 = UInt, B0>, B0>, B0>, B0>, B0>, B0>, B0>, B0>, B0>, B0>;
     |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `U1024` redefined here
     |
     = note: `U1024` must be defined only once in the type namespace of this module

error[E0428]: the name `P1024` is defined multiple times
    --> /build/rust/src/rustc-1.34.0-src/build/i686-unknown-linux-gnu/stage2-tools/i686-unknown-linux-gnu/release/build/typenum-101079a7a9ba8c17/out/consts.rs:2113:5
     |
2111 |     pub type P1024 = PInt; pub type N1024 = NInt;
     |     ----------------------------- previous definition of the type `P1024` here
2112 |     pub type U1024 = UInt, B0>, B0>, B0>, B0>, B0>, B0>, B0>, B0>, B0>, B0>;
2113 |     pub type P1024 = PInt; pub type N1024 = NInt;
     |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `P1024` redefined here
     |
     = note: `P1024` must be defined only once in the type namespace of this module

error[E0428]: the name `N1024` is defined multiple times
    --> /build/rust/src/rustc-1.34.0-src/build/i686-unknown-linux-gnu/stage2-tools/i686-unknown-linux-gnu/release/build/typenum-101079a7a9ba8c17/out/consts.rs:2113:35
     |
2111 |     pub type P1024 = PInt; pub type N1024 = NInt;
     |                                   ----------------------------- previous definition of the type `N1024` here
2112 |     pub type U1024 = UInt, B0>, B0>, B0>, B0>, B0>, B0>, B0>, B0>, B0>, B0>;
2113 |     pub type P1024 = PInt; pub type N1024 = NInt;
     |                                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `N1024` redefined here
     |
     = note: `N1024` must be defined only once in the type namespace of this module

error: aborting due to 3 previous errors
Admin
Erich Eckner commented on 29.07.2019 09:32

let's try again with:

  while true; do
    sed -i '
      2112 { /pub type U1024/ d }
      2113 { /pub type P1024/ d }
    ' build/i686-unknown-linux-gnu/stage2-tools/i686-unknown-linux-gnu/release/build/typenum-101079a7a9ba8c17/out/consts.rs 2>/dev/null || true
  done &

injected in build() ... which is the mother of all race conditions

Admin
Erich Eckner commented on 30.07.2019 08:36

current error:

error: this file contains an un-closed delimiter
   --> /build/rust/src/rustc-1.34.0-src/build/i686-unknown-linux-gnu/stage2-tools/i686-unknown-linux-gnu/release/build/typenum-101079a7a9ba8c17/out/consts.rs:482:56
    |
54  | pub mod consts {
    |                - un-closed delimiter
...
482 |     pub type U210 = UInt`, const, identifier, lifetime, or type, found `}`
   --> /build/rust/src/rustc-1.34.0-src/build/i686-unknown-linux-gnu/stage2-tools/i686-unknown-linux-gnu/release/build/typenum-101079a7a9ba8c17/out/consts.rs:482:55
    |
482 |     pub type U210 = UInt`, const, identifier, lifetime, or type here

error: aborting due to 2 previous errors

error: Could not compile `typenum`.
warning: build failed, waiting for other jobs to finish...
error: build failed

trying again with some even-more-racing build()

build() {
  cd "rustc-$pkgver-src"

  while true; do
    find build/i686-unknown-linux-gnu/stage2-tools/i686-unknown-linux-gnu/release/build \
      -type f \
      -name consts.rs \
      -exec grep -qF 'pub type P1024' {} \; \
      -exec sleep 1 \; \
      -exec sed -i '
        2112 { /pub type U1024/ d }
        2113 { /pub type P1024/ d }
      ' {} \; 2>/dev/null || true
  done &
  _kill_pid=$!

  python2 ./x.py build -j"$(nproc)"
  kill $_kill_pid
}
Admin
Erich Eckner commented on 30.07.2019 13:03

this is super-annoying: now the old "duplicate definition" error is back ... but in package_rust()
Let's build again (for several hours O.o) with this hack also applied in package_rust() ...

Admin
Erich Eckner commented on 30.07.2019 18:41

whoah, even more fun:

warning: the feature `try_from` has been stable since 1.34.0 and no longer requires an attribute to enable
  --> src/tools/clippy/clippy_lints/src/lib.rs:12:12
   |
12 | #![feature(try_from)]
   |            ^^^^^^^^
   |
   = note: #[warn(stable_features)] on by default

warning: the feature `try_from` has been stable since 1.34.0 and no longer requires an attribute to enable
  --> src/tools/clippy/clippy_lints/src/lib.rs:12:12
   |
12 | #![feature(try_from)]
   |            ^^^^^^^^
   |
   = note: #[warn(stable_features)] on by default

warning: the feature `try_from` has been stable since 1.34.0 and no longer requires an attribute to enable
 --> src/tools/clippy/src/driver.rs:4:12
  |
4 | #![feature(try_from)]
  |            ^^^^^^^^
  |
  = note: #[warn(stable_features)] on by default

    Finished release [optimized] target(s) in 9m 17s
Building stage2 tool rls (i686-unknown-linux-gnu)
error: the listed checksum of `/build/rust/src/rustc-1.34.0-src/vendor/rustc-ap-rustc_target/spec/i686_unknown_linux_gnu.rs` has changed:
expected: a75a6025d7e3424edf9baf3039056c0f8eea157631a175d00ac5a218aa54b510
actual:   484bf8be15015b330fa9a97b6dabb8c7627e59d5cddb2dd0e83478749f8aabad

directory sources are not intended to be edited, if modifications are required then it is recommended that [replace] is used with a forked copy of the source
command did not execute successfully: "/usr/bin/cargo" "build" "--target" "i686-unknown-linux-gnu" "-j" "4" "--release" "--frozen" "--manifest-path" "/build/rust/src/rustc-1.34.0-src/src/tools/rls/Cargo.toml" "--features" "clippy" "--message-format" "json"
expected success, got: exit code: 101
thread 'main' panicked at 'Unable to build RLS', src/bootstrap/dist.rs:65:9
note: Run with `RUST_BACKTRACE=1` environment variable to display a backtrace.
failed to run: /build/rust/src/rustc-1.34.0-src/build/bootstrap/debug/bootstrap install
Build completed unsuccessfully in 2:02:38
Admin
Erich Eckner commented on 08.08.2019 06:18

current approach: using rust-1.36 from manjaro32 (thanks, jonathon!) ... this fails in stage 1, because it does not find some library, which actually _is_ there (but apparently not in the search path).

Admin
Erich Eckner commented on 09.08.2019 05:16

symlinking the library to the correct one hidden in some "stage1" folder solved it. Now we have rust 1.36 for i686 in [build-support] - let's hope some build slave can build a regular rust (e.g. one where I do not extract additional files with bsdtar into the build chroot) from that and we can close this bug report.

Admin
Andreas Baumann commented on 22.08.2019 07:43

Rebuilds of rust on i686 and pentium4 show:

--- stderr
error: couldn't load codegen backend "/usr/lib/rustlib/i686-unknown-linux-gnu/codegen-backends/librustc_codegen_llvm-llvm.so": "libLLVM-7.so: cannot open shared object file: No such file or directory"
Admin
Andreas Baumann commented on 22.08.2019 09:56

Tried with precompiled binaries (AUR package 'rust-bin'):

https://aur.archlinux.org/packages/rust-bin/

Compiling 1.37.0 from source now results in LLVM: out of memory,
see also:

https://github.com/rust-lang/rust/issues/60294

Admin
Andreas Baumann commented on 22.08.2019 10:10

Fedora 31 will also complain, so there is a chance Rust people are actually doing something
and not just ignoring us:

https://bugzilla.redhat.com/show_bug.cgi?id=1723064

Admin
Andreas Baumann commented on 08.09.2019 14:29

Asked upstream about how rust is supposed to be built on a machine with 32-bit
address space:

https://github.com/rust-lang/rust/issues/60294

–debuginfo-level-std=1

in config.toml

works over the first out of memory situations.

Now I get:

error: failed to run custom build command for `backtrace-sys v0.1.27`

Caused by:

process didn't exit successfully: `/build/rust/src/rustc-1.37.0-src/build/i686-unknown-linux-gnu/stage2-std/release/build/backtrace-sys-e11a26709e2be131/build-script-build` (exit code: 101)

— stdout

command did not execute successfully: "/usr/bin/cargo" "build" "–target" "x86_64-unknown-linux-gnu" "-j" "1" "–release" "–frozen" "–features" "panic-unwind backtrace profiler" "–manifest-path" "/build/rust/src/rustc-1.37.0-src/src/libstd/Cargo.toml" "–message-format" "json"
expected success, got: exit code: 101

', /build/rust/src/rustc-1.37.0-src/vendor/cc/src/lib.rs:2398:5
stack backtrace:

 0: std::panicking::default_hook::{{closure}}
 1: std::panicking::default_hook
 2: std::panicking::rust_panic_with_hook
 3: std::panicking::continue_panic_fmt
 4: std::panicking::begin_panic_fmt
 5: cc::fail
           at /build/rust/src/rustc-1.37.0-src/vendor/cc/src/lib.rs:2398
 6: cc::Build::compile
           at /build/rust/src/rustc-1.37.0-src/vendor/cc/src/lib.rs:951
 7: build_script_build::main
           at ./build.rs:107
 8: std::rt::lang_start::{{closure}}
 8: std::rt::lang_start::{{closure}}
           at /rustc/eae3437dfe991621e8afdc82734f4a172d7ddf9b/src/libstd/rt.rs:64

note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.

I'm personally quite fed up with the quality and documentation of this compiler..

Admin
Andreas Baumann commented on 09.09.2019 06:43

cargo:warning=cc1: sorry, unimplemented: 64-bit mode not compiled in

Does this mean that the architecture triplet is wrong?

Admin
Andreas Baumann commented on 09.09.2019 18:03

Indeed. Fixed config.toml, which was completely wrong ([build] had a amd64 target,
building for two architectures instead one (i686)..

Admin
Andreas Baumann commented on 12.09.2019 07:13

pentium4 went through, trying now the sed trick above on the i686 version..

Loading...

Available keyboard shortcuts

Tasklist

Task Details

Task Editing