You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I got an error described exactly the same as in Tencent/rapidjson#718, which is introduced in Tencent/rapidjson@be5a886 and fixed in Tencent/rapidjson@3b2441b, while building OpenCC with Emscripten in CI today (but not yesterday, I don’t know why). The error occurs regardless of platform (in all Windows, macOS, Ubuntu and Docker). I have fixed the issue myself by applying the patch.
So please be reminded to update rapidjson. Thank you!
Log from GitHub Actions
Building opencc
configure: cmake librime/deps/opencc -B build/opencc -G Ninja -DCMAKE_INSTALL_PREFIX:PATH=/usr -DCMAKE_BUILD_TYPE:STRING=Release -DBUILD_SHARED_LIBS:BOOL=OFF -DCMAKE_FIND_ROOT_PATH:PATH=D:\a\TypeDuck-Web\TypeDuck-Web/build/sysroot/usr -DSHARE_INSTALL_PREFIX:PATH=/usr/share/rime-data/ -DENABLE_DARTS:BOOL=OFF -DUSE_SYSTEM_MARISA:BOOL=ON -DCMAKE_TOOLCHAIN_FILE=D:\a\_temp\6892e8c0-2712-40df-80fc-c7529c324ea4\emsdk-main\upstream\emscripten\cmake\Modules\Platform\Emscripten.cmake -DCMAKE_CROSSCOMPILING_EMULATOR=D:/a/_temp/6892e8c0-2712-40df-80fc-c7529c324ea4/emsdk-main/node/16.20.0_64bit/bin/node.exe
-- libmarisa found: D:/a/TypeDuck-Web/TypeDuck-Web/build/sysroot/usr/lib/libmarisa.a
-- Performing Test COMPILER_HAS_HIDDEN_VISIBILITY
-- Performing Test COMPILER_HAS_HIDDEN_VISIBILITY - Success
-- Performing Test COMPILER_HAS_HIDDEN_INLINE_VISIBILITY
-- Performing Test COMPILER_HAS_HIDDEN_INLINE_VISIBILITY - Success
-- Performing Test COMPILER_HAS_DEPRECATED_ATTR
-- Performing Test COMPILER_HAS_DEPRECATED_ATTR - Success
-- Configuring done (5.9s)
-- Generating done (0.0s)
-- Build files have been written to: D:/a/TypeDuck-Web/TypeDuck-Web/build/opencc
[1/19] Building CXX object src/CMakeFiles/libopencc.dir/ConversionChain.cpp.o
[2/19] Building CXX object src/CMakeFiles/libopencc.dir/Converter.cpp.o
[3/19] Building CXX object src/CMakeFiles/libopencc.dir/DictConverter.cpp.o
[4/19] Building CXX object src/CMakeFiles/libopencc.dir/Config.cpp.o
FAILED: src/CMakeFiles/libopencc.dir/Config.cpp.o
D:\a\_temp\6892e8c0-2712-40df-80fc-c7529c324ea4\emsdk-main\upstream\emscripten\em++.bat -DLOCALEDIR=\"/usr/share/rime-data/locale/\" -DOpencc_BUILT_AS_STATIC -DPACKAGE_NAME=\"opencc\" -DPKGDATADIR=\"/usr/share/rime-data/opencc/\" -DVERSION=\"1.1.7\" -ID:/a/TypeDuck-Web/TypeDuck-Web/build/opencc/src -ID:/a/TypeDuck-Web/TypeDuck-Web/librime/deps/opencc/src -ID:/a/TypeDuck-Web/TypeDuck-Web/librime/deps/opencc/src/../deps/rapidjson-1.1.0 -ID:/a/TypeDuck-Web/TypeDuck-Web/librime/deps/opencc/src/../deps/tclap-1.2.2 -fexceptions -DBOOST_DISABLE_CURRENT_LOCATION -O3 -DNDEBUG -fPIC -ffile-prefix-map=D:/a/TypeDuck-Web/TypeDuck-Web/librime/deps/opencc=. -I"D:/a/TypeDuck-Web/TypeDuck-Web/librime/deps/opencc/../../../build/sysroot/usr/include" -std=c++14 -Wall -MD -MT src/CMakeFiles/libopencc.dir/Config.cpp.o -MF src\CMakeFiles\libopencc.dir\Config.cpp.o.d -o src/CMakeFiles/libopencc.dir/Config.cpp.o -c D:/a/TypeDuck-Web/TypeDuck-Web/librime/deps/opencc/src/Config.cpp
In file included from D:/a/TypeDuck-Web/TypeDuck-Web/librime/deps/opencc/src/Config.cpp:23:
D:/a/TypeDuck-Web/TypeDuck-Web/librime/deps/opencc/src/../deps/rapidjson-1.1.0\rapidjson/document.h:319:82: error: cannot assign to non-static data member 'length' with const-qualified type 'const SizeType' (aka 'const unsigned int')
319 | GenericStringRef& operator=(const GenericStringRef& rhs) { s = rhs.s; length = rhs.length; }
| ~~~~~~ ^
D:/a/TypeDuck-Web/TypeDuck-Web/librime/deps/opencc/src/../deps/rapidjson-1.1.0\rapidjson/document.h:325:20: note: non-static data member 'length' declared const here
325 | const SizeType length; //!< length of the string (excluding the trailing NULL terminator)
| ~~~~~~~~~~~~~~~^~~~~~
1 error generated.
The text was updated successfully, but these errors were encountered:
Unfortunately I don’t think any versions newer than 1.1.0 in 2016 are officially released, despite the repo being in active development. So I think there are 3 options available: 1. Upgrade to an unstable commit version; 2. Apply the mentioned patch in this repo; or 3. Ignore this issue for the time being.
I got an error described exactly the same as in Tencent/rapidjson#718, which is introduced in Tencent/rapidjson@be5a886 and fixed in Tencent/rapidjson@3b2441b, while building OpenCC with Emscripten in CI today (but not yesterday, I don’t know why). The error occurs regardless of platform (in all Windows, macOS, Ubuntu and Docker). I have fixed the issue myself by applying the patch.
So please be reminded to update rapidjson. Thank you!
Log from GitHub Actions
The text was updated successfully, but these errors were encountered: