JSONCPP compile error Topic is solved

On various Hardware and OS systems: pi / windows / routers / nas, etc

Moderator: leecollings

Post Reply
EddyG
Posts: 1042
Joined: Monday 02 November 2015 5:54
Target OS: -
Domoticz version:

JSONCPP compile error

Post by EddyG »

Today Domoticz did not compile any more. I got this error

Code: Select all

-- JsonCpp Version: 1.9.4
######################################################
# jsoncpp should not be configured & built in the jsoncpp source directory
# You must run cmake in a build directory.
# For example:
# mkdir jsoncpp-Sandbox ; cd jsoncpp-sandbox
# git clone https://github.com/open-source-parsers/jsoncpp.git # or download & unpack the source tarball
# mkdir jsoncpp-build
# this will create the following directory structure
#
# jsoncpp-Sandbox
#  +--jsoncpp
#  +--jsoncpp-build
#
# Then you can proceed to configure and build
# by using the following commands
#
# cd jsoncpp-build
# cmake ../jsoncpp # or ccmake, or cmake-gui
# make
#
# NOTE: Given that you already tried to make an in-source build
#       CMake have already created several files & directories
#       in your source tree. run 'git status' to find them and
#       remove them by doing:
#
#       cd jsoncpp-Sandbox/jsoncpp
#       git clean -n -d
#       git clean -f -d
#       git checkout --
#
######################################################
CMake Error at extern/jsoncpp/include/PreventInSourceBuilds.cmake:41 (message):
  Quitting configuration
Call Stack (most recent call first):
  extern/jsoncpp/include/PreventInSourceBuilds.cmake:45 (AssureOutOfSourceBuilds)
  extern/jsoncpp/CMakeLists.txt:78 (include)
If I follow the instructions jsoncpp does compile correctly.
I did a fresh install of sources, but that did not help.
I saw on github that this is a commit of 2 days ago.
https://github.com/open-source-parsers/ ... be4d6e2241
How to solve that error?

EDIT:
Found a temporary solution by commenting out the 2 added lines in the CMakeLists.txt file.
kshesq
Posts: 12
Joined: Tuesday 05 January 2016 9:50
Target OS: Linux
Domoticz version: 2021.1
Location: Haarlem
Contact:

Re: JSONCPP compile error

Post by kshesq »

Any news on a permanent fix? It's still in the lastest pull

just installed a new git clone and the problem is gone
mozo78
Posts: 22
Joined: Friday 09 June 2017 6:29
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: JSONCPP compile error

Post by mozo78 »

EddyG wrote: Monday 09 November 2020 9:33 Today Domoticz did not compile any more. I got this error

Code: Select all

-- JsonCpp Version: 1.9.4
######################################################
# jsoncpp should not be configured & built in the jsoncpp source directory
# You must run cmake in a build directory.
# For example:
# mkdir jsoncpp-Sandbox ; cd jsoncpp-sandbox
# git clone https://github.com/open-source-parsers/jsoncpp.git # or download & unpack the source tarball
# mkdir jsoncpp-build
# this will create the following directory structure
#
# jsoncpp-Sandbox
#  +--jsoncpp
#  +--jsoncpp-build
#
# Then you can proceed to configure and build
# by using the following commands
#
# cd jsoncpp-build
# cmake ../jsoncpp # or ccmake, or cmake-gui
# make
#
# NOTE: Given that you already tried to make an in-source build
#       CMake have already created several files & directories
#       in your source tree. run 'git status' to find them and
#       remove them by doing:
#
#       cd jsoncpp-Sandbox/jsoncpp
#       git clean -n -d
#       git clean -f -d
#       git checkout --
#
######################################################
CMake Error at extern/jsoncpp/include/PreventInSourceBuilds.cmake:41 (message):
  Quitting configuration
Call Stack (most recent call first):
  extern/jsoncpp/include/PreventInSourceBuilds.cmake:45 (AssureOutOfSourceBuilds)
  extern/jsoncpp/CMakeLists.txt:78 (include)
If I follow the instructions jsoncpp does compile correctly.
I did a fresh install of sources, but that did not help.
I saw on github that this is a commit of 2 days ago.
https://github.com/open-source-parsers/ ... be4d6e2241
How to solve that error?

EDIT:
Found a temporary solution by commenting out the 2 added lines in the CMakeLists.txt file.
Can you tell me what 2 lines should uncomment? Thx.
EddyG
Posts: 1042
Joined: Monday 02 November 2015 5:54
Target OS: -
Domoticz version:

Re: JSONCPP compile error

Post by EddyG »

With the latest sources it is no longer a problem any more.
The json sources are now forked from a previous commit that did not have this problem.
It was about these 2 lines. https://github.com/open-source-parsers/ ... be4d6e2241
mozo78
Posts: 22
Joined: Friday 09 June 2017 6:29
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: JSONCPP compile error

Post by mozo78 »

EddyG wrote: Sunday 13 December 2020 9:57 With the latest sources it is no longer a problem any more.
The json sources are now forked from a previous commit that did not have this problem.
It was about these 2 lines. https://github.com/open-source-parsers/ ... be4d6e2241
Thank you for your reply. I face the same error message right now, Domoticz do not compile. :(
User avatar
gizmocuz
Posts: 2350
Joined: Thursday 11 July 2013 18:59
Target OS: Raspberry Pi / ODroid
Domoticz version: beta
Location: Top of the world
Contact:

Re: JSONCPP compile error

Post by gizmocuz »

This has been solved a week ago

try this:

cd dev-domoticz
rm -Rf extern/
rm -Rf CMakeFiles
rm CMakeCache.txt
git pull
cmake -DCMAKE_BUILD_TYPE=Release CMakeLists.txt
make
Quality outlives Quantity!
mozo78
Posts: 22
Joined: Friday 09 June 2017 6:29
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: JSONCPP compile error

Post by mozo78 »

Thank you for your reply, but it is not working for me.:(
Spoiler: show
pi@raspberry:~/domoticz $ sudo cmake -DCMAKE_BUILD_TYPE=Release CMakeLists.txt
-- The C compiler identification is GNU 8.3.0
-- The CXX compiler identification is GNU 8.3.0
-- Check for working C compiler: /usr/bin/cc
-- Check for working C compiler: /usr/bin/cc - works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ - works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Submodule update
From https://github.com/open-source-parsers/jsoncpp
* [new branch] jsoncpp_version -> origin/jsoncpp_version
5f4e104..9409824 master -> origin/master
Submodule path 'extern/jsoncpp': checked out '940982438d01fe2575acef8dd98a9b6893ccc9bb'
Submodule path 'extern/minizip': checked out '78eb93e8e0ba228f37b197d2022d66b73856c9ff'
From https://github.com/eclipse/mosquitto
24df1638..79339ce5 1.6.x -> origin/1.6.x
+ 49f4ffb5...122e6ecf coverity-develop -> origin/coverity-develop (forced update)
6f4e0a15..e02b5a27 coverity-fixes -> origin/coverity-fixes
988b5cf0..122e6ecf develop -> origin/develop
* [new branch] dynamic-bridge -> origin/dynamic-bridge
6f4e0a15..9d3732a6 fixes -> origin/fixes
3a13205e..faeb9e91 master -> origin/master
* [new tag] v2.0.0 -> v2.0.0
* [new tag] v2.0.1 -> v2.0.1
* [new tag] v2.0.2 -> v2.0.2
* [new tag] v2.0.3 -> v2.0.3
* [new tag] v2.0.4 -> v2.0.4
Submodule path 'extern/mosquitto': checked out 'faeb9e9122c35d24bc6667a48275e37b5732f54a'
Submodule path 'extern/sqlite-amalgamation': checked out '6c4bf38eba9ddd3e0493c95c489710070d095dea'
-- LUA library found at: /usr/lib/i386-linux-gnu/liblua5.3.a
-- Found PythonInterp: /usr/bin/python3 (found suitable version "3.7.3", minimum required is "3.4")
-- Found PythonLibs: /usr/lib/i386-linux-gnu/libpython3.7m.so (found suitable version "3.7.3", minimum required is "3.4")
-- Python3 includes found at: /usr/include/python3.7m
-- Looking for execinfo.h
-- Looking for execinfo.h - found
-- Looking for 3 include files sys/types.h, ..., linux/i2c.h
-- Looking for 3 include files sys/types.h, ..., linux/i2c.h - found
-- Building with I2C support
-- Looking for include files sys/types.h, linux/spi/spidev.h
-- Looking for include files sys/types.h, linux/spi/spidev.h - found
-- Building with SPI support
-- ###########################
-- Compiling Revision #12758
-- ###########################
-- Check if the system is big endian
-- Searching 16 bit integer
-- Looking for sys/types.h
-- Looking for sys/types.h - found
-- Looking for stdint.h
-- Looking for stdint.h - found
-- Looking for stddef.h
-- Looking for stddef.h - found
-- Check size of unsigned short
-- Check size of unsigned short - done
-- Searching 16 bit integer - Using unsigned short
-- Check if the system is big endian - little endian
-- Using builtin jsoncpp library
-- JsonCpp Version: 1.9.4
######################################################
# jsoncpp should not be configured & built in the jsoncpp source directory
# You must run cmake in a build directory.
# For example:
# mkdir jsoncpp-Sandbox ; cd jsoncpp-sandbox
# git clone https://github.com/open-source-parsers/jsoncpp.git # or download & unpack the source tarball
# mkdir jsoncpp-build
# this will create the following directory structure
#
# jsoncpp-Sandbox
# +--jsoncpp
# +--jsoncpp-build
#
# Then you can proceed to configure and build
# by using the following commands
#
# cd jsoncpp-build
# cmake ../jsoncpp # or ccmake, or cmake-gui
# make
#
# NOTE: Given that you already tried to make an in-source build
# CMake have already created several files & directories
# in your source tree. run 'git status' to find them and
# remove them by doing:
#
# cd jsoncpp-Sandbox/jsoncpp
# git clean -n -d
# git clean -f -d
# git checkout --
#
######################################################
CMake Error at extern/jsoncpp/include/PreventInSourceBuilds.cmake:41 (message):
Quitting configuration
Call Stack (most recent call first):
extern/jsoncpp/include/PreventInSourceBuilds.cmake:45 (AssureOutOfSourceBuilds)
extern/jsoncpp/CMakeLists.txt:78 (include)


-- Configuring incomplete, errors occurred!
See also "/home/pi/domoticz/CMakeFiles/CMakeOutput.log".
mozo78
Posts: 22
Joined: Friday 09 June 2017 6:29
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: JSONCPP compile error

Post by mozo78 »

Made it again from the beginning, it looks like everything is working now. It is a Christmas miracle. :D
yann500
Posts: 15
Joined: Saturday 05 October 2019 22:57
Target OS: Raspberry Pi / ODroid
Domoticz version: 2020.2
Contact:

Re: JSONCPP compile error

Post by yann500 »

Spoiler: show

Code: Select all

- Submodule update
-- LUA library found at: /usr/lib/arm-linux-gnueabihf/liblua5.3.a
-- Python3 includes found at: /usr/include/python3.5m
-- Building with I2C support
-- Building with SPI support
-- ###########################
-- Compiling Revision #12894
-- ###########################
-- Using builtin jsoncpp library
-- JsonCpp Version: 1.9.4
######################################################
# jsoncpp should not be configured & built in the jsoncpp source directory
# You must run cmake in a build directory.
# For example:
# mkdir jsoncpp-Sandbox ; cd jsoncpp-sandbox
# git clone https://github.com/open-source-parsers/jsoncpp.git # or download & unpack the source tarball
# mkdir jsoncpp-build
# this will create the following directory structure
#
# jsoncpp-Sandbox
#  +--jsoncpp
#  +--jsoncpp-build
#
# Then you can proceed to configure and build
# by using the following commands
#
# cd jsoncpp-build
# cmake ../jsoncpp # or ccmake, or cmake-gui
# make
#
# NOTE: Given that you already tried to make an in-source build
#       CMake have already created several files & directories
#       in your source tree. run 'git status' to find them and
#       remove them by doing:
#
#       cd jsoncpp-Sandbox/jsoncpp
#       git clean -n -d
#       git clean -f -d
#       git checkout --
#
######################################################
CMake Error at extern/jsoncpp/include/PreventInSourceBuilds.cmake:41 (message):
  Quitting configuration
Call Stack (most recent call first):
  extern/jsoncpp/include/PreventInSourceBuilds.cmake:45 (AssureOutOfSourceBuilds)
  extern/jsoncpp/CMakeLists.txt:78 (include)
-- Configuring incomplete, errors occurred!
See also "/home/pi/dev-domoticz/CMakeFiles/CMakeOutput.log".
Makefile:7831 : la recette pour la cible « cmake_check_build_system » a échouée
make: *** [cmake_check_build_system] Erreur 1


I tried the procedure from gizmocuz, and I have the same issue.
Thanks for your help.

Yann
User avatar
waaren
Posts: 6028
Joined: Tuesday 03 January 2017 14:18
Target OS: Linux
Domoticz version: Beta
Location: Netherlands
Contact:

Re: JSONCPP compile error

Post by waaren »

yann500 wrote: Friday 29 January 2021 15:16 -- Configuring incomplete, errors occurred!
See also "/home/pi/dev-domoticz/CMakeFiles/CMakeOutput.log".
Makefile:7831 : la recette pour la cible « cmake_check_build_system » a échouée
make: *** [cmake_check_build_system] Erreur 1
You forgot to state on what hardware and what OS you see this. The last time I had this on a Raspberry with Debian buster, i had to restart from scratch meaning I removed the dev directory cloned the sources and did the cmake + make again.
Debian buster, bullseye on RPI-4, Intel NUC.
dz Beta, Z-Wave, RFLink, RFXtrx433e, P1, Youless, Hue, Yeelight, Xiaomi, MQTT
==>> dzVents wiki
pipiche
Posts: 1975
Joined: Monday 02 April 2018 20:33
Target OS: Raspberry Pi / ODroid
Domoticz version: beta
Location: France
Contact:

Re: JSONCPP compile error

Post by pipiche »

same problem here with latest domoticz source from today

Platfor: Fedora 32
cmake version 3.17.4

Code: Select all

-- Using builtin jsoncpp library
-- JsonCpp Version: 1.9.4
######################################################
# jsoncpp should not be configured & built in the jsoncpp source directory
# You must run cmake in a build directory.
# For example:
# mkdir jsoncpp-Sandbox ; cd jsoncpp-sandbox
# git clone https://github.com/open-source-parsers/jsoncpp.git # or download & unpack the source tarball
# mkdir jsoncpp-build
# this will create the following directory structure
#
# jsoncpp-Sandbox
#  +--jsoncpp
#  +--jsoncpp-build
#
# Then you can proceed to configure and build
# by using the following commands
#
# cd jsoncpp-build
# cmake ../jsoncpp # or ccmake, or cmake-gui
# make
#
# NOTE: Given that you already tried to make an in-source build
#       CMake have already created several files & directories
#       in your source tree. run 'git status' to find them and
#       remove them by doing:
#
#       cd jsoncpp-Sandbox/jsoncpp
#       git clean -n -d
#       git clean -f -d
#       git checkout --
#
######################################################
CMake Error at extern/jsoncpp/include/PreventInSourceBuilds.cmake:41 (message):
  Quitting configuration
Zigbee for Domoticz plugin / RPI3B+ / Electrolama ZZH-P / 45 devices

If the plugin provides you value, you can support me with a donation Paypal.

Wiki is available here.

Zigbee for Domoticz FAQ
yann500
Posts: 15
Joined: Saturday 05 October 2019 22:57
Target OS: Raspberry Pi / ODroid
Domoticz version: 2020.2
Contact:

Re: JSONCPP compile error

Post by yann500 »

Same issue on raspberry PI3 desbian with latest domoticz rev.

Thanks
pipiche
Posts: 1975
Joined: Monday 02 April 2018 20:33
Target OS: Raspberry Pi / ODroid
Domoticz version: beta
Location: France
Contact:

Re: JSONCPP compile error

Post by pipiche »

suggested by @waaren, I did a full re-install of the repository and redo the cmake and make
Zigbee for Domoticz plugin / RPI3B+ / Electrolama ZZH-P / 45 devices

If the plugin provides you value, you can support me with a donation Paypal.

Wiki is available here.

Zigbee for Domoticz FAQ
Huupke
Posts: 25
Joined: Monday 21 October 2019 10:49
Target OS: Raspberry Pi / ODroid
Domoticz version: 2024.4
Location: Boxtel, Netherlands
Contact:

Re: JSONCPP compile error

Post by Huupke »

I had the same problem on all branches. Removing the stuff like gizmocuz suggested didn't yield. Also git clean didn't help so also recreated my local repo.

Don't forgot to push local branches to Github first!
Running V2024.4 on RPi3B+ & development/HEAD on RPi4B
Post Reply

Who is online

Users browsing this forum: Bing [Bot] and 1 guest