Skip to content

Bootstrapping i686->i686 on x86_64 host fails in stage0 #36800

Closed
@nagisa

Description

@nagisa
$ python src/bootstrap/bootstrap.py --step rustc --stage 1 -j8 --target=i686-unknown-linux-gnu
    Finished debug [unoptimized + debuginfo] target(s) in 0.0 secs
Synchronizing submodule url for 'src/compiler-rt'
Synchronizing submodule url for 'src/jemalloc'
Synchronizing submodule url for 'src/liblibc'
Synchronizing submodule url for 'src/llvm'
Synchronizing submodule url for 'src/rt/hoedown'
Synchronizing submodule url for 'src/rust-installer'
HEAD is now at 8598065 Rust: fix MSVC-built lib pulling in other lib files
HEAD is now at e058ca6 Change how the default zone is found
HEAD is now at eb708c0 Auto merge of #402 - tmiasko:getaddrinfo-error-codes, r=alexcrichton
HEAD is now at a3736a0 Merge pull request #6 from intelfx/patch-1
HEAD is now at 755bc3d Merge pull request #48 from Diggsey/master
Building stage0 std artifacts (i686-unknown-linux-gnu -> i686-unknown-linux-gnu)
   Compiling compiler_builtins v0.0.0 (file:///home/nagisa/Documents/rust/rust/worktrees/more-cace/src/libcompiler_builtins)
   Compiling std v0.0.0 (file:///home/nagisa/Documents/rust/rust/worktrees/more-cace/src/libstd)
   Compiling std_shim v0.1.0 (file:///home/nagisa/Documents/rust/rust/worktrees/more-cace/src/rustc/std_shim)
    Finished release [optimized] target(s) in 15.57 secs
Building stage0 test artifacts (i686-unknown-linux-gnu -> i686-unknown-linux-gnu)
   Compiling term v0.0.0 (file:///home/nagisa/Documents/rust/rust/worktrees/more-cace/src/libterm)
   Compiling getopts v0.0.0 (file:///home/nagisa/Documents/rust/rust/worktrees/more-cace/src/libgetopts)
error: linking with `cc` failed: exit code: 1
  |
  = note: "cc" "-Wl,--as-needed" "-Wl,-z,noexecstack" "-m32" "-L" "/home/nagisa/Documents/rust/rust/worktrees/more-cace/build/i686-unknown-linux-gnu/stage0-sysroot/lib/rustlib/i686-unknown-linux-gnu/lib" "/home/nagisa/Documents/rust/rust/worktrees/more-cace/build/i686-unknown-linux-gnu/stage0-test/i686-unknown-linux-gnu/release/deps/getopts-603f5ee4adfd7630.0.o" "/home/nagisa/Documents/rust/rust/worktrees/more-cace/build/i686-unknown-linux-gnu/stage0-test/i686-unknown-linux-gnu/release/deps/getopts-603f5ee4adfd7630.1.o" "/home/nagisa/Documents/rust/rust/worktrees/more-cace/build/i686-unknown-linux-gnu/stage0-test/i686-unknown-linux-gnu/release/deps/getopts-603f5ee4adfd7630.2.o" "/home/nagisa/Documents/rust/rust/worktrees/more-cace/build/i686-unknown-linux-gnu/stage0-test/i686-unknown-linux-gnu/release/deps/getopts-603f5ee4adfd7630.3.o" "-o" "/home/nagisa/Documents/rust/rust/worktrees/more-cace/build/i686-unknown-linux-gnu/stage0-test/i686-unknown-linux-gnu/release/deps/libgetopts-603f5ee4adfd7630.so" "/home/nagisa/Documents/rust/rust/worktrees/more-cace/build/i686-unknown-linux-gnu/stage0-test/i686-unknown-linux-gnu/release/deps/getopts-603f5ee4adfd7630.metadata.o" "-Wl,-O1" "-nodefaultlibs" "-L" "/home/nagisa/Documents/rust/rust/worktrees/more-cace/build/i686-unknown-linux-gnu/stage0-test/i686-unknown-linux-gnu/release/deps" "-L" "/home/nagisa/Documents/rust/rust/worktrees/more-cace/build/i686-unknown-linux-gnu/stage0-sysroot/lib/rustlib/i686-unknown-linux-gnu/lib" "-Wl,-Bstatic" "-Wl,-Bdynamic" "-L" "/home/nagisa/Documents/rust/rust/worktrees/more-cace/build/i686-unknown-linux-gnu/stage0-sysroot/lib/rustlib/i686-unknown-linux-gnu/lib" "-l" "std-015eff4399913833" "-l" "dl" "-l" "rt" "-l" "pthread" "-l" "gcc_s" "-l" "c" "-l" "m" "-l" "rt" "-l" "util" "-shared" "-Wl,-rpath,$ORIGIN/../lib" "-l" "compiler-rt"
  = note: /usr/bin/ld: /home/nagisa/Documents/rust/rust/worktrees/more-cace/build/i686-unknown-linux-gnu/stage0-sysroot/lib/rustlib/i686-unknown-linux-gnu/lib/libstd-015eff4399913833.so: __moddi3: invalid version 21 (max 0)
/home/nagisa/Documents/rust/rust/worktrees/more-cace/build/i686-unknown-linux-gnu/stage0-sysroot/lib/rustlib/i686-unknown-linux-gnu/lib/libstd-015eff4399913833.so: error adding symbols: Bad value
collect2: error: ld returned 1 exit status

Some manual bisection shows that it stared happening after rust_builtins PR got merged.

Removing a number of assembly specialisations for i386 makes stuff compile.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions