libxlio icon indicating copy to clipboard operation
libxlio copied to clipboard

issue: 4634244 migrate json-c from 0.13 to 0.17

Open tomerdbz opened this issue 4 months ago • 5 comments

Description

Migrate the json-c library from version 0.13.1 to 0.17.0 to gain access to newer features and bug fixes. The new version uses Meson build system which is incompatible with the existing Autotools-based libxlio project.

To maintain compatibility, convert the Meson build system to Autotools:

  • Create configure.ac with comprehensive feature detection for threads, atomic operations, and system headers
  • Add Makefile.am with proper source file management and libtool support
  • Generate pkg-config files (json-c.pc, json-c-uninstalled.pc) for proper library linking
  • Add json_compat.h for backward compatibility with renamed functions

The new json-c 0.17.0 uses doca_third_party_ prefix for all exported functions to avoid symbol conflicts. Update all callers:

  • src/core/config/descriptor_providers/json_descriptor_provider.cpp
  • src/core/config/descriptor_providers/schema_analyzer.cpp
  • src/core/config/json_object_handle.cpp
  • src/core/config/json_utils.cpp
  • src/core/config/loaders/json_loader.cpp
  • tests/unit_tests/config/schema_analyzer.cpp

Configuration changes:

  • Update configure.ac to build json-c subdirectory
  • Modify config/m4/json.m4 to point to new library paths
  • Update third_party/Makefile.am with proper subdirectory handling

All 94 unit tests pass. Main project builds successfully with full backward compatibility maintained.

What

json-c: migrate from 0.13.1 to 0.17.0 with Autotools build system

Why ?

Fixes 4634244. fixes many bugs in the parser.

How ?

It is optional but for complex PRs please provide information about the design, architecture, approach, etc.

Change type

What kind of change does this PR introduce?

  • [ ] Bugfix
  • [ ] Feature
  • [ ] Code style update
  • [ ] Refactoring (no functional changes, no api changes)
  • [ ] Build related changes
  • [ ] CI related changes
  • [ ] Documentation content changes
  • [ ] Tests
  • [ ] Other

Check list

  • [ ] Code follows the style de facto guidelines of this project
  • [ ] Comments have been inserted in hard to understand places
  • [ ] Documentation has been updated (if necessary)
  • [ ] Test has been added (if possible)

tomerdbz avatar Sep 16 '25 11:09 tomerdbz

bot:retest

tomerdbz avatar Sep 18 '25 07:09 tomerdbz

bot:retest

tomerdbz avatar Sep 21 '25 18:09 tomerdbz

Hi @NirWolfer, again the CI is stuck and we have many PRs like that. Its a huge problem, we are not able to merge issues and we are close to code freeze.

CC: @DanielLibenson , @dpressle

galnoam avatar Sep 21 '25 18:09 galnoam

@AlexanderGrissik , can you review?

galnoam avatar Nov 10 '25 11:11 galnoam

Skipped: This PR changes more files than the configured file change limit: (170 files found, 100 file limit)

greptile-apps[bot] avatar Nov 10 '25 12:11 greptile-apps[bot]