jsoncpp icon indicating copy to clipboard operation
jsoncpp copied to clipboard

armhf build failed

Open ghost opened this issue 7 years ago • 14 comments

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

ghost avatar Apr 17 '19 07:04 ghost

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?

cdunn2001 avatar Apr 17 '19 23:04 cdunn2001

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).

ghost avatar Apr 18 '19 03:04 ghost

If it works without C++11, push a PR to suppress that. We'll cut a release before we turn it on again.

cdunn2001 avatar Apr 18 '19 03:04 cdunn2001

We can use at least c++0x, right?

cdunn2001 avatar Apr 18 '19 03:04 cdunn2001

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

ghost avatar Apr 18 '19 03:04 ghost

I can not find a armhf cmake-3.13 binary so I can not verify whether this is cmake issue or not.

ghost avatar Apr 18 '19 03:04 ghost

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).

ghost avatar Apr 19 '19 02:04 ghost

I think If we does not using C++11, we should remove this flag, right?

ghost avatar Apr 19 '19 02:04 ghost

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.

cdunn2001 avatar Apr 19 '19 04:04 cdunn2001

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.

dota17 avatar May 20 '19 02:05 dota17

I am also having this issue, not entirely sure how to fix it. I can't get the cmake to work

andrewdurkiewicz avatar May 22 '19 22:05 andrewdurkiewicz

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

sdasara95 avatar Jun 25 '19 00:06 sdasara95

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

baylesj avatar Jun 28 '19 17:06 baylesj

Closing. Resolution is: upgrade to 3.8.

baylesj avatar Jun 28 '19 17:06 baylesj