Bug 1222377 - GCC 14: nodejs21 package fails, included simdjson likely to miscompile with GCC14
Summary: GCC 14: nodejs21 package fails, included simdjson likely to miscompile with G...
Status: NEW
Alias: None
Product: openSUSE Tumbleweed
Classification: openSUSE
Component: Development (show other bugs)
Version: Current
Hardware: Other Other
: P5 - None : Normal (vote)
Target Milestone: ---
Assignee: Adam Majer
QA Contact: E-mail List
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: modern_C gcc14
  Show dependency treegraph
 
Reported: 2024-04-05 11:10 UTC by Michal Jireš
Modified: 2024-06-04 08:55 UTC (History)
3 users (show)

See Also:
Found By: ---
Services Priority:
Business Priority:
Blocker: ---
Marketing QA Status: ---
IT Deployment: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Michal Jireš 2024-04-05 11:10:16 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.
Comment 1 Gus Kenion 2024-04-12 11:34:08 UTC
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
Comment 2 Martin Jambor 2024-06-04 08:55:22 UTC
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