tech-pkg archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: CVS commit: pkgsrc/www/firefox



> I tried building firefox 101 on NetBSD/i386 9.2 with rust
> configured for i586, and that failed with:
>
> In file included from /usr/include/gcc-7/emmintrin.h:31:0,
>                  from /usr/pkgsrc/www/firefox/work/firefox-101.0/third_party/libwebrtc/common_audio/third_party/ooura/fft_size_128/ooura_fft_sse2.cc:11,
>                  from Unified_cpp_fft_size_128_gn0.cpp:11:
> /usr/include/gcc-7/xmmintrin.h: In function 'void webrtc::cft1st_128_SSE2(float*)':
> /usr/include/gcc-7/xmmintrin.h:925:1: error: inlining failed in call to always_inline '__m128 _mm_load_ps(const float*)': target specific option mismatch
>  _mm_load_ps (float const *__P)
>  ^~~~~~~~~~~
>
> Does firefox now require i686 minimum for sse2?  It certainly
> looks that way (while the above is from c++, it's attempted to be
> built with -march=i586).

The -march=i586 appears to come from mk/atomic64.mk, but can be
overridden.  I had to tweak the firefox Makefile like this to
have the build succeed for me:

Index: Makefile
===================================================================
RCS file: /cvsroot/pkgsrc/www/firefox/Makefile,v
retrieving revision 1.522
diff -u -r1.522 Makefile
--- Makefile    6 Jun 2022 20:59:39 -0000       1.522
+++ Makefile    11 Jun 2022 09:02:54 -0000
@@ -77,6 +77,8 @@
 # As of 101.0, rustc consumes all available RAM and swap by default.
 .if ${MACHINE_ARCH} == "i386"
 MAKE_ENV+=     RUSTFLAGS="-C opt-level=1 -C codegen-units=1"
+# ...and requires sse2 support,
+CFLAGS+=       -march=i686 -msse2 -mtune=generic -mstackrealign
 .endif
 
 # Avoid ld "invalid section index" errors.

I've not confirmed whether -mtune=generic or -mstackrealign are
required.  Maybe not.

> I guess I'll be building a new i686 rust bootstrap to re-try.

I suspect this wasn't needed, will re-try with a "normal" i586
rust 1.61.0.

Regards,

- Håvard


Home | Main Index | Thread Index | Old Index