Date: Tue, 21 Feb 2023 10:54:07 +0100 From: Dimitry Andric <dim@FreeBSD.org> To: Kevin Zheng <kevinz5000@gmail.com> Cc: "freebsd-ports@freebsd.org" <freebsd-ports@FreeBSD.org> Subject: Re: Internal linker error from pkg-fallout on 14.0-CURRENT on i386 Message-ID: <2357DA2B-2E5A-4496-9142-30373094E9D3@FreeBSD.org> In-Reply-To: <350fd299-ccc3-ebb2-9697-8685e2034211@gmail.com> References: <350fd299-ccc3-ebb2-9697-8685e2034211@gmail.com>
next in thread | previous in thread | raw e-mail | index | archive | help
--Apple-Mail=_364396A8-95A5-4DC8-9AEB-DD6A2A6BAD52 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=us-ascii On 20 Feb 2023, at 20:33, Kevin Zheng <kevinz5000@gmail.com> wrote: >=20 > At least two of my ports recently started to fail to build on = 14.0-CURRENT on i386 as reported by pkg-fallout with messages like: >=20 > internal linker error: wrote incorrect addend value 0x5000406A instead = of 0x0 for dynamic relocation R_386_32 at offset 0x410DD3 against symbol = __gxx_personality_v0 >=20 > ld: error: clientgame.o:(function _GLOBAL__sub_I_clientgame.cpp: = .text+0x7543): internal linker error: wrote incorrect addend value = 0xCC48300 instead of 0x0 for dynamic relocation R_386_32 at offset = 0x4FDED3 against symbol __gxx_personality_v0 >=20 > I searched Bugzilla for "internal linker error" but was unable to find = any existing reports. Is this a known issue and I'm just bad at = searching, or is this something I should report (and where?) Bugzilla search is just very bad, so it's not you. :-) This typically turns up for ports on i386 that use -z notext in their linker flags, to work around text relocation issues. See also <https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D268495> and <https://cgit.freebsd.org/ports/commit/?id=3D145ca5487348>. As of lld 15 the linker checks dynamic relocations more strictly, and unfortunately the maintainers turned these "incorrect addend" messages into internal errors instead of warnings (at least when lld is compiled with assertions enabled). Meanwhile, I have been informed that these diagnostics are actually quite harmless, and can be ignored. To suppress them, the linker flags should include --no-check-dynamic-relocations. Similar to audio/openal-soft, this should look something like: .include <bsd.port.pre.mk> .if ${COMPILER_TYPE} =3D=3D "clang" && ${COMPILER_VERSION} >=3D 150 LDFLAGS_i386+=3D -Wl,--no-check-dynamic-relocations .endif # ... other stuff ... .include <bsd.port.post.mk> -Dimitry --Apple-Mail=_364396A8-95A5-4DC8-9AEB-DD6A2A6BAD52 Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename=signature.asc Content-Type: application/pgp-signature; name=signature.asc Content-Description: Message signed with OpenPGP -----BEGIN PGP SIGNATURE----- Version: GnuPG/MacGPG2 v2.2 iF0EARECAB0WIQR6tGLSzjX8bUI5T82wXqMKLiCWowUCY/SUvwAKCRCwXqMKLiCW o/vUAKDhgQISrYsnSt8AWM4wyM3QNcOO8QCfSBKVhyOEuoU0DUZ5M5P4N31GMrU= =pqaW -----END PGP SIGNATURE----- --Apple-Mail=_364396A8-95A5-4DC8-9AEB-DD6A2A6BAD52--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?2357DA2B-2E5A-4496-9142-30373094E9D3>