Bugzilla – Bug 1222377
GCC 14: nodejs21 package fails, included simdjson likely to miscompile with GCC14
Last modified: 2024-06-04 08:55:22 UTC
Building nodejs21 with GCC 14 fails using: osc build --alternative-project openSUSE:Factory:Staging:Gcc7 Due to: ../deps/simdjson/simdjson.cpp:16566:49: error: inlining failed in call to ‘always_inline’ ‘simdjson::error_code simdjson::fallback::{anonymous}::stage2::json_iterator::walk_document(V&) noexcept [with bool STREAMING = false; V = simdjson::fallback::{anonymous}::stage2::tape_builder]’: target specific option mismatch 16566 | simdjson_warn_unused simdjson_inline error_code json_iterator::walk_document(V &visitor) noexcept { | ^~~~~~~~~~~~~ ../deps/simdjson/simdjson.cpp:17003:39: note: called from here 17003 | return iter.walk_document<STREAMING>(builder); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~ ---------------- Apparently simdjson with GCC14 enables instruction sets where it shouldn't. I reported it with more details in simdjson's upstream: https://github.com/simdjson/simdjson/issues/2163 Simdjson distributed with the current nodejs' upstream seems to compile with GCC14 without errors, but the underlying issue with incorrect instruction sets enabled (with GCC14) is still present.
simdjson upstream released a possible fix for this in simdjson v3.9.1. See issue #2163 for discussion: https://github.com/simdjson/simdjson/issues/2163
I can build nodejs21 (build service revision 8 in Factory) and nodejs22 (build service revision 1 in Factory) with GCC 14 when I add -fpermissive to assignment to CFLAGS in the spec file. Neither is buildable with GCC 14 as-is. This indicates that there is an instance of a new error in GCC 14 (which previously was just a warning). For more information see https://gcc.gnu.org/gcc-14/porting_to.html and meta bug #1220571. It can be reproduced locally with command: osc build --clean --alternative-project home:rguenther:nextgcc