Page 1 of 1

Can anyone advise regarding compiling errors?

Posted: Saturday 20 January 2018 9:39
by Jem101
Because of some issues (well basically it doesn't work) with the prebuilt beta releases and some python plugins I want to use, I thought I'd have a go at compiling from source as some users have suggested. Unfortunately I've run into some problems and I'm hoping someone here will be able to point me in the right direction.

So I've carefully followed the steps outlined in the wiki article but the final stage isn't completing. I have two Pi's, a production model 2, which I'd rather not mess about with, and a Pi 1 model B. I've made a clean Raspbian Stretch SD card (8 Gig), run the updates etc. and thats all stable. One one occasion the compile just errors out (no error massage just a crash), other times the Raspbian install just locks up completely requiring a hard restart, always at about the 20-25% mark.

Last night, I tried it again and left it overnight, when I reattached to the screen session I saw

Code: Select all

cc1plus: out of memory allocating 4067280 bytes after a total of 43425792 bytes
CMakeFiles/domoticz.dir/build.make:470: recipe for target 'CMakeFiles/domoticz.dir/main/SQLHelper.cpp.o' failed
make[2]: *** [CMakeFiles/domoticz.dir/main/SQLHelper.cpp.o] Error 1
CMakeFiles/Makefile2:71: recipe for target 'CMakeFiles/domoticz.dir/all' failed
make[1]: *** [CMakeFiles/domoticz.dir/all] Error 2
Makefile:149: recipe for target 'all' failed
make: *** [all] Error 2
So presumably it's a memory error.

In the wiki it mentions that you may need to use an older version of GCC and G++ because of memory, if I simply follow the wiki it seems to install GCC 6.3 so I thought if I uninstall GCC and G++

sudo apt-get remove GCC G++

and then auto remove and try installing 4.6

sudo apt-get install GCC-4.6 G++-4.6

then this seems to work but the cmake command errors out with 'can't find a compiler' message, so do I need to tell it explicitly to use 4.6 (presumably in usr/bin somewhere) or am I missing something completely obvious?

And last question, on a Pi B should I just use 'make' or add extra parameters to the command, and would the same apply if I were to run it on a Pi 2?

Many thanks in advance for any help and suggestions

John

Re: Can anyone advise regarding compiling errors?

Posted: Saturday 20 January 2018 17:01
by Jem101
OK bit of an update

Worked out for myself how to install gcc-4.6 and g++-4.6 and get it to be usable. I also thought I'd follow the advice in the wiki when using Raspbian Stretch and install libssl1.0-dev. All well and good.

Cloned the developer repository into ~/dev-domoticz and kicked off the cmake command (no errors - a couple of warnings though)

Code: Select all

-- ###########################
-- Compiling Revision #8833
-- ###########################
-- Using builtin Mosquitto library
-- Python3 includes found at: /usr/include/python3.5m
-- Building with I2C support
-- Building with SPI support
-- OPENSSL_LIBRARIES: /usr/lib/arm-linux-gnueabihf/libssl.a;/usr/lib/arm-linux-gnueabihf/libcrypto.a
CMake Warning at /usr/share/cmake-3.7/Modules/FindBoost.cmake:761 (message):
  Imported targets not available for Boost version 106501
Call Stack (most recent call first):
  /usr/share/cmake-3.7/Modules/FindBoost.cmake:865 (_Boost_COMPONENT_DEPENDENCIES)
  /usr/share/cmake-3.7/Modules/FindBoost.cmake:1470 (_Boost_MISSING_DEPENDENCIES)
  CMakeLists.txt:534 (find_package)


CMake Warning at /usr/share/cmake-3.7/Modules/FindBoost.cmake:761 (message):
  Imported targets not available for Boost version 106501
Call Stack (most recent call first):
  /usr/share/cmake-3.7/Modules/FindBoost.cmake:865 (_Boost_COMPONENT_DEPENDENCIES)
  /usr/share/cmake-3.7/Modules/FindBoost.cmake:1470 (_Boost_MISSING_DEPENDENCIES)
  CMakeLists.txt:534 (find_package)


CMake Warning at /usr/share/cmake-3.7/Modules/FindBoost.cmake:761 (message):
  Imported targets not available for Boost version 106501
Call Stack (most recent call first):
  /usr/share/cmake-3.7/Modules/FindBoost.cmake:865 (_Boost_COMPONENT_DEPENDENCIES)
  /usr/share/cmake-3.7/Modules/FindBoost.cmake:1470 (_Boost_MISSING_DEPENDENCIES)
  CMakeLists.txt:534 (find_package)


-- Boost version: 1.65.1
-- Found the following Boost libraries:
--   thread
--   date_time
--   system
-- Linking against boost static libraries
-- ZLIB libraries found at: /usr/lib/arm-linux-gnueabihf/libz.so
-- ZLIB includes found at: /usr/include
-- Curl libraries found at: /usr/lib/arm-linux-gnueabihf/libcurl.so
-- Curl includes found at: /usr/include/arm-linux-gnueabihf
-- LIBUSB found at: /usr/lib/arm-linux-gnueabihf/libusb.so
-- ==== OpenZWave not found, support disabled!
-- GPIO is available
-- Not found telldus-core (telldus-core.h), not adding tellstick support
CMake Warning (dev) at CMakeLists.txt:234 (GET_DIRECTORY_PROPERTY):
  Policy CMP0059 is not set: Do not treat DEFINITIONS as a built-in directory
  property.  Run "cmake --help-policy CMP0059" for policy details.  Use the
  cmake_policy command to set the policy and suppress this warning.
Call Stack (most recent call first):
  CMakeLists.txt:691 (ADD_PRECOMPILED_HEADER)
This warning is for project developers.  Use -Wno-dev to suppress it.

/usr/bin/c++  ;;-I/usr/include/python3.5m;-I/home/pi/dev-domoticz/main;-I/home/pi/dev-domoticz/tinyxpath;-I/usr/include;-I/usr/local/include;-I/usr/include;-I/usr/include/arm-linux-gnueabihf;;-DBUILTIN_MQTT;-DENABLE_PYTHON;-DHAVE_EXECINFO_H;-DHAVE_LINUX_I2C;-DHAVE_LINUX_SPI;-DWWW_ENABLE_SSL;-DWITH_LIBUSB;-DWITH_GPIO -x c++-header -o /home/pi/dev-domoticz/stdafx.h.gch/.c++ /home/pi/dev-domoticz/main/stdafx.h
-- Using static libgcc/libstdc++
-- Configuring done
Missing dependencies is a bit of a worry but it didn't actually error

and finally ran make -j 3

This time it got to 100% (reasonably quickly really) and just when I thought I'd cracked it I got the following

Code: Select all

[100%] Linking CXX executable domoticz
/usr/local/lib/libboost_thread.a(thread.o): In function `void std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::_M_construct<char const*>(char const*, char const*, std::forward_iterator_tag) [clone .isra.140]':
thread.cpp:(.text+0x70): undefined reference to `std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::_M_create(unsigned int&, unsigned int)'
/usr/local/lib/libboost_thread.a(thread.o): In function `boost::detail::make_external_thread_data()':
thread.cpp:(.text+0xc28): undefined reference to `std::runtime_error::runtime_error(char const*)'
thread.cpp:(.text+0xcc0): undefined reference to `operator delete(void*, unsigned int)'
thread.cpp:(.text+0xce0): undefined reference to `std::runtime_error::runtime_error(char const*)'
thread.cpp:(.text+0xd44): undefined reference to `std::runtime_error::runtime_error(char const*)'
thread.cpp:(.text+0xda0): undefined reference to `std::runtime_error::runtime_error(char const*)'
thread.cpp:(.text+0xe04): undefined reference to `std::runtime_error::runtime_error(char const*)'
thread.cpp:(.text+0xe58): undefined reference to `std::runtime_error::runtime_error(char const*)'
/usr/local/lib/libboost_thread.a(thread.o): In function `boost::detail::thread_data_base::~thread_data_base()':
thread.cpp:(.text+0x15e8): undefined reference to `operator delete(void*, unsigned int)'
/usr/local/lib/libboost_thread.a(thread.o): In function `tls_destructor':
thread.cpp:(.text+0x1764): undefined reference to `operator delete(void*, unsigned int)'
/usr/local/lib/libboost_thread.a(thread.o): In function `boost::this_thread::hidden::sleep_until(timespec const&)':
thread.cpp:(.text+0x20c4): undefined reference to `std::runtime_error::runtime_error(char const*)'
thread.cpp:(.text+0x21f4): undefined reference to `std::runtime_error::runtime_error(char const*)'
thread.cpp:(.text+0x2234): undefined reference to `std::runtime_error::runtime_error(char const*)'
thread.cpp:(.text+0x22c0): undefined reference to `std::runtime_error::runtime_error(char const*)'
thread.cpp:(.text+0x2304): undefined reference to `std::runtime_error::runtime_error(char const*)'
/usr/local/lib/libboost_thread.a(thread.o):thread.cpp:(.text+0x2378): more undefined references to `std::runtime_error::runtime_error(char const*)' follow
/usr/local/lib/libboost_thread.a(thread.o): In function `boost::thread::physical_concurrency()':
thread.cpp:(.text+0x2d50): undefined reference to `std::basic_istream<char, std::char_traits<char> >& std::getline<char, std::char_traits<char>, std::allocator<char> >(std::basic_istream<char, std::char_traits<char> >&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >&, char)'
thread.cpp:(.text+0x2fcc): undefined reference to `std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::_M_erase(unsigned int, unsigned int)'
thread.cpp:(.text+0x3064): undefined reference to `std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::_M_erase(unsigned int, unsigned int)'
thread.cpp:(.text+0x314c): undefined reference to `std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::_M_erase(unsigned int, unsigned int)'
thread.cpp:(.text+0x31e4): undefined reference to `std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::_M_erase(unsigned int, unsigned int)'
thread.cpp:(.text+0x3770): undefined reference to `std::__cxx11::numpunct<char> const& std::use_facet<std::__cxx11::numpunct<char> >(std::locale const&)'
thread.cpp:(.text+0x3884): undefined reference to `std::__cxx11::numpunct<char> const& std::use_facet<std::__cxx11::numpunct<char> >(std::locale const&)'
/usr/local/lib/libboost_thread.a(thread.o): In function `boost::detail::sp_counted_impl_p<boost::detail::thread_data_base>::~sp_counted_impl_p()':
thread.cpp:(.text._ZN5boost6detail17sp_counted_impl_pINS0_16thread_data_baseEED0Ev[_ZN5boost6detail17sp_counted_impl_pINS0_16thread_data_baseEED5Ev]+0xc): undefined reference to `operator delete(void*, unsigned int)'
/usr/local/lib/libboost_thread.a(thread.o): In function `boost::detail::sp_counted_impl_p<boost::exception_detail::error_info_base>::~sp_counted_impl_p()':
thread.cpp:(.text._ZN5boost6detail17sp_counted_impl_pINS_16exception_detail15error_info_baseEED0Ev[_ZN5boost6detail17sp_counted_impl_pINS_16exception_detail15error_info_baseEED5Ev]+0xc): undefined reference to `operator delete(void*, unsigned int)'
/usr/local/lib/libboost_thread.a(thread.o): In function `boost::error_info<boost::tag_original_exception_type, std::type_info const*>::~error_info()':
thread.cpp:(.text._ZN5boost10error_infoINS_27tag_original_exception_typeEPKSt9type_infoED0Ev[_ZN5boost10error_infoINS_27tag_original_exception_typeEPKSt9type_infoED5Ev]+0xc): undefined reference to `operator delete(void*, unsigned int)'
/usr/local/lib/libboost_thread.a(thread.o): In function `boost::detail::sp_counted_impl_p<boost::exception_detail::error_info_base>::dispose()':
thread.cpp:(.text._ZN5boost6detail17sp_counted_impl_pINS_16exception_detail15error_info_baseEE7disposeEv[boost::detail::sp_counted_impl_p<boost::exception_detail::error_info_base>::dispose()]+0x24): undefined reference to `operator delete(void*, unsigned int)'
/usr/local/lib/libboost_thread.a(thread.o): In function `boost::exception_detail::error_info_container_impl::diagnostic_information(char const*) const':
thread.cpp:(.text._ZNK5boost16exception_detail25error_info_container_impl22diagnostic_informationEPKc[boost::exception_detail::error_info_container_impl::diagnostic_information(char const*) const]+0x2bc): undefined reference to `std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::swap(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >&)'
thread.cpp:(.text._ZNK5boost16exception_detail25error_info_container_impl22diagnostic_informationEPKc[boost::exception_detail::error_info_container_impl::diagnostic_information(char const*) const]+0x3e8): undefined reference to `std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::_M_assign(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)'
thread.cpp:(.text._ZNK5boost16exception_detail25error_info_container_impl22diagnostic_informationEPKc[boost::exception_detail::error_info_container_impl::diagnostic_information(char const*) const]+0x41c): undefined reference to `std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::_M_assign(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)'
thread.cpp:(.text._ZNK5boost16exception_detail25error_info_container_impl22diagnostic_informationEPKc[boost::exception_detail::error_info_container_impl::diagnostic_information(char const*) const]+0x430): undefined reference to `std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::_M_assign(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)'
thread.cpp:(.text._ZNK5boost16exception_detail25error_info_container_impl22diagnostic_informationEPKc[boost::exception_detail::error_info_container_impl::diagnostic_information(char const*) const]+0x460): undefined reference to `std::__cxx11::basic_ostringstream<char, std::char_traits<char>, std::allocator<char> >::~basic_ostringstream()'
thread.cpp:(.text._ZNK5boost16exception_detail25error_info_container_impl22diagnostic_informationEPKc[boost::exception_detail::error_info_container_impl::diagnostic_information(char const*) const]+0x4e0): undefined reference to `VTT for std::__cxx11::basic_ostringstream<char, std::char_traits<char>, std::allocator<char> >'
thread.cpp:(.text._ZNK5boost16exception_detail25error_info_container_impl22diagnostic_informationEPKc[boost::exception_detail::error_info_container_impl::diagnostic_information(char const*) const]+0x4e8): undefined reference to `vtable for std::__cxx11::basic_ostringstream<char, std::char_traits<char>, std::allocator<char> >'
thread.cpp:(.text._ZNK5boost16exception_detail25error_info_container_impl22diagnostic_informationEPKc[boost::exception_detail::error_info_container_impl::diagnostic_information(char const*) const]+0x4f0): undefined reference to `vtable for std::__cxx11::basic_stringbuf<char, std::char_traits<char>, std::allocator<char> >'
thread.cpp:(.text._ZNK5boost16exception_detail25error_info_container_impl22diagnostic_informationEPKc[boost::exception_detail::error_info_container_impl::diagnostic_information(char const*) const]+0x4f8): undefined reference to `vtable for std::__cxx11::basic_ostringstream<char, std::char_traits<char>, std::allocator<char> >'
/usr/local/lib/libboost_thread.a(thread.o): In function `boost::exception_detail::error_info_container_impl::release() const':
thread.cpp:(.text._ZNK5boost16exception_detail25error_info_container_impl7releaseEv[boost::exception_detail::error_info_container_impl::release() const]+0x54): undefined reference to `operator delete(void*, unsigned int)'
/usr/local/lib/libboost_thread.a(thread.o): In function `boost::detail::externally_launched_thread::~externally_launched_thread()':
thread.cpp:(.text._ZN5boost6detail26externally_launched_threadD0Ev[_ZN5boost6detail26externally_launched_threadD5Ev]+0xe8): undefined reference to `operator delete(void*, unsigned int)'
/usr/local/lib/libboost_thread.a(thread.o): In function `void std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > >::_M_initialize_dispatch<boost::iterators::transform_iterator<boost::algorithm::detail::copy_iterator_rangeF<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, __gnu_cxx::__normal_iterator<char*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > >, boost::algorithm::split_iterator<__gnu_cxx::__normal_iterator<char*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > >, boost::iterators::use_default, boost::iterators::use_default> >(boost::iterators::transform_iterator<boost::algorithm::detail::copy_iterator_rangeF<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, __gnu_cxx::__normal_iterator<char*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > >, boost::algorithm::split_iterator<__gnu_cxx::__normal_iterator<char*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > >, boost::iterators::use_default, boost::iterators::use_default>, boost::iterators::transform_iterator<boost::algorithm::detail::copy_iterator_rangeF<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, __gnu_cxx::__normal_iterator<char*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > >, boost::algorithm::split_iterator<__gnu_cxx::__normal_iterator<char*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > >, boost::iterators::use_default, boost::iterators::use_default>, std::__false_type)':
thread.cpp:(.text._ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE22_M_initialize_dispatchIN5boost9iterators18transform_iteratorINS9_9algorithm6detail20copy_iterator_rangeFIS5_N9__gnu_cxx17__normal_iteratorIPcS5_EEEENSC_14split_iteratorISI_EENSA_11use_defaultESM_EEEEvT_SO_St12__false_type[void std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > >::_M_initialize_dispatch<boost::iterators::transform_iterator<boost::algorithm::detail::copy_iterator_rangeF<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, __gnu_cxx::__normal_iterator<char*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > >, boost::algorithm::split_iterator<__gnu_cxx::__normal_iterator<char*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > >, boost::iterators::use_default, boost::iterators::use_default> >(boost::iterators::transform_iterator<boost::algorithm::detail::copy_iterator_rangeF<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, __gnu_cxx::__normal_iterator<char*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > >, boost::algorithm::split_iterator<__gnu_cxx::__normal_iterator<char*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > >, boost::iterators::use_default, boost::iterators::use_default>, boost::iterators::transform_iterator<boost::algorithm::detail::copy_iterator_rangeF<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, __gnu_cxx::__normal_iterator<char*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > >, boost::algorithm::split_iterator<__gnu_cxx::__normal_iterator<char*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > >, boost::iterators::use_default, boost::iterators::use_default>, std::__false_type)]+0x208): undefined reference to `std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::_M_create(unsigned int&, unsigned int)'
/usr/local/lib/libboost_thread.a(thread.o): In function `std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > >& boost::algorithm::iter_split<std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > >, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, boost::algorithm::detail::token_finderF<boost::algorithm::detail::is_any_ofF<char> > >(std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > >&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >&, boost::algorithm::detail::token_finderF<boost::algorithm::detail::is_any_ofF<char> >)':
thread.cpp:(.text._ZN5boost9algorithm10iter_splitISt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS8_EES8_NS0_6detail13token_finderFINSB_10is_any_ofFIcEEEEEERT_SH_RT0_T1_[std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > >& boost::algorithm::iter_split<std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > >, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, boost::algorithm::detail::token_finderF<boost::algorithm::detail::is_any_ofF<char> > >(std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > >&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >&, boost::algorithm::detail::token_finderF<boost::algorithm::detail::is_any_ofF<char> >)]+0x590): undefined reference to `operator delete(void*, unsigned int)'
/usr/local/lib/libboost_system.a(error_code.o): In function `boost::system::(anonymous namespace)::system_error_category::~system_error_category()':
error_code.cpp:(.text+0x30): undefined reference to `std::_V2::error_category::~error_category()'
/usr/local/lib/libboost_system.a(error_code.o): In function `boost::system::(anonymous namespace)::system_error_category::~system_error_category()':
error_code.cpp:(.text+0x5c): undefined reference to `std::_V2::error_category::~error_category()'
error_code.cpp:(.text+0x68): undefined reference to `operator delete(void*, unsigned int)'
/usr/local/lib/libboost_system.a(error_code.o): In function `boost::system::(anonymous namespace)::generic_error_category::~generic_error_category()':
error_code.cpp:(.text+0x94): undefined reference to `std::_V2::error_category::~error_category()'
/usr/local/lib/libboost_system.a(error_code.o): In function `boost::system::(anonymous namespace)::generic_error_category::~generic_error_category()':
error_code.cpp:(.text+0xc0): undefined reference to `std::_V2::error_category::~error_category()'
error_code.cpp:(.text+0xcc): undefined reference to `operator delete(void*, unsigned int)'
/usr/local/lib/libboost_system.a(error_code.o): In function `boost::system::(anonymous namespace)::generic_error_category::message(int) const':
error_code.cpp:(.text+0x17c): undefined reference to `std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::_M_create(unsigned int&, unsigned int)'
error_code.cpp:(.text+0x260): undefined reference to `std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::_M_create(unsigned int&, unsigned int)'
error_code.cpp:(.text+0x2ac): undefined reference to `std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::~basic_string()'
/usr/local/lib/libboost_system.a(error_code.o): In function `boost::system::error_category::std_category::equivalent(int, std::error_condition const&) const':
error_code.cpp:(.text._ZNK5boost6system14error_category12std_category10equivalentEiRKSt15error_condition[boost::system::error_category::std_category::equivalent(int, std::error_condition const&) const]+0x20): undefined reference to `std::_V2::generic_category()'
error_code.cpp:(.text._ZNK5boost6system14error_category12std_category10equivalentEiRKSt15error_condition[boost::system::error_category::std_category::equivalent(int, std::error_condition const&) const]+0x26c): undefined reference to `typeinfo for std::_V2::error_category'
/usr/local/lib/libboost_system.a(error_code.o): In function `boost::system::error_category::std_category::equivalent(std::error_code const&, int) const':
error_code.cpp:(.text._ZNK5boost6system14error_category12std_category10equivalentERKSt10error_codei[boost::system::error_category::std_category::equivalent(std::error_code const&, int) const]+0x20): undefined reference to `std::_V2::generic_category()'
error_code.cpp:(.text._ZNK5boost6system14error_category12std_category10equivalentERKSt10error_codei[boost::system::error_category::std_category::equivalent(std::error_code const&, int) const]+0x268): undefined reference to `typeinfo for std::_V2::error_category'
collect2: ld returned 1 exit status
CMakeFiles/domoticz.dir/build.make:5930: recipe for target 'domoticz' failed
make[2]: *** [domoticz] Error 1
CMakeFiles/Makefile2:71: recipe for target 'CMakeFiles/domoticz.dir/all' failed
make[1]: *** [CMakeFiles/domoticz.dir/all] Error 2
Makefile:149: recipe for target 'all' failed
make: *** [all] Error 2
So close......

Any ideas or suggestions gratefully received. Problem with boost possibly?

Re: Can anyone advise regarding compiling errors?

Posted: Saturday 20 January 2018 22:08
by febalci
Try with boost 1.59.

Re: Can anyone advise regarding compiling errors?

Posted: Saturday 20 January 2018 22:30
by Siewert308SW
Never got it propperly working on Stretch.
But for Jessie i do the following and it never fails.
When i think i screwed the OS to much i always start with a clean install.

Code: Select all

sudo nano /etc/dphys-swapfile
Then set: CONF_SWAPFILE=100 to CONF_SWAPFILE=1024
if Rpi2 then: CONF_SWAPFILE=512

sudo reboot

Code: Select all

sudo apt-get update 
sudo apt-get upgrade -y  
sudo apt-get install libudev-dev libpython3. cmake make gcc g++ libssl-dev git curl libcurl4-openssl-dev libusb-dev libsqlite3-dev subversion zlib1g-dev libssl-dev git-core build-essential libblkid-dev e2fslibs-dev libboost-all-dev libaudit-dev python3-dev -y

Code: Select all

git clone https://github.com/OpenZWave/open-zwave open-zwave-read-only
cd open-zwave-read-only
make
cd ..

Code: Select all

git clone https://github.com/domoticz/domoticz.git dev-domoticz
cd dev-domoticz
cmake -DCMAKE_BUILD_TYPE=Beta CMakeLists.txt
make
cd ..

Code: Select all

cd dev-domoticz
sudo cp domoticz.sh /etc/init.d/domoticz.sh
sudo chmod +x /etc/init.d/domoticz.sh
sudo update-rc.d domoticz.sh defaults

Code: Select all

sudo nano /etc/init.d/domoticz.sh
change: 
DAEMON=/home/$USERNAME/domoticz/$NAME

to

DAEMON=/home/$USERNAME/dev-domoticz/$NAME

Code: Select all

fire it up...
./domoticz
If running the hit ctrl + C
Reboot the system

Re: Can anyone advise regarding compiling errors?

Posted: Saturday 20 January 2018 22:46
by waaren
Please have a look at this to complete compiling from source on Debian stretch

http://www.domoticz.com/forum/viewtopic ... 28&t=21474