Skip to content

Conversation

hoyhoy
Copy link
Contributor

@hoyhoy hoyhoy commented Apr 19, 2024

rapidjson/1.1.0

GCC 14 fails to compile rapidjson 1.1.0. Looks like a syntax error actually. You can't set a constant member.


@conan-center-bot

This comment has been minimized.

@conan-center-bot

This comment has been minimized.

Copy link
Member

@AbrilRBS AbrilRBS left a comment

Choose a reason for hiding this comment

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

Hi! Thanks a lot for the contribution, we appreciate it - I don't see an URL in the patch_source field, so it's hard to trace theis back to an upstream issue. Has it been fixed upstream?

@AbrilRBS AbrilRBS self-assigned this Apr 20, 2024
@conan-center-bot
Copy link
Contributor

Conan v1 pipeline ✔️

All green in build 4 (ef7b0be18ae1f584866a7bb9fb2b3916de8b7f19):

  • rapidjson/cci.20230929:
    All packages built successfully! (All logs)

  • rapidjson/cci.20220822:
    All packages built successfully! (All logs)

  • rapidjson/cci.20211112:
    All packages built successfully! (All logs)

  • rapidjson/cci.20200410:
    All packages built successfully! (All logs)

  • rapidjson/1.1.0:
    All packages built successfully! (All logs)


Conan v2 pipeline ✔️

Note: Conan v2 builds are now mandatory. Please read our discussion about it.

All green in build 4 (ef7b0be18ae1f584866a7bb9fb2b3916de8b7f19):

  • rapidjson/cci.20230929:
    All packages built successfully! (All logs)

  • rapidjson/cci.20220822:
    All packages built successfully! (All logs)

  • rapidjson/cci.20200410:
    All packages built successfully! (All logs)

  • rapidjson/cci.20211112:
    All packages built successfully! (All logs)

  • rapidjson/1.1.0:
    All packages built successfully! (All logs)

@hoyhoy
Copy link
Contributor Author

hoyhoy commented Apr 23, 2024

@RubenRBS 1.1.0 is the latest release. This now merges a single line (removing the syntax error on an unused line) with rapidjson's upstream to compile on GCC 14.

Copy link
Contributor

@Ahajha Ahajha left a comment

Choose a reason for hiding this comment

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

Would this potentially break builds? I'm thinking no, since if it wouldn't compile anyways then it can't be used, but just checking. If not then LGTM.

Comment on lines +9 to +11
- GenericStringRef& operator=(const GenericStringRef& rhs) { s = rhs.s; length = rhs.length; }
-
//! implicit conversion to plain CharType pointer
Copy link
Contributor

Choose a reason for hiding this comment

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

Looking at the commit history, it seems there was another change immediately after which explicitly disabled the copy assignment operator by making it private, perhaps it would be a good idea to include that change too if we added this? (https://github.com/Tencent/rapidjson/commits/master/?after=ab1842a2dae061284c0a62dca1cc6d5e7e37e346+734, specifically this commit: Tencent/rapidjson@862c39b).

@jcar87 jcar87 self-assigned this May 9, 2024
@jcar87
Copy link
Contributor

jcar87 commented May 9, 2024

It looks like rapidjson no longer do releases . if this fix is already in the available snapshots from more recent dates, please use those. We are not going to backport code if there are already released versions of the recipe that include the fix.

Does rapidjson/cci.20230929 not include this fix?

@hoyhoy
Copy link
Contributor Author

hoyhoy commented May 9, 2024

It's just the one unused line you need to delete for gcc 14 to work. If anyone were to have ever used that line, it wouldn't have compiled on any compiler anyway.

I just found a UndefinedBehavior issue with rapidjson as well. We ended up just forking the fixes to our local conan-center repo fixing the undefined behavior and fixing gcc 14. It seems like nobody uses the recipe here anyway.

And, honestly, rapidjson probably should just be viewed as deprecated and a security risk anyway. They haven't updated a release since 2016. There are commits still going into the rapidjosn repository, but we're hesitant to bring in a "cci" release to our production build. We already switched to nlohmann/json for the most part, but have one legacy app still built on rapidjson.

@jcar87
Copy link
Contributor

jcar87 commented May 9, 2024

There are commits still going into the rapidjosn repository, but we're hesitant to bring in a "cci" release to our production build.

This is the approach that has been already been followed by other maintainers such as Conda and vcpkg - precisely to reflect the fact that there is are no new tagged/versioned releases, but development has continued, with bugfixes such as the one requested here.

I can see that rapidjson/cci.20230929 already has the fix for this, so I would advise using that instead. We would consider backporting a patch for older versions only when there isn't already a published version by us that contains the fix.

@jcar87 jcar87 closed this May 9, 2024
@conan-io conan-io locked and limited conversation to collaborators May 9, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants