Compilation failure against Boost 1.70.0

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

Moderator: leecollings

Post Reply
User avatar
Conn-artist
Posts: 21
Joined: Saturday 12 July 2014 12:06
Target OS: Raspberry Pi / ODroid
Domoticz version: 3.8367
Location: 127.0.0.1
Contact:

Compilation failure against Boost 1.70.0

Post by Conn-artist »

Hi,

Version: git commit 08d470c, 15 Apr 2019
Platform: Debian Stretch
Plugin/Hardware: Raspberry Pi 3
Description: I have been trying to compile Domoticz from source using the instructions in the wiki. I built Boost 1.70.0 from scratch and it is detected by Domoticz. However there seems to be something going wrong with the version number detection: Found libBoost version 1.70.0, 106000 or newer required

Here's the output of cmake:

Code: Select all

-- Found Boost 1.70.0 at /usr/local/lib/cmake/Boost-1.70.0
--   Requested configuration: QUIET REQUIRED COMPONENTS thread;system
-- Found boost_headers 1.70.0 at /usr/local/lib/cmake/boost_headers-1.70.0
-- Found boost_thread 1.70.0 at /usr/local/lib/cmake/boost_thread-1.70.0
--   libboost_thread.a
-- Adding boost_thread dependencies: headers
-- Found boost_system 1.70.0 at /usr/local/lib/cmake/boost_system-1.70.0
--   libboost_system.a
-- Adding boost_system dependencies: headers
Boost  found.
Found Boost components:
   thread;system
-- Linking against boost static libraries
CMake Error at CMakeLists.txt:589 (message):
Found libBoost version 1.70.0, 106000 or newer required
Using cmake 3.7.2.

The Debian Stretch installation is fresh and I removed all factory-installed libboost libraries before compiling.

The last entries in CMakeFiles/CMakeError.log are:

Code: Select all

Determining if the function pthread_create exists in the pthreads failed with the following output:
Change Dir: /home/pi/git/domoticz/CMakeFiles/CMakeTmp

Run Build Command:"/usr/bin/make" "cmTC_6ffa2/fast"
/usr/bin/make -f CMakeFiles/cmTC_6ffa2.dir/build.make CMakeFiles/cmTC_6ffa2.dir/build
make[1]: Entering directory '/home/pi/git/domoticz/CMakeFiles/CMakeTmp'
Building C object CMakeFiles/cmTC_6ffa2.dir/CheckFunctionExists.c.o
/usr/bin/cc    -DCHECK_FUNCTION_EXISTS=pthread_create   -o CMakeFiles/cmTC_6ffa2.dir/CheckFunctionExists.c.o   -c /usr/share/cmake-3.7/Modules/CheckFunctionExists.c
Linking C executable cmTC_6ffa2
/usr/bin/cmake -E cmake_link_script CMakeFiles/cmTC_6ffa2.dir/link.txt --verbose=1
/usr/bin/cc   -DCHECK_FUNCTION_EXISTS=pthread_create    CMakeFiles/cmTC_6ffa2.dir/CheckFunctionExists.c.o  -o cmTC_6ffa2 -rdynamic -lpthreads 
/usr/bin/ld: cannot find -lpthreads
collect2: error: ld returned 1 exit status
CMakeFiles/cmTC_6ffa2.dir/build.make:97: recipe for target 'cmTC_6ffa2' failed
make[1]: *** [cmTC_6ffa2] Error 1
make[1]: Leaving directory '/home/pi/git/domoticz/CMakeFiles/CMakeTmp'
Makefile:126: recipe for target 'cmTC_6ffa2/fast' failed
make: *** [cmTC_6ffa2/fast] Error 2
Any suggestions are appreciated.
--
Martijn
User avatar
Conn-artist
Posts: 21
Joined: Saturday 12 July 2014 12:06
Target OS: Raspberry Pi / ODroid
Domoticz version: 3.8367
Location: 127.0.0.1
Contact:

Re: Compilation failure against Boost 1.70.0

Post by Conn-artist »

FWIW: compilation of the release 4.9700 throws the same error.
--
Martijn
User avatar
Conn-artist
Posts: 21
Joined: Saturday 12 July 2014 12:06
Target OS: Raspberry Pi / ODroid
Domoticz version: 3.8367
Location: 127.0.0.1
Contact:

Re: Compilation failure against Boost 1.70.0

Post by Conn-artist »

More effort was spent figuring out what the issue was. Eventually I installed the libboost-system/thread libraries that come with Stretch, and the compilation continued a lot further.

However, after a long time it still bombed out with boost-related errors.

Eventually I capitulated and installed 4.9700 with
curl -sSL install.domoticz.com | sudo bash
and now all is well.
--
Martijn
garethhowell
Posts: 115
Joined: Tuesday 17 November 2015 21:19
Target OS: Raspberry Pi / ODroid
Domoticz version: 3.9317
Location: St Neots, UK
Contact:

Re: Compilation failure against Boost 1.70.0

Post by garethhowell »

I've started getting this error as well.
I had previously compiled from source with no problems, but suddenly, after running `updatedomo` from the domoticz directory, I got the error

Code: Select all

Found libBoost version 1.70.0, 106000 or newer required
User avatar
waaren
Posts: 6028
Joined: Tuesday 03 January 2017 14:18
Target OS: Linux
Domoticz version: Beta
Location: Netherlands
Contact:

Re: Compilation failure against Boost 1.70.0

Post by waaren »

garethhowell wrote: Thursday 27 June 2019 10:27 Suddenly, after running `updatedomo` from the domoticz directory, I got the error

Code: Select all

Found libBoost version 1.70.0, 106000 or newer required
What is your Cmake version ?
Debian buster, bullseye on RPI-4, Intel NUC.
dz Beta, Z-Wave, RFLink, RFXtrx433e, P1, Youless, Hue, Yeelight, Xiaomi, MQTT
==>> dzVents wiki
User avatar
gizmocuz
Posts: 2546
Joined: Thursday 11 July 2013 18:59
Target OS: Raspberry Pi / ODroid
Domoticz version: beta
Location: Top of the world
Contact:

Re: Compilation failure against Boost 1.70.0

Post by gizmocuz »

You need to use CMake 3.14, it is explained on our wiki
Quality outlives Quantity!
pocock
Posts: 66
Joined: Monday 17 September 2018 9:39
Target OS: Linux
Domoticz version:

Re: Compilation failure against Boost 1.70.0

Post by pocock »

Distributions don't have cmake 3.14, e.g. the most recent Debian release has 3.13 and stretch still has 3.7.2:

https://packages.qa.debian.org/c/cmake.html

It would make it a lot easier for people using distributions if Domoticz avoids dependencies on the latest versions of tools. Compiler macros can also be used sometimes to support older API versions.

Personally, I found that Domoticz compiles successfully with 3.7.2 and 3.13 so when I build the packages, I just change the CMake config to accept 3.7.0 or greater:
https://gitlab.com/dpocock/domoticz-deb ... sion.patch

Anybody who wants to install from packages on Debian/Raspbian, stretch or buster, can find details in this thread:
viewtopic.php?f=47&t=28951
Daniel Pocock, Debian Developer
https://danielpocock.com
darrepac
Posts: 133
Joined: Tuesday 04 February 2014 21:31
Target OS: Raspberry Pi / ODroid
Domoticz version:
Location: Isère, France
Contact:

Re: Compilation failure against Boost 1.70.0

Post by darrepac »

I have the same error
Found libBoost version 1.71.0, 106000 or newer required
While I use CMake 3.15.2 as written in the wiki...
Post Reply

Who is online

Users browsing this forum: No registered users and 0 guests