Linking fails on x86_64-unknown-linux-musl

Builds of my drivers have started failing to link on x86_64-unknown-linux-musl. At first I thought it was a nightly mishap but now it also happens on the beta channel.
Here the relevant messages:

/usr/bin/ld: elf.o: access beyond end of merged section (2531)
....
/usr/bin/ld: /home/travis/.rustup/toolchains/beta-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-musl/lib/libbacktrace_sys-8a74141a1d23839e.rlib(elf.o)(.debug_info+0x1af8): reloc against `.text.elf_add': error 2
/usr/bin/ld: final link failed: Nonrepresentable section on output

See the build log here

Do you know how to solve this?

There was a regression causing builds to have troubles with older binutils versions: ripgrep fails to build with MUSL on Linux since the nightly release on 2019-03-15 · Issue #59411 · rust-lang/rust · GitHub

You should be able to switch travis to use a newer Ubuntu version to work around it.

1 Like

I see. I will do that. Thanks!

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.