nodejs / nodejs/node

zlib change broke x86 builds

Offen
#33,019 10 Kommentare 3 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen

Dieses Issue hat noch niemand übernommen.

build zlib
Vorherrschende Sprache
JavaScript
Sterne
122k
Forks
37.3k
Ø Merge
4 T. 2 Std.
Gemergte PRs (30 T.)
283

Beschreibung

I know we don't officially support x86 anymore but we do publish unofficial-builds x86 and the Snap package has x86 support too. But I've just noticed they haven't been building, I suppose since zlib was switched out:

  cc -o /build/node/parts/node/build/out/Release/obj.target/zlib/deps/zlib/contrib/optimizations/inflate.o ../deps/zlib/contrib/optimizations/inflate.c '-DV8_DEPRECATION_WARNINGS' '-DV8_IMMINENT_DEPRECATION_WARNINGS' '-D__STDC_FORMAT_MACROS' '-DOPENSSL_NO_PINSHARED' '-DOPENSSL_THREADS' '-DHAVE_HIDDEN' '-DADLER32_SIMD_SSSE3' '-DINFLATE_CHUNK_SIMD_SSE2' '-DCRC32_SIMD_SSE42_PCLMUL' -I../deps/zlib  -pthread -Wall -Wextra -Wno-unused-parameter -m32 -O3 -fno-omit-frame-pointer  -MMD -MF /build/node/parts/node/build/out/Release/.deps//build/node/parts/node/build/out/Release/obj.target/zlib/deps/zlib/contrib/optimizations/inflate.o.d.raw   -c
In file included from ../deps/zlib/contrib/optimizations/inffast_chunk.c:10:0:
../deps/zlib/contrib/optimizations/chunkcopy.h: In function ‘loadchunk’:
../deps/zlib/contrib/optimizations/chunkcopy.h:52:5: warning: SSE vector return without SSE enabled changes the ABI [-Wpsabi]
     const unsigned char FAR* s) {
     ^
In file included from ../deps/zlib/contrib/optimizations/inflate.c:87:0:
../deps/zlib/contrib/optimizations/chunkcopy.h: In function ‘loadchunk’:
../deps/zlib/contrib/optimizations/chunkcopy.h:52:5: warning: SSE vector return without SSE enabled changes the ABI [-Wpsabi]
     const unsigned char FAR* s) {
     ^
In file included from ../deps/zlib/contrib/optimizations/chunkcopy.h:32:0,
                 from ../deps/zlib/contrib/optimizations/inffast_chunk.c:10:
../deps/zlib/contrib/optimizations/chunkcopy.h: In function ‘v_load64_dup’:
/usr/lib/gcc/i686-linux-gnu/5/include/emmintrin.h:625:1: error: inlining failed in call to always_inline ‘_mm_set1_epi64x’: target specific option mismatch
 _mm_set1_epi64x (long long __A)
 ^
In file included from ../deps/zlib/contrib/optimizations/inffast_chunk.c:10:0:
../deps/zlib/contrib/optimizations/chunkcopy.h:215:10: error: called from here
   return _mm_set1_epi64x(i64);
          ^
make[1]: *** [/build/node/parts/node/build/out/Release/obj.target/zlib/deps/zlib/contrib/optimizations/inffast_chunk.o] Error 1
make[1]: *** Waiting for unfinished jobs....
deps/zlib/zlib.target.mk:109: recipe for target '/build/node/parts/node/build/out/Release/obj.target/zlib/deps/zlib/contrib/optimizations/inffast_chunk.o' failed
In file included from ../deps/zlib/contrib/optimizations/chunkcopy.h:32:0,
                 from ../deps/zlib/contrib/optimizations/inflate.c:87:
../deps/zlib/contrib/optimizations/chunkcopy.h: In function ‘v_load64_dup’:
/usr/lib/gcc/i686-linux-gnu/5/include/emmintrin.h:625:1: error: inlining failed in call to always_inline ‘_mm_set1_epi64x’: target specific option mismatch
 _mm_set1_epi64x (long long __A)
 ^
In file included from ../deps/zlib/contrib/optimizations/inflate.c:87:0:
../deps/zlib/contrib/optimizations/chunkcopy.h:215:10: error: called from here
   return _mm_set1_epi64x(i64);
          ^
make[1]: *** [/build/node/parts/node/build/out/Release/obj.target/zlib/deps/zlib/contrib/optimizations/inflate.o] Error 1
deps/zlib/zlib.target.mk:109: recipe for target '/build/node/parts/node/build/out/Release/obj.target/zlib/deps/zlib/contrib/optimizations/inflate.o' failed
rm 73eb81ec782978e9e5a9028cb1d0640d4778b4fe.intermediate
make: *** [node] Error 2
Makefile:101: recipe for target 'node' failed

I suspect there might be a not-too-difficult fix to restore support here, maybe bypassing an optimisation that was added? We still have x86 users so I'm sure a fix will be appreciated if we can come up with one.

Beitragsleitfaden

Beitragsleitfaden öffnen

Erste Schritte

  1. Lies das ganze Issue und danach den Beitragsleitfaden des Projekts.
  2. Schreib ins Issue, dass du es übernimmst — das erspart doppelte Arbeit.
  3. Forke das Repository und arbeite in einem Branch.
  4. Öffne einen Pull Request, der die Issue-Nummer nennt.

Rechercherichtung

Reproduziere den x86-Build und beginne mit deps/zlib/contrib/optimizations/chunkcopy.h. Untersuche dann, wie deps/zlib/zlib.target.mk die gemeldeten SIMD-Optionen für inflate.c und inffast_chunk.c aktiviert. Überprüfe die relevanten Build-Einstiegspunkte in Makefile; abgeschlossen bedeutet, dass der inoffizielle x86- oder Snap-Build ohne die zieltypspezifischen Optionsfehler abgeschlossen wird.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Bewertung

Tech-Stack
c
Bereich
build-system
Issue-Typ
Bug
Schwierigkeit
3/5
Geschätzter Aufwand
1-2 Tage
Aktivitätsstatus
Ruhig
Klarheit
Größtenteils klar
Anfängerfreundlichkeit
64/100

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.