Skip to content

Support Rocky Linux 9 - #74

Merged
ninotarantino merged 5 commits into
mainfrom
support-rocky-9
Aug 12, 2026
Merged

Support Rocky Linux 9#74
ninotarantino merged 5 commits into
mainfrom
support-rocky-9

Conversation

@ninotarantino

@ninotarantino ninotarantino commented Aug 11, 2026

Copy link
Copy Markdown
Contributor

Get CML building and running on Rocky 9 in preparation for the Flight Sciences Lab (the runtime environment of most of our users) upgrading to Rocky 9 in September.

Issues resolved for Rocky 9:

  • Somehow, a few cases in input files where a string was being assigned directly into a JEOD NamedItem were acceptable on Rocky 8 but not on Rocky 9. name = "string"name.set_name("string")
  • The StateInitialize::generate_random function explicitly casts the input seed to result_type to avoid potential signedness issues.
  • Rewrote one of the stub unit tests to correctly catch messages and exceptions without leaking memory.
  • Ignored a few more leak sources originating from code we can't control in LSAN outputs.
  • Pre-addressed implicit enum to float conversions, which are deprecated in C++20. float_type = enum_typefloat_type = static_cast<double>(enum_type)

Also addresses an issue in newer SWIG versions which arises when you inherit from a type but also include that type as a member of your class.

class Base {
public:
    Base(const Base& other) = delete;
    Base& operator=(const Base& other) = delete;
};

class Derived : public Base {
public:
    Derived(const Derived& other) = delete;
    Derived& operator=(const Derived& other) = delete;

    Base instance; /* (--) SWIG issues here */
};

Even though we've deleted the copy constructor and copy assignment operator for the base and derived classes, SWIG still generates assignment interface code for instance, which causes a compiler error. We're seeing this on Fedora 44 and macOS, but we may as well get ahead of fixing it now. The solution is to surround the instances of Base with

#ifdef SWIG
%immutable;
#endif
    Base instance;
#ifdef SWIG
%mutable;
#endif

The %immutable directive is a bit of a misnomer. It just prevents SWIG from generating set_X interface functions, it doesn't prevent calling member functions which mutate the type or setting data within that instance. So we're essentially just reinforcing what SWIG should already be recognizing, which is that the type is non-assignable.

Closes #31

@ninotarantino ninotarantino self-assigned this Aug 11, 2026
@ninotarantino
ninotarantino marked this pull request as ready for review August 12, 2026 17:43
@ninotarantino
ninotarantino requested a review from a team August 12, 2026 17:43
@coveralls

Copy link
Copy Markdown
Collaborator

Coverage Status

coverage: 90.223% (+0.009%) from 90.214% — support-rocky-9 into main

@ddj116 ddj116 left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Only did a quick review via my phone as I'm already on vacation! Looks good and see ya on 8/24!

@ninotarantino
ninotarantino merged commit 76d67e1 into main Aug 12, 2026
7 of 9 checks passed
@ninotarantino
ninotarantino deleted the support-rocky-9 branch August 12, 2026 23:45
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.

Support Rocky Linux 9

3 participants