-
Notifications
You must be signed in to change notification settings - Fork 2.6k
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
1.9.0: does not build #970
Comments
Thanks for opening this issue. Looks like an issue with CMake, this tag builds fine with our preferred build system (Meson). I'll try to resolve this. |
CMake build on my system works fine: -> % cmake -S . -B build-cmake
-- The CXX compiler identification is AppleClang 10.0.1.10010046
-- Check for working CXX compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/c++
-- Check for working CXX compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- JsonCpp Version: 1.9.0
-- Looking for C++ include clocale
-- Looking for C++ include clocale - found
-- Looking for localeconv
-- Looking for localeconv - found
-- Looking for C++ include sys/types.h
-- Looking for C++ include sys/types.h - found
-- Looking for C++ include stdint.h
-- Looking for C++ include stdint.h - found
-- Looking for C++ include stddef.h
-- Looking for C++ include stddef.h - found
-- Check size of lconv
-- Check size of lconv - done
-- Performing Test HAVE_DECIMAL_POINT
-- Performing Test HAVE_DECIMAL_POINT - Success
-- Found PythonInterp: /usr/local/bin/python2 (found suitable version "2.7.15", minimum required is "2.6")
-- Configuring done
-- Generating done
-- Build files have been written to: /usr/local/src/jsoncpp/build-cmake
-> % make
Scanning dependencies of target jsoncpp_lib
[ 10%] Building CXX object src/lib_json/CMakeFiles/jsoncpp_lib.dir/json_reader.cpp.o
[ 20%] Building CXX object src/lib_json/CMakeFiles/jsoncpp_lib.dir/json_value.cpp.o
[ 30%] Building CXX object src/lib_json/CMakeFiles/jsoncpp_lib.dir/json_writer.cpp.o
[ 40%] Linking CXX static library libjsoncpp.a
[ 40%] Built target jsoncpp_lib
Scanning dependencies of target jsontestrunner_exe
[ 50%] Building CXX object src/jsontestrunner/CMakeFiles/jsontestrunner_exe.dir/main.cpp.o
[ 60%] Linking CXX executable jsontestrunner_exe
[ 60%] Built target jsontestrunner_exe
Scanning dependencies of target jsoncpp_test
[ 70%] Building CXX object src/test_lib_json/CMakeFiles/jsoncpp_test.dir/jsontest.cpp.o
[ 80%] Building CXX object src/test_lib_json/CMakeFiles/jsoncpp_test.dir/fuzz.cpp.o
[ 90%] Building CXX object src/test_lib_json/CMakeFiles/jsoncpp_test.dir/main.cpp.o
[100%] Linking CXX executable jsoncpp_test
Testing ValueTest/checkNormalizeFloatingPointStr: OK
Testing ValueTest/memberCount: OK
Testing ValueTest/objects: OK
Testing ValueTest/arrays: OK
Testing ValueTest/arrayIssue252: OK
Testing ValueTest/null: OK
Testing ValueTest/strings: OK
Testing ValueTest/bools: OK
Testing ValueTest/integers: OK
Testing ValueTest/nonIntegers: OK
Testing ValueTest/compareNull: OK
Testing ValueTest/compareInt: OK
Testing ValueTest/compareUInt: OK
Testing ValueTest/compareDouble: OK
Testing ValueTest/compareString: OK
Testing ValueTest/compareBoolean: OK
Testing ValueTest/compareArray: OK
Testing ValueTest/compareObject: OK
Testing ValueTest/compareType: OK
Testing ValueTest/CopyObject: OK
Testing ValueTest/offsetAccessors: OK
Testing ValueTest/typeChecksThrowExceptions: OK
Testing ValueTest/StaticString: OK
Testing ValueTest/WideString: OK
Testing ValueTest/CommentBefore: OK
Testing ValueTest/zeroes: OK
Testing ValueTest/zeroesInKeys: OK
Testing ValueTest/specialFloats: OK
Testing ValueTest/precision: OK
Testing WriterTest/dropNullPlaceholders: OK
Testing StreamWriterTest/dropNullPlaceholders: OK
Testing StreamWriterTest/writeZeroes: OK
Testing ReaderTest/parseWithNoErrors: OK
Testing ReaderTest/parseWithNoErrorsTestingOffsets: OK
Testing ReaderTest/parseWithOneError: OK
Testing ReaderTest/parseChineseWithOneError: OK
Testing ReaderTest/parseWithDetailError: OK
Testing CharReaderTest/parseWithNoErrors: OK
Testing CharReaderTest/parseWithNoErrorsTestingOffsets: OK
Testing CharReaderTest/parseWithOneError: OK
Testing CharReaderTest/parseChineseWithOneError: OK
Testing CharReaderTest/parseWithDetailError: OK
Testing CharReaderTest/parseWithStackLimit: OK
Testing CharReaderStrictModeTest/dupKeys: OK
Testing CharReaderFailIfExtraTest/issue164: OK
Testing CharReaderFailIfExtraTest/issue107: OK
Testing CharReaderFailIfExtraTest/commentAfterObject: OK
Testing CharReaderFailIfExtraTest/commentAfterArray: OK
Testing CharReaderFailIfExtraTest/commentAfterBool: OK
Testing CharReaderAllowDropNullTest/issue178: OK
Testing CharReaderAllowSingleQuotesTest/issue182: OK
Testing CharReaderAllowZeroesTest/issue176: OK
Testing CharReaderAllowSpecialFloatsTest/issue209: OK
Testing BuilderTest/settings: OK
Testing IteratorTest/distance: OK
Testing IteratorTest/names: OK
Testing IteratorTest/indexes: OK
Testing IteratorTest/const: OK
Testing RValueTest/moveConstruction: OK
Testing FuzzTest/fuzzDoesntCrash: OK
All 60 tests passed
[100%] Built target jsoncpp_test |
__GLIBC_PREREQ isn't used inside of our repository, it's part of C++11 features like iostream. It looks like you are using a modern compiler, so I'm not sure what the issue here is... |
Just FTR:
And yes looks like build using meson works. |
Hmmm. This seems like it could affect a lot of users, but I wasn't able to repro it on my linux or mac machines with gcc + CMake. Our official policy has been only supporting the meson build, and having users submit fixes for the CMake build. If you can root cause and submit a fix, I would be happy to review it promptly. |
I've already switched to meson so problem has been sorted out .. somehow :P |
Could you try to build shared lib, not static lib? On my system, static -> fine but building shared lib was failed. |
Hmm if meson is workin I'll try it and if it will be OK I'll no longer care about cmake :) |
I'm having this issue building with cmake as well. I've not used Meson before, but I can give it a try. Just wanted to contribute to the thread to note that it's affecting others. |
File name collision between ..../include/json/features.h and (maybe?) /usr/include/features.h causes this I believe. I renamed json/features.h to features2.h and updated references to it. I'll leave up to the developers for the real solution, but those changes allow it to build with cmake. It will take someone more knowledgeable than me with CMAKE to fix it though. This is on Ubuntu 18.04. |
Hi @kloczek,From your log, I'm sure you are building this project in the top source code, that's the problem, you should make a new directory in the source code, then make your project-build in it. |
Yep looks like /usr/include/features.h is now part of the new glibc. |
Bumping jsoncpp to 1.9.1 will cause a CMake-related build error: open-source-parsers/jsoncpp#970 To fix the bug upstream suggests to switch to meson: "Our official policy has been only supporting the meson build, and having users submit fixes for the CMake build." open-source-parsers/jsoncpp#970 (comment) Remove all _CONF_OPTS as they are not supported by meson. Signed-off-by: Bernd Kuhls <bernd.kuhls@t-online.de> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
This patch fixes a build issue on CMake, presumably due to the new glibc having a features.h include file. This patch renames our features.h file to avoid a name collision.
Can one of y'all try building with my latest patch? |
Fixed #1024 |
The text was updated successfully, but these errors were encountered: