Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 15 Nov 2024 05:36:46 GMT
From:      "Jason E. Hale" <jhale@FreeBSD.org>
To:        ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org
Subject:   git: 612c485103ee - main - multimedia/gstreamer1-plugins-rust: Fix build on i386
Message-ID:  <202411150536.4AF5ak1r039447@gitrepo.freebsd.org>

next in thread | raw e-mail | index | archive | help
The branch main has been updated by jhale:

URL: https://cgit.FreeBSD.org/ports/commit/?id=612c485103ee7c13d34e822cbd59776a13dcdf8b

commit 612c485103ee7c13d34e822cbd59776a13dcdf8b
Author:     Jason E. Hale <jhale@FreeBSD.org>
AuthorDate: 2024-11-15 02:01:28 +0000
Commit:     Jason E. Hale <jhale@FreeBSD.org>
CommitDate: 2024-11-15 05:35:45 +0000

    multimedia/gstreamer1-plugins-rust: Fix build on i386
    
    Ring assumes SSE and SSE2 are available on i386. This workaround assumes
    the same, so the build will still fail on ancient hardware without these
    instruction sets.
    
    error[E0080]: evaluation of constant value failed
      --> /wrkdirs/usr/ports/multimedia/gstreamer1-plugins-rust/work/gst-plugins-rs-0.13.3/cargo-crates/ring-0.17.8/src/cpu/intel.rs:28:9
       |
    28 |         assert!(cfg!(target_feature = "sse") && cfg!(target_feature = "sse2"));
       |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    the evaluated program panicked at 'assertion failed: cfg!(target_feature = "sse") && cfg!(target_feature = "sse2")',
    /wrkdirs/usr/ports/multimedia/gstreamer1-plugins-rust/work/gst-plugins-rs-0.13.3/cargo-crates/ring-0.17.8/src/cpu/intel.rs:28:9
    
    Reported by:    pkg-fallout
---
 multimedia/gstreamer1-plugins-rust/Makefile | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/multimedia/gstreamer1-plugins-rust/Makefile b/multimedia/gstreamer1-plugins-rust/Makefile
index 44263e9d46d1..3e1a026f9629 100644
--- a/multimedia/gstreamer1-plugins-rust/Makefile
+++ b/multimedia/gstreamer1-plugins-rust/Makefile
@@ -41,6 +41,11 @@ LTO_UNSAFE=	yes
 CARGO_ENV+=	CARGO_PROFILE_RELEASE_LTO=false
 .endif
 
+.if ${MACHINE_ARCH} == i386
+# https://github.com/briansmith/ring/issues/1832
+RUSTFLAGS+=	-C target-feature=+sse,+sse2
+.endif
+
 OPTIONS_DEFINE=		ASM CAIRO CSOUND DAV1D GTK4 PANGO SODIUM WEBP
 OPTIONS_DEFAULT=	ASM CAIRO CSOUND DAV1D GTK4 PANGO SODIUM WEBP
 OPTIONS_EXCLUDE_aarch64=	CSOUND # https://github.com/neithanmo/csound-rs/commit/8962b89d7bda



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202411150536.4AF5ak1r039447>