Skip to content

Fix C++17 compatibility for GCC 14 / Rocky Linux 10 (RHEL 10)#60

Open
773-process-312 wants to merge 1 commit intosleuthkit:masterfrom
773-process-312:fix/cpp17-rocky-linux-10-compatibility
Open

Fix C++17 compatibility for GCC 14 / Rocky Linux 10 (RHEL 10)#60
773-process-312 wants to merge 1 commit intosleuthkit:masterfrom
773-process-312:fix/cpp17-rocky-linux-10-compatibility

Conversation

@773-process-312
Copy link

Problem Proposed

Scalpel 2.1 fails to compile on Rocky Linux 10 (RHEL 10 / el10)
with GCC 14.3.1 due to C++17 incompatibilities:

  1. const char return type on scalpelInputIsOpen conflicts with
    the unsigned char isOpen field in the ScalpelInputReader struct
  2. Dynamic exception specifications throw() are removed in C++17
    and rejected as hard errors by GCC 14

Fix

  • Changed scalpelInputIsOpen return type to unsigned char in both
    input_reader.h and input_reader.cpp to correctly match the struct field
  • Removed throw() exception specifications from scalpel.h and scalpel.cpp

Tested On

  • Rocky Linux 10.1 (Red Quartz)
  • GCC 14.3.1 (Red Hat 14.3.1-2)
  • scalpel 2.1
  • libtre 0.8.0 (built from source — no el10 package exists)

Notes

libtre is also unavailable as a package on RHEL 10 / Rocky Linux 10
and must be built from source. A full documented build guide including
pre-built binaries and patch scripts is available at:
https://github.com/773-process-312/scalpel-rocky10 Sonnet 4.6

- Fix scalpelInputIsOpen return type: const char -> unsigned char
  (matches the unsigned char isOpen field in ScalpelInputReader struct)
- Remove dynamic exception specifications throw() from scalpel.h
  and scalpel.cpp (removed in C++17, rejected by GCC 14)

Tested on: Rocky Linux 10.1 (Red Quartz), GCC 14.3.1 (Red Hat 14.3.1-2)
Requires: libtre 0.8.0 built from source (unavailable as el10 package)

Reference build and install scripts:
https://github.com/773-process-312/scalpel-rocky10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant