• 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.

Loading...

Available keyboard shortcuts

Tasklist

Task Details

Task Editing