Date: Fri, 8 Nov 2024 20:56:20 -0800 From: Mark Millard <marklmi@yahoo.com> To: FreeBSD Mailing List <freebsd-ports@freebsd.org>, FreeBSD Toolchain <freebsd-toolchain@freebsd.org> Cc: "mikael@freebsd.org" <mikael@FreeBSD.org> Subject: lang/rust/Makefile for 1.82.0 has wrong llvm:min= value; more Message-ID: <6D0FF1C8-CA51-44B0-A1D8-0B4F670F647C@yahoo.com> References: <6D0FF1C8-CA51-44B0-A1D8-0B4F670F647C.ref@yahoo.com>
next in thread | previous in thread | raw e-mail | index | archive | help
https://github.com/rust-lang/rust/pull/130487 reports . . . QUOTE Update the minimum external LLVM to 18 #130487 With this change, we'll have stable support for LLVM 18 and 19. For reference, the previous increase to LLVM 17 was #122649. END QUOTE Note: the internal LLVM is 19 for 1.82.0 . Also for 1.82.0 . . . src/bootstrap/src/core/build_steps/llvm.rs <http://llvm.rs/> was updated = to: @@ -580,11 +580,11 @@ fn check_llvm_version(builder: &Builder<'_>, = llvm_config: &Path) { let version =3D = command(llvm_config).arg("--version").run_capture_stdout(builder).stdout()= ; let mut parts =3D version.split('.').take(2).filter_map(|s| = s.parse::<u32>().ok()); if let (Some(major), Some(_minor)) =3D (parts.next(), parts.next()) = { - if major >=3D 17 { + if major >=3D 18 { return; } } - panic!("\n\nbad LLVM version: {version}, need >=3D17.0\n\n") + panic!("\n\nbad LLVM version: {version}, need >=3D18\n\n") } =20 fn configure_cmake( But lang/rust/Makefile has: . . . PORTVERSION?=3D 1.82.0 . . . PORT_LLVM_USES=3D llvm:min=3D17,lib,noexport . . . As I understand, 17 would be rejected now and 18 or 19 is needed. The likes of: Mk/bsd.gecko.mk having 17 would also look to need an update: USES+=3D compiler:c++17-lang cpe elfctl gl gmake gnome = iconv \ llvm:min=3D17,noexport localbase \ pkgconfig python:build desktop-file-utils But there is also a problem folks are runing into for use of LLVM 18 or before for www/chromium , www/firefox , mail/thunderbird or the like: the version of ld.lld involved proves to be insufficient . . . ld.lld: error: = obj/third_party/rust/cxx/v1/lib/libcxx_lib.rlib(libcxx_lib.cxx.3689637c63f= ce5c7-cgu.0.rcgu.o): Invalid attribute group entry (Producer: = 'LLVM19.1.1-rust-1.82.0-stable' Reader: 'LLVM 18.1.8') ld.lld: error: = ../../../x86_64-unknown-freebsd/release/libgkrust.a(ews_xpcom-da5573b2cf91= b84e.ews_xpcom.c68a27d7391ba4aa-cgu.0.rcgu.o): Unknown attribute kind = (91) (Producer: 'LLVM19.1.1-rust-1.82.0-stable' Reader: 'LLVM 17.0.6') This is because lang/rust used its internal LLVM 19 and older linkers used for www/chromium , www/firefox , mail/thunderbird need not be able to handle output from newer LLVM versions used in lang/rust. The above are examples of that issue. It leads me to wonder if lang/rust should be using an external devel/llvm* by default, set to match a default ports tree LLVM to be used for major ports that involve lang/rust use. NOTE: This might have some implications for lang/rust use by parts of FreeBSD itself. =3D=3D=3D Mark Millard marklmi at yahoo.com
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?6D0FF1C8-CA51-44B0-A1D8-0B4F670F647C>