Closed torehl closed 2 years ago
Hello @torehl, I think the problem comes from trying to build Sarus with RapidJSON 1.1.0 provided by the package manager. Unfortunately RapidJSON has not had tagged releases for a while, with the last one dating back to 2016 (see here), which is quite earlier than when Sarus started development. As indicated in the Sarus documentation, we recommend to use RapidJSON from the commit https://github.com/Tencent/rapidjson/commit/663f076, which is the one used regularly in the build and test pipelines. For example, you can install it as follows:
cd /tmp
mkdir -p rapidjson && cd rapidjson
wget -O rapidjson-master.tar.gz https://github.com/Tencent/rapidjson/archive/663f076c7b44ce96526d1acfda3fa46971c8af31.tar.gz
tar xvzf rapidjson-master.tar.gz
cd rapidjson-663f076c7b44ce96526d1acfda3fa46971c8af31
sudo mkdir -p /usr/local/include/rapidjson && sudo cp -r include/rapidjson/* /usr/local/include/rapidjson
I was able to also build Sarus in a Ubuntu 18.04 environment with the very latest commit from RapidJSON (https://github.com/Tencent/rapidjson/commit/b557259f8813bed2d79e83bd2f92eb673579a82c), if you prefer a more recent commit.
Should you choose a RapidJSON installation location which is not in the default CMake search paths, you could pass the
location manually to CMake through the CMAKE_PREFIX_PATH
variable, e.g.:
cmake -DCMAKE_TOOLCHAIN_FILE=../cmake/toolchain_files/gcc.cmake \
-DCMAKE_INSTALL_PREFIX=/opt/sarus/default \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_PREFIX_PATH="<rapidjson install dir>" \
..
Closing due to inactivity. If further help is needed, feel free to reopen or create a new issue if unrelated.
Hi,
Any ideas why this fails? OS: Ubuntu 18.04.5LTS.
$ sudo apt search rapidjson Sorting... Done Full Text Search... Done rapidjson-dev/bionic,now 1.1.0+dfsg2-3 all [installed] fast JSON parser/generator for C++ with SAX/DOM style API