Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Arch Linux][AUR Package] Compilation error: assignment of read-only member in RapidJSON #2320

Open
kiy-00 opened this issue Nov 17, 2024 · 1 comment

Comments

@kiy-00
Copy link

kiy-00 commented Nov 17, 2024

Description

When building a Cocos2d-x C++ project on Arch Linux using the AUR package cocos2d-x-src (version 3.17.2-1), the compilation fails due to an assignment of a read-only member in the RapidJSON library.

Steps to Reproduce

  1. Install the cocos2d-x-src package from AUR:
yay -S cocos2d-x-src
  1. Create a new Cocos2d-x project:
cocos new MyGame -p com.example.mygame -l cpp
cd MyGame
  1. Attempt to build the project:
 cocos run -p linux

Logs

[  9%] Building CXX object engine/cocos/core/CMakeFiles/cocos2d.dir/3d/CCAnimation3D.cpp.o
In file included from /path/to/cocos2d/external/recast/../json/document-wrapper.h:13,
                 from /path/to/cocos2d/cocos/3d/CCAnimation3D.cpp:27:
/path/to/cocos2d/external/recast/../json/document.h: In member function ‘rapidjson::GenericStringRef<CharType>& rapidjson::GenericStringRef<CharType>::operator=(const rapidjson::GenericStringRef<CharType>&)’:
/path/to/cocos2d/external/recast/../json/document.h:319:82: error: assignment of read-only member ‘rapidjson::GenericStringRef<CharType>::length’
  319 |     GenericStringRef& operator=(const GenericStringRef& rhs) { s = rhs.s; length = rhs.length; }
      |                                                                           ~~~~~~~^~~~~~~~~~~~

Environment Detail

  1. Operating System: Arch Linux
  2. Cocos2d-x Version: 3.17.2 (installed via AUR package cocos2d-x-src 3.17.2-1)
  3. Compiler: GCC 14.2.1
  4. CMake Version: 3.31.0
  5. RapidJSON Version: (Included in the cocos2d-x-src package)
@maxaehle
Copy link

maxaehle commented Dec 3, 2024

possibly related to #2277

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

No branches or pull requests

2 participants