armhf build failed
Seems the new github code broken the default build:
$ git clone https://github.com/open-source-parsers/jsoncpp.git jsoncpp $ cd jsoncpp $ mkdir -p build/release $ cd build/release ubuntu@tegra-ubuntu:/opt/app/jsoncpp/build/release$ cmake -DCMAKE_BUILD_TYPE=release -DBUILD_STATIC_LIBS=ON -DBUILD_SHARED_LIBS=OFF -DARCHIVE_INSTALL_DIR=. -G "Unix Makefiles" ../.. -- JsonCpp Version: 1.9.0 CMake Error at src/lib_json/CMakeLists.txt:89 (target_compile_features): target_compile_features specified unknown feature "cxx_std_11" for target "jsoncpp_lib".
-- Configuring incomplete, errors occurred! See also "/opt/app/jsoncpp/build/release/CMakeFiles/CMakeOutput.log". ubuntu@tegra-ubuntu:/opt/app/jsoncpp/build/release$
ubuntu@tegra-ubuntu:~$ uname -a Linux tegra-ubuntu 3.10.96-tegra #1 SMP PREEMPT Wed Nov 9 19:42:57 PST 2016 aarch64 aarch64 aarch64 GNU/Linux ubuntu@tegra-ubuntu:~$ lsb_release -a No LSB modules are available. Distributor ID: Ubuntu Description: Ubuntu 16.04 LTS Release: 16.04 Codename: xenial
If you can find a specific commit which needs to be reverted, we could do that quickly.
Or are you saying that C++11 is not available on armhf?
The cmakefiles are entirely user-supported. We maintain only Meson/Ninja. Would Meson work for you?
I saw the cmake version is 3.5.1, maybe cmake is too old, I think. between C++11 is supported on my environment, because when I remove cxx_std_11 flag in CMakeLists.txt, the build can success.
$ cmake --version cmake version 3.5.1
CMake suite maintained and supported by Kitware (kitware.com/cmake).
If it works without C++11, push a PR to suppress that. We'll cut a release before we turn it on again.
We can use at least c++0x, right?
Yes, thanks for the quick response, actually, my environment is true support C++11, I used to build bellow pure C++11 project on this environment : https://github.com/jinneec/application-manager
I can not find a armhf cmake-3.13 binary so I can not verify whether this is cmake issue or not.
I used cmake 3.14 passed the build, so the issue is cmake-3.5.1 does not recognize cxx_std_11 flag ubuntu@tegra-ubuntu:/opt/jsoncpp/jsoncpp/build/release$ cmake --version cmake version 3.14.0
CMake suite maintained and supported by Kitware (kitware.com/cmake).
I think If we does not using C++11, we should remove this flag, right?
Could you try a tagged release? We'd like to have C++11 available moving forward, though we could cut one more release with C++0x.
My workstation is SUSE Linux Enterprise Server 12 (x86_64) , cmake version is 3.13.3 and it's OK to run the cmake command.
I am also having this issue, not entirely sure how to fix it. I can't get the cmake to work
I was facing the same problem. I guess the problem comes with the CMakeLists.txt in src/lib_json I am using CMake 3.5.2
I comment the line containing c++11 and it ran without errors
CMake added support for cxx_std_11 in release version 3.8, released over two years ago.
I've added a patch to change the minimum version we have in our config files here. When that PR is closed, I will update this issue appropriately:
https://github.com/open-source-parsers/jsoncpp/pull/963
Closing. Resolution is: upgrade to 3.8.