Skip to content

Conversation

saiarcot895
Copy link
Contributor

Make some changes to fix compilation for Debian Trixie. This includes:

  • Don't mark m_buffer as const, since the memory that it's pointing to is anyways modified by BinarySerializer.
  • Add support for compiling with libhiredis 1.1.0.
  • Add a missing include for <stdexcept>.
  • Use SWIG_AppendOutput instead of SWIG_Python_AppendOutput, as the latter now takes another parameter to indicate if the function's return type is void, and the recommendation appears to be to just use SWIG_AppendOutput.
  • Add a workaround for GCC complaining about attributes being ignored in a template argument when passing in pclose as a function pointer into std::unique_ptr.[1]

[1] This is based on https://stackoverflow.com/a/76867913

@mssonicbld
Copy link
Collaborator

/azp run

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

qiluo-msft
qiluo-msft previously approved these changes Jul 14, 2025
@qiluo-msft qiluo-msft enabled auto-merge (squash) July 14, 2025 18:36
@mssonicbld
Copy link
Collaborator

/azp run

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

Pterosaur
Pterosaur previously approved these changes Jul 15, 2025
Make some changes to fix compilation for Debian Trixie. This includes:
* Don't mark m_buffer as const, since the memory that it's pointing to
  is anyways modified by `BinarySerializer`.
* Add support for compiling with libhiredis 1.1.0.
* Add a missing include for `<stdexcept>`.
* Use `SWIG_AppendOutput` instead of `SWIG_Python_AppendOutput`, as the
  latter now takes another parameter to indicate if the function's
  return type is void, and the recommendation appears to be to just use
  `SWIG_AppendOutput`.
* Add a workaround for GCC complaining about attributes being ignored in
  a template argument when passing in `pclose` as a function pointer
  into `std::unique_ptr`.[1]

[1] This is based on https://stackoverflow.com/a/76867913

Signed-off-by: Saikrishna Arcot <[email protected]>
@saiarcot895 saiarcot895 force-pushed the fix-trixie-compilation branch from b898e4b to e66b0be Compare July 15, 2025 19:08
@mssonicbld
Copy link
Collaborator

/azp run

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

With the base image upgrade to Trixie, Bookworm-based containers will
need to use Boost 1.83. This is because of an incompatibility between
rsyslog_plugin that uses Boost 1.83 on Trixie and the eventd
container that uses Boost 1.74 on Bookworm; specifically there is an
incompatiblity with serialization of objects between the two versions of
Boost.

Because of this, allow applications to compile with Boost 1.83 headers.

Signed-off-by: Saikrishna Arcot <[email protected]>
@saiarcot895 saiarcot895 dismissed stale reviews from qiluo-msft and Pterosaur via ccf05b3 July 24, 2025 05:46
@mssonicbld
Copy link
Collaborator

/azp run

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@mssonicbld
Copy link
Collaborator

/azp run

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@qiluo-msft qiluo-msft merged commit 7a25b07 into sonic-net:master Aug 6, 2025
15 checks passed
@saiarcot895 saiarcot895 deleted the fix-trixie-compilation branch August 14, 2025 16:42
@mssonicbld
Copy link
Collaborator

Cherry-pick PR to msft-202506: Azure/sonic-swss-common.msft#52

@saiarcot895
Copy link
Contributor Author

@prabhataravind What's the reason for needing this in the msft-202506 branch? None of the fixes/changes here should be needed in any current branch, I think.

@prabhataravind
Copy link
Contributor

@prabhataravind What's the reason for needing this in the msft-202506 branch? None of the fixes/changes here should be needed in any current branch, I think.

@saiarcot895 We usually cherry-pick only smartswitch related and build fixes from master to 202506 branch for swss-common, sairedis and dash-api, dash-ha repos. I took this change to avoid potential conflicts/build issues down the line.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants