rust-lang / rust

Empowering everyone to build reliable and efficient software.
https://www.rust-lang.org
Other
96.87k stars 12.52k forks source link

/usr/bin/ld: BFD (GNU Binutils for Ubuntu) 2.38 internal error, aborting at ../../bfd/merge.c:939 in _bfd_merged_section_offset #111956

Open John-Nagle opened 1 year ago

John-Nagle commented 1 year ago

Non-repeatable loader bug on large program.

Message says "please report this bug". So I did.

Meta

rustc --version --verbose:

rustc 1.69.0 (84c898d65 2023-04-16)

Error output

 = note: /usr/bin/ld: BFD (GNU Binutils for Ubuntu) 2.38 internal error, aborting at ../../bfd/merge.c:939 in _bfd_merged_section_offset
          /usr/bin/ld: Please report this bug.
          collect2: error: ld returned 1 exit status

error: could not compile `sharpview` due to previous error

loaderbug.txt

Noratrieb commented 1 year ago

BFD helpfully doesn't say where to report it. This here isn't quite the right place since this isn't our program it I'm not sure where to report it either. BFD probably has some bugzilla somewhere? Maybe @cuviper can help

cuviper commented 1 year ago

BFD is part of binutils, which uses Sourceware Bugzilla: https://sourceware.org/bugzilla/enter_bug.cgi?product=binutils

This report looks similar to bz 28037, which also came via Rust with issue #86734. But regardless of what weird things rustc might be producing, the internal error is firmly in binutils' hands.

Volker-Weissmann commented 1 year ago

@John-Nagle I had a similar problem and it turned out my installation was faulty: https://github.com/rust-lang/rust/issues/86734#issuecomment-1493337645

Maybe post the versions of the other binaries.

John-Nagle commented 1 year ago

I'm running a standard installation - Ubuntu 22.04 LTS, updated two days ago. Rust was installed with rustup update.

ld --version
GNU ld (GNU Binutils for Ubuntu) 2.38

It's not really the Rust developers' problem, but it's good to have this listed as a Rust ecosystem bug, so that others can find the bug report should they encounter it.