[Pkg-rust-maintainers] Bug#913414: rustc: fails to compile release binaries due to non -fPIC code

brian m. carlson sandals at crustytoothpaste.net
Sat Nov 10 18:31:25 GMT 2018


Package: rustc
Version: 1.30.0+dfsg1-2
Severity: important

If you attempt to build a release binary, rustc fails because of a bad
relocation when making a PIE object.

Steps to reproduce:
1. git clone https://github.com/rust-lang-nursery/rust-clippy.git
2. cd rust-clippy
3. git checkout v0.0.212
4. cargo build --verbose --release
5. Notice that the build fails.
6. Notice messages like the following:

  = note: /usr/bin/ld: /home/bmc/checkouts/external/rust-clippy/target/release/build/serde-3ddadc5e75c3de00/build_script_build-3ddadc5e75c3de00.build_script_build.140spq3r-cgu.2.rcgu.o: relocation R_X86_64_32S against `.rodata.cst16' can not be used when making a PIE object; recompile with -fPIC
          /usr/bin/ld: /home/bmc/checkouts/external/rust-clippy/target/release/build/serde-3ddadc5e75c3de00/build_script_build-3ddadc5e75c3de00.build_script_build.140spq3r-cgu.4.rcgu.o: relocation R_X86_64_32 against symbol `rust_eh_personality' can not be used when making a PIE object; recompile with -fPIC
          /usr/bin/ld: /home/bmc/checkouts/external/rust-clippy/target/release/build/serde-3ddadc5e75c3de00/build_script_build-3ddadc5e75c3de00.build_script_build.140spq3r-cgu.6.rcgu.o: relocation R_X86_64_32 against symbol `rust_eh_personality' can not be used when making a PIE object; recompile with -fPIC
          /usr/bin/ld: /home/bmc/checkouts/external/rust-clippy/target/release/build/serde-3ddadc5e75c3de00/build_script_build-3ddadc5e75c3de00.build_script_build.140spq3r-cgu.9.rcgu.o: relocation R_X86_64_32 against symbol `rust_eh_personality' can not be used when making a PIE object; recompile with -fPIC
          /usr/bin/ld: final link failed: nonrepresentable section on output
          collect2: error: ld returned 1 exit status

I see similar errors on a project of my own which compiled fine on
November 3.  I also see this failure with rust 1.31.0 beta from
experimental.

-- System Information:
Debian Release: buster/sid
  APT prefers unstable-debug
  APT policy: (500, 'unstable-debug'), (500, 'unstable'), (500, 'stable'), (1, 'experimental-debug'), (1, 'experimental')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 4.18.0-2-amd64 (SMP w/4 CPU cores)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8), LANGUAGE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled

Versions of packages rustc depends on:
ii  binutils              2.31.1-7
ii  gcc                   4:8.2.0-2
ii  libc6                 2.27-8
ii  libc6-dev [libc-dev]  2.27-8
ii  libgcc1               1:8.2.0-9
ii  libllvm7              1:7.0.1~+rc2-2
ii  libstd-rust-dev       1.30.0+dfsg1-2
ii  libstdc++6            8.2.0-9

Versions of packages rustc recommends:
ii  cargo     0.31.0-2
ii  rust-gdb  1.30.0+dfsg1-2

Versions of packages rustc suggests:
ii  rust-doc  1.30.0+dfsg1-2
pn  rust-src  <none>

-- no debconf information

-- 
brian m. carlson: Houston, Texas, US
OpenPGP: https://keybase.io/bk2204
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 868 bytes
Desc: not available
URL: <http://alioth-lists.debian.net/pipermail/pkg-rust-maintainers/attachments/20181110/7c8991ab/attachment.sig>


More information about the Pkg-rust-maintainers mailing list