pkgsrc-Bugs archive

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

pkg/57977: Mozilla products don't compiled with -march=native



>Number:         57977
>Category:       pkg
>Synopsis:       Mozilla products don't compiled with -march=native
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    pkg-manager
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Fri Mar 01 21:30:00 +0000 2024
>Originator:     Stefan Schaeckeler
>Release:        pkgsrc-2023Q4
>Organization:
>Environment:
NetBSD XXX 10.0_RC4 NetBSD 10.0_RC4 (GENERIC) #0: Sun Feb 18 08:20:49 PST 2024  root%dell.wonderland.de@localhost:/usr/obj/sys/arch/amd64/compile/GENERIC amd64
>Description:
Mozilla products don't compiled with -march=native

I have -march=native in my CFLAGS in /etc/mk.conf. Mozilla products don't compile now.

mail/thunderbird:

/usr/include/gcc-10/avx2intrin.h: In function '__m256i mozilla::CmpEq256(__m256i, __m256i) [with TValue = unsigned char]':
/usr/include/gcc-10/avx2intrin.h:231:1: error: inlining failed in call to 'always_inline' '__m256i _mm256_cmpeq_epi8(__m256i, __m256i)': target specific option mismatch
  231 | _mm256_cmpeq_epi8 (__m256i __A, __m256i __B)
      | ^~~~~~~~~~~~~~~~~
/var/tmp/pkgsrc/mail/thunderbird/work/thunderbird-115.5.1/mozglue/misc/SIMD_avx2.cpp:52:29: note: called from here
   52 |     return _mm256_cmpeq_epi8(a, b);
      |            



www/firefox115:

/usr/include/gcc-10/avx2intrin.h:231:1: error: inlining failed in call to 'always_inline' '__m256i _mm256_cmpeq_epi8(__m256i, __m256i)': target specific option mismatch
  231 | _mm256_cmpeq_epi8 (__m256i __A, __m256i __B)
      | ^~~~~~~~~~~~~~~~~
/var/tmp/pkgsrc/www/firefox115/work/firefox-115.5.0/mozglue/misc/SIMD_avx2.cpp:52:29: note: called from here
   52 |     return _mm256_cmpeq_epi8(a, b);
      |            ~~~~~~~~~~~~~~~~~^~~~~~

>How-To-Repeat:
Add -march=native to CFLAGS in /etc/mk.conf and build firefox115 or thunderbird.

I've seen this issue on now older firefox and thunderbird pkgsrc versions over the last couple of years as well.
>Fix:
The most straight-foward way is probably to remove -march=native from BUILDLINK_TRANSFORM:


Index: mail/thunderbird/Makefile
===================================================================
RCS file: /cvsroot/pkgsrc/mail/thunderbird/Makefile,v
retrieving revision 1.307
diff -u -p -r1.307 Makefile
--- mail/thunderbird/Makefile   4 Dec 2023 03:46:03 -0000       1.307
+++ mail/thunderbird/Makefile   1 Mar 2024 21:22:21 -0000
@@ -38,6 +38,9 @@ NOT_PAX_MPROTECT_SAFE+=       lib/${MOZILLA_NA
 
 LDFLAGS+=              ${COMPILER_RPATH_FLAG}${PREFIX}/lib/${MOZILLA_NAME}
 
+# Avoid failure inlining _mm256_cmpeq_epi8()
+BUILDLINK_TRANSFORM+=          rm:-march=native
+
 # Workaround for https://bugs.llvm.org/show_bug.cgi?id=46366
 BUILDLINK_TRANSFORM.NetBSD+=   rm:-fexperimental-new-pass-manager
 
Index: www/firefox115/Makefile
===================================================================
RCS file: /cvsroot/pkgsrc/www/firefox115/Makefile,v
retrieving revision 1.10
diff -u -p -r1.10 Makefile
--- www/firefox115/Makefile     22 Dec 2023 17:11:31 -0000      1.10
+++ www/firefox115/Makefile     1 Mar 2024 21:23:49 -0000
@@ -79,6 +79,9 @@ BUILDLINK_TRANSFORM.SunOS+=   rm:-fdata-se
 BUILDLINK_TRANSFORM.SunOS+=    rm:-ffunction-sections
 BUILDLINK_TRANSFORM.SunOS+=    rm:-pie
 
+# Avoid failure inlining _mm256_cmpeq_epi8()
+BUILDLINK_TRANSFORM+=          rm:-march=native
+
 # Workaround for https://bugs.llvm.org/show_bug.cgi?id=46366
 BUILDLINK_TRANSFORM.NetBSD+=   rm:-fexperimental-new-pass-manager



Home | Main Index | Thread Index | Old Index