Stream: t-compiler

Topic: crosscompiling to 32 bit


nikomatsakis (Apr 20 2020 at 22:21, on Zulip):

Hey so I want to build 32 bit rust on my system but I'm getting weird errors:

running: "ccache" "cc" "-O3" "-ffunction-sections" "-fdata-sections" "-fPIC" "-g" "-fno-omit-frame-pointer" "-m32" "-march=i686" "-ffunction-sections" "-fdata-sections" "-fPIC" "-m32" "-march=i686" "-fno-bu\
iltin" "-fvisibility=hidden" "-ffreestanding" "-DVISIBILITY_HIDDEN" "-o" "/home/nmatsakis/versioned/rust-0/build/x86_64-unknown-linux-gnu/stage2-std/i686-unknown-linux-gnu/release/build/compiler_builtins-94\
9a2f6c06b0e215/out/absvdi2.o" "-c" "/home/nmatsakis/versioned/rust-0/src/llvm-project/compiler-rt/lib/builtins/absvdi2.c"
cargo:warning=In file included from /usr/lib/gcc/x86_64-linux-gnu/9/include-fixed/limits.h:194,
cargo:warning=                 from /usr/lib/gcc/x86_64-linux-gnu/9/include-fixed/syslimits.h:7,
cargo:warning=                 from /usr/lib/gcc/x86_64-linux-gnu/9/include-fixed/limits.h:34,
cargo:warning=                 from /home/nmatsakis/versioned/rust-0/src/llvm-project/compiler-rt/lib/builtins/int_lib.h:76,
cargo:warning=                 from /home/nmatsakis/versioned/rust-0/src/llvm-project/compiler-rt/lib/builtins/absvdi2.c:13:
cargo:warning=/usr/include/limits.h:26:10: fatal error: bits/libc-header-start.h: No such file or directory
cargo:warning=   26 | #include <bits/libc-header-start.h>
cargo:warning=      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~
cargo:warning=compilation terminated.
exit code: 1
nikomatsakis (Apr 20 2020 at 22:21, on Zulip):

I'm imagining I probably need to install some packages or something

nikomatsakis (Apr 20 2020 at 22:22, on Zulip):

I'm running Ubuntu Server

nikomatsakis (Apr 20 2020 at 22:22, on Zulip):

anybody have any ideas?

Wesley Wiser (Apr 21 2020 at 00:47, on Zulip):

Perhaps https://stackoverflow.com/a/53496910/124538?

nikomatsakis (Apr 21 2020 at 01:05, on Zulip):

sudo apt install gcc-multilib

did the trick

Last update: Jun 04 2020 at 18:25UTC