Skip to content
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

Error when compiling in centos6 #5233

Closed
Esteban2812 opened this issue May 5, 2017 · 2 comments
Closed

Error when compiling in centos6 #5233

Esteban2812 opened this issue May 5, 2017 · 2 comments

Comments

@Esteban2812
Copy link

Expected Behavior

As following step performed success:
cmake .. -DCMAKE_INSTALL_PREFIX=/apps/opt/icingadir -DICINGA2_WITH_PGSQL=OFF
I expect the "make" step perform without issues.

Current Behavior

When compiling following using next command:
make
This error is show:
[ 31%] Building CXX object lib/base/CMakeFiles/base.dir/base_unity.cpp.o
In file included from /usr/include/boost/range/iterator.hpp:19:0,
from /usr/include/boost/range/begin.hpp:24,
from /usr/include/boost/range/functions.hpp:18,
from /usr/include/boost/range/iterator_range.hpp:34,
from /usr/include/boost/range/as_literal.hpp:22,
from /usr/include/boost/algorithm/string/case_conv.hpp:19,
from /apps/opt/icingainstall/icinga2-master/lib/base/string.hpp:25,
from /apps/opt/icingainstall/icinga2-master/lib/base/type.hpp:24,
from /apps/opt/icingainstall/icinga2-master/lib/base/object.hpp:213,
from /apps/opt/icingainstall/icinga2-master/build/lib/base/application.thpp:4,
from /apps/opt/icingainstall/icinga2-master/lib/base/application.hpp:24,
from /apps/opt/icingainstall/icinga2-master/lib/base/application.cpp:20,
from /apps/opt/icingainstall/icinga2-master/build/lib/base/base_unity.cpp:1:
/usr/include/boost/range/mutable_iterator.hpp: In instantiation of ‘struct boost::range_mutable_iterator<boost::intrusive_ptricinga::Array >’:
/usr/include/boost/mpl/eval_if.hpp:60:31: required from ‘struct boost::mpl::eval_if_c<false, boost::range_const_iterator<boost::intrusive_ptricinga::Array >, boost::range_mutable_iterator<boost::intrusive_ptricinga::Array > >’
/usr/include/boost/range/iterator.hpp:63:63: required from ‘struct boost::range_iterator<boost::intrusive_ptricinga::Array >’
/usr/include/boost/range/begin.hpp:96:55: required by substitution of ‘template typename boost::range_iterator::type boost::begin(T&) [with T = boost::intrusive_ptricinga::Array]’
/apps/opt/icingainstall/icinga2-master/lib/base/array-script.cpp:125:27: required from here
/usr/include/boost/range/mutable_iterator.hpp:37:52: error: no type named ‘iterator’ in ‘class boost::intrusive_ptricinga::Array’
typedef BOOST_DEDUCED_TYPENAME C::iterator type;
^
In file included from /usr/include/boost/range/iterator.hpp:20:0,
from /usr/include/boost/range/begin.hpp:24,
from /usr/include/boost/range/functions.hpp:18,
from /usr/include/boost/range/iterator_range.hpp:34,
from /usr/include/boost/range/as_literal.hpp:22,
from /usr/include/boost/algorithm/string/case_conv.hpp:19,
from /apps/opt/icingainstall/icinga2-master/lib/base/string.hpp:25,
from /apps/opt/icingainstall/icinga2-master/lib/base/type.hpp:24,
from /apps/opt/icingainstall/icinga2-master/lib/base/object.hpp:213,
from /apps/opt/icingainstall/icinga2-master/build/lib/base/application.thpp:4,
from /apps/opt/icingainstall/icinga2-master/lib/base/application.hpp:24,
from /apps/opt/icingainstall/icinga2-master/lib/base/application.cpp:20,
from /apps/opt/icingainstall/icinga2-master/build/lib/base/base_unity.cpp:1:
/usr/include/boost/range/const_iterator.hpp: In instantiation of ‘struct boost::range_const_iterator<boost::intrusive_ptricinga::Array >’:
/usr/include/boost/mpl/eval_if.hpp:60:31: required from ‘struct boost::mpl::eval_if_c<true, boost::range_const_iterator<boost::intrusive_ptricinga::Array >, boost::range_mutable_iterator<const boost::intrusive_ptricinga::Array > >’
/usr/include/boost/range/iterator.hpp:63:63: required from ‘struct boost::range_iterator<const boost::intrusive_ptricinga::Array >’
/usr/include/boost/range/begin.hpp:107:61: required by substitution of ‘template typename boost::range_iterator::type boost::begin(const T&) [with T = boost::intrusive_ptricinga::Array]’
/apps/opt/icingainstall/icinga2-master/lib/base/array-script.cpp:125:27: required from here
/usr/include/boost/range/const_iterator.hpp:37:58: error: no type named ‘const_iterator’ in ‘class boost::intrusive_ptricinga::Array’
typedef BOOST_DEDUCED_TYPENAME C::const_iterator type;
^
In file included from /usr/include/boost/range/iterator.hpp:19:0,
from /usr/include/boost/range/begin.hpp:24,
from /usr/include/boost/range/functions.hpp:18,
from /usr/include/boost/range/iterator_range.hpp:34,
from /usr/include/boost/range/as_literal.hpp:22,
from /usr/include/boost/algorithm/string/case_conv.hpp:19,
from /apps/opt/icingainstall/icinga2-master/lib/base/string.hpp:25,
from /apps/opt/icingainstall/icinga2-master/lib/base/type.hpp:24,
from /apps/opt/icingainstall/icinga2-master/lib/base/object.hpp:213,
from /apps/opt/icingainstall/icinga2-master/build/lib/base/application.thpp:4,
from /apps/opt/icingainstall/icinga2-master/lib/base/application.hpp:24,
from /apps/opt/icingainstall/icinga2-master/lib/base/application.cpp:20,
from /apps/opt/icingainstall/icinga2-master/build/lib/base/base_unity.cpp:1:
/usr/include/boost/range/mutable_iterator.hpp: In instantiation of ‘struct boost::range_mutable_iterator<boost::intrusive_ptricinga::Dictionary >’:
/usr/include/boost/mpl/eval_if.hpp:60:31: required from ‘struct boost::mpl::eval_if_c<false, boost::range_const_iterator<boost::intrusive_ptricinga::Dictionary >, boost::range_mutable_iterator<boost::intrusive_ptricinga::Dictionary > >’
/usr/include/boost/range/iterator.hpp:63:63: required from ‘struct boost::range_iterator<boost::intrusive_ptricinga::Dictionary >’
/usr/include/boost/range/begin.hpp:96:55: required by substitution of ‘template typename boost::range_iterator::type boost::begin(T&) [with T = boost::intrusive_ptricinga::Dictionary]’
/apps/opt/icingainstall/icinga2-master/lib/base/dictionary-script.cpp:76:36: required from here
/usr/include/boost/range/mutable_iterator.hpp:37:52: error: no type named ‘iterator’ in ‘class boost::intrusive_ptricinga::Dictionary’
typedef BOOST_DEDUCED_TYPENAME C::iterator type;
^
In file included from /usr/include/boost/range/iterator.hpp:20:0,
from /usr/include/boost/range/begin.hpp:24,
from /usr/include/boost/range/functions.hpp:18,
from /usr/include/boost/range/iterator_range.hpp:34,
from /usr/include/boost/range/as_literal.hpp:22,
from /usr/include/boost/algorithm/string/case_conv.hpp:19,
from /apps/opt/icingainstall/icinga2-master/lib/base/string.hpp:25,
from /apps/opt/icingainstall/icinga2-master/lib/base/type.hpp:24,
from /apps/opt/icingainstall/icinga2-master/lib/base/object.hpp:213,
from /apps/opt/icingainstall/icinga2-master/build/lib/base/application.thpp:4,
from /apps/opt/icingainstall/icinga2-master/lib/base/application.hpp:24,
from /apps/opt/icingainstall/icinga2-master/lib/base/application.cpp:20,
from /apps/opt/icingainstall/icinga2-master/build/lib/base/base_unity.cpp:1:
/usr/include/boost/range/const_iterator.hpp: In instantiation of ‘struct boost::range_const_iterator<boost::intrusive_ptricinga::Dictionary >’:
/usr/include/boost/mpl/eval_if.hpp:60:31: required from ‘struct boost::mpl::eval_if_c<true, boost::range_const_iterator<boost::intrusive_ptricinga::Dictionary >, boost::range_mutable_iterator<const boost::intrusive_ptricinga::Dictionary > >’
/usr/include/boost/range/iterator.hpp:63:63: required from ‘struct boost::range_iterator<const boost::intrusive_ptricinga::Dictionary >’
/usr/include/boost/range/begin.hpp:107:61: required by substitution of ‘template typename boost::range_iterator::type boost::begin(const T&) [with T = boost::intrusive_ptricinga::Dictionary]’
/apps/opt/icingainstall/icinga2-master/lib/base/dictionary-script.cpp:76:36: required from here
/usr/include/boost/range/const_iterator.hpp:37:58: error: no type named ‘const_iterator’ in ‘class boost::intrusive_ptricinga::Dictionary’
typedef BOOST_DEDUCED_TYPENAME C::const_iterator type;
^
In file included from /usr/include/boost/thread/pthread/recursive_mutex.hpp:11:0,
from /usr/include/boost/thread/recursive_mutex.hpp:16,
from /apps/opt/icingainstall/icinga2-master/lib/base/object.hpp:25,
from /apps/opt/icingainstall/icinga2-master/build/lib/base/application.thpp:4,
from /apps/opt/icingainstall/icinga2-master/lib/base/application.hpp:24,
from /apps/opt/icingainstall/icinga2-master/lib/base/application.cpp:20,
from /apps/opt/icingainstall/icinga2-master/build/lib/base/base_unity.cpp:1:
/usr/include/boost/thread/locks.hpp: In instantiation of ‘boost::unique_lock& boost::unique_lock::operator=(boost::unique_lock&&) [with Mutex = boost::mutex]’:
/usr/include/boost/thread/future.hpp:414:33: required from here
/usr/include/boost/thread/locks.hpp:269:22: error: cannot bind ‘boost::unique_lockboost::mutex’ lvalue to ‘boost::unique_lockboost::mutex&&’
swap(temp);
^
/usr/include/boost/thread/locks.hpp:279:14: error: initializing argument 1 of ‘void boost::unique_lock::swap(boost::unique_lock&&) [with Mutex = boost::mutex]’
void swap(unique_lock&& other)
^
make[2]: *** [lib/base/CMakeFiles/base.dir/base_unity.cpp.o] Error 1
make[1]: *** [lib/base/CMakeFiles/base.dir/all] Error 2
make: *** [all] Error 2

In a second try, I got this error:

[ 23%] Building CXX object lib/base/CMakeFiles/base.dir/base_unity.cpp.o
In file included from /usr/include/boost/range/iterator.hpp:19:0,
from /usr/include/boost/range/begin.hpp:24,
from /usr/include/boost/range/functions.hpp:18,
from /usr/include/boost/range/iterator_range.hpp:34,
from /usr/include/boost/range/as_literal.hpp:22,
from /usr/include/boost/algorithm/string/case_conv.hpp:19,
from /apps/opt/icingainstall/icinga2-master/lib/base/string.hpp:25,
from /apps/opt/icingainstall/icinga2-master/lib/base/type.hpp:24,
from /apps/opt/icingainstall/icinga2-master/lib/base/object.hpp:213,
from /apps/opt/icingainstall/icinga2-master/build/lib/base/application.thpp:4,
from /apps/opt/icingainstall/icinga2-master/lib/base/application.hpp:24,
from /apps/opt/icingainstall/icinga2-master/lib/base/application.cpp:20,
from /apps/opt/icingainstall/icinga2-master/build/lib/base/base_unity.cpp:1:
/usr/include/boost/range/mutable_iterator.hpp: In instantiation of ‘struct boost::range_mutable_iterator<boost::intrusive_ptricinga::Array >’:
/usr/include/boost/mpl/eval_if.hpp:60:31: required from ‘struct boost::mpl::eval_if_c<false, boost::range_const_iterator<boost::intrusive_ptricinga::Array >, boost::range_mutable_iterator<boost::intrusive_ptricinga::Array > >’
/usr/include/boost/range/iterator.hpp:63:63: required from ‘struct boost::range_iterator<boost::intrusive_ptricinga::Array >’
/usr/include/boost/range/begin.hpp:96:55: required by substitution of ‘template typename boost::range_iterator::type boost::begin(T&) [with T = boost::intrusive_ptricinga::Array]’
/apps/opt/icingainstall/icinga2-master/lib/base/array-script.cpp:125:27: required from here
/usr/include/boost/range/mutable_iterator.hpp:37:52: error: no type named ‘iterator’ in ‘class boost::intrusive_ptricinga::Array’
typedef BOOST_DEDUCED_TYPENAME C::iterator type;
^
In file included from /usr/include/boost/range/iterator.hpp:20:0,
from /usr/include/boost/range/begin.hpp:24,
from /usr/include/boost/range/functions.hpp:18,
from /usr/include/boost/range/iterator_range.hpp:34,
from /usr/include/boost/range/as_literal.hpp:22,
from /usr/include/boost/algorithm/string/case_conv.hpp:19,
from /apps/opt/icingainstall/icinga2-master/lib/base/string.hpp:25,
from /apps/opt/icingainstall/icinga2-master/lib/base/type.hpp:24,
from /apps/opt/icingainstall/icinga2-master/lib/base/object.hpp:213,
from /apps/opt/icingainstall/icinga2-master/build/lib/base/application.thpp:4,
from /apps/opt/icingainstall/icinga2-master/lib/base/application.hpp:24,
from /apps/opt/icingainstall/icinga2-master/lib/base/application.cpp:20,
from /apps/opt/icingainstall/icinga2-master/build/lib/base/base_unity.cpp:1:
/usr/include/boost/range/const_iterator.hpp: In instantiation of ‘struct boost::range_const_iterator<boost::intrusive_ptricinga::Array >’:
/usr/include/boost/mpl/eval_if.hpp:60:31: required from ‘struct boost::mpl::eval_if_c<true, boost::range_const_iterator<boost::intrusive_ptricinga::Array >, boost::range_mutable_iterator<const boost::intrusive_ptricinga::Array > >’
/usr/include/boost/range/iterator.hpp:63:63: required from ‘struct boost::range_iterator<const boost::intrusive_ptricinga::Array >’
/usr/include/boost/range/begin.hpp:107:61: required by substitution of ‘template typename boost::range_iterator::type boost::begin(const T&) [with T = boost::intrusive_ptricinga::Array]’
/apps/opt/icingainstall/icinga2-master/lib/base/array-script.cpp:125:27: required from here
/usr/include/boost/range/const_iterator.hpp:37:58: error: no type named ‘const_iterator’ in ‘class boost::intrusive_ptricinga::Array’
typedef BOOST_DEDUCED_TYPENAME C::const_iterator type;
^
In file included from /usr/include/boost/range/iterator.hpp:19:0,
from /usr/include/boost/range/begin.hpp:24,
from /usr/include/boost/range/functions.hpp:18,
from /usr/include/boost/range/iterator_range.hpp:34,
from /usr/include/boost/range/as_literal.hpp:22,
from /usr/include/boost/algorithm/string/case_conv.hpp:19,
from /apps/opt/icingainstall/icinga2-master/lib/base/string.hpp:25,
from /apps/opt/icingainstall/icinga2-master/lib/base/type.hpp:24,
from /apps/opt/icingainstall/icinga2-master/lib/base/object.hpp:213,
from /apps/opt/icingainstall/icinga2-master/build/lib/base/application.thpp:4,
from /apps/opt/icingainstall/icinga2-master/lib/base/application.hpp:24,
from /apps/opt/icingainstall/icinga2-master/lib/base/application.cpp:20,
from /apps/opt/icingainstall/icinga2-master/build/lib/base/base_unity.cpp:1:
/usr/include/boost/range/mutable_iterator.hpp: In instantiation of ‘struct boost::range_mutable_iterator<boost::intrusive_ptricinga::Dictionary >’:
/usr/include/boost/mpl/eval_if.hpp:60:31: required from ‘struct boost::mpl::eval_if_c<false, boost::range_const_iterator<boost::intrusive_ptricinga::Dictionary >, boost::range_mutable_iterator<boost::intrusive_ptricinga::Dictionary > >’
/usr/include/boost/range/iterator.hpp:63:63: required from ‘struct boost::range_iterator<boost::intrusive_ptricinga::Dictionary >’
/usr/include/boost/range/begin.hpp:96:55: required by substitution of ‘template typename boost::range_iterator::type boost::begin(T&) [with T = boost::intrusive_ptricinga::Dictionary]’
/apps/opt/icingainstall/icinga2-master/lib/base/dictionary-script.cpp:76:36: required from here
/usr/include/boost/range/mutable_iterator.hpp:37:52: error: no type named ‘iterator’ in ‘class boost::intrusive_ptricinga::Dictionary’
typedef BOOST_DEDUCED_TYPENAME C::iterator type;
^
In file included from /usr/include/boost/range/iterator.hpp:20:0,
from /usr/include/boost/range/begin.hpp:24,
from /usr/include/boost/range/functions.hpp:18,
from /usr/include/boost/range/iterator_range.hpp:34,
from /usr/include/boost/range/as_literal.hpp:22,
from /usr/include/boost/algorithm/string/case_conv.hpp:19,
from /apps/opt/icingainstall/icinga2-master/lib/base/string.hpp:25,
from /apps/opt/icingainstall/icinga2-master/lib/base/type.hpp:24,
from /apps/opt/icingainstall/icinga2-master/lib/base/object.hpp:213,
from /apps/opt/icingainstall/icinga2-master/build/lib/base/application.thpp:4,
from /apps/opt/icingainstall/icinga2-master/lib/base/application.hpp:24,
from /apps/opt/icingainstall/icinga2-master/lib/base/application.cpp:20,
from /apps/opt/icingainstall/icinga2-master/build/lib/base/base_unity.cpp:1:
/usr/include/boost/range/const_iterator.hpp: In instantiation of ‘struct boost::range_const_iterator<boost::intrusive_ptricinga::Dictionary >’:
/usr/include/boost/mpl/eval_if.hpp:60:31: required from ‘struct boost::mpl::eval_if_c<true, boost::range_const_iterator<boost::intrusive_ptricinga::Dictionary >, boost::range_mutable_iterator<const boost::intrusive_ptricinga::Dictionary > >’
/usr/include/boost/range/iterator.hpp:63:63: required from ‘struct boost::range_iterator<const boost::intrusive_ptricinga::Dictionary >’
/usr/include/boost/range/begin.hpp:107:61: required by substitution of ‘template typename boost::range_iterator::type boost::begin(const T&) [with T = boost::intrusive_ptricinga::Dictionary]’
/apps/opt/icingainstall/icinga2-master/lib/base/dictionary-script.cpp:76:36: required from here
/usr/include/boost/range/const_iterator.hpp:37:58: error: no type named ‘const_iterator’ in ‘class boost::intrusive_ptricinga::Dictionary’
typedef BOOST_DEDUCED_TYPENAME C::const_iterator type;
^
In file included from /usr/include/boost/thread/pthread/recursive_mutex.hpp:11:0,
from /usr/include/boost/thread/recursive_mutex.hpp:16,
from /apps/opt/icingainstall/icinga2-master/lib/base/object.hpp:25,
from /apps/opt/icingainstall/icinga2-master/build/lib/base/application.thpp:4,
from /apps/opt/icingainstall/icinga2-master/lib/base/application.hpp:24,
from /apps/opt/icingainstall/icinga2-master/lib/base/application.cpp:20,
from /apps/opt/icingainstall/icinga2-master/build/lib/base/base_unity.cpp:1:
/usr/include/boost/thread/locks.hpp: In instantiation of ‘boost::unique_lock& boost::unique_lock::operator=(boost::unique_lock&&) [with Mutex = boost::mutex]’:
/usr/include/boost/thread/future.hpp:414:33: required from here
/usr/include/boost/thread/locks.hpp:269:22: error: cannot bind ‘boost::unique_lockboost::mutex’ lvalue to ‘boost::unique_lockboost::mutex&&’
swap(temp);
^
/usr/include/boost/thread/locks.hpp:279:14: error: initializing argument 1 of ‘void boost::unique_lock::swap(boost::unique_lock&&) [with Mutex = boost::mutex]’
void swap(unique_lock&& other)
^
make[2]: *** [lib/base/CMakeFiles/base.dir/base_unity.cpp.o] Error 1
make[1]: *** [lib/base/CMakeFiles/base.dir/all] Error 2
make: *** [all] Error 2

Possible Solution

Steps to Reproduce (for bugs)

  1. Install requirements as it is stated in (https://github.com/Icinga/icinga2/blob/master/INSTALL.md)
  2. In order to fullfil with GCC version, devtools is installed as is stated in this link
wget http://linuxsoft.cern.ch/cern/slc6X/x86_64/RPM-GPG-KEY-cern -O RPM-GPG-KEY-cern
wget -O /etc/yum.repos.d/slc6-devtoolset.repo http://linuxsoft.cern.ch/cern/devtoolset/slc6-devtoolset.repo
yum install devtoolset-2
  1. useradd icinga;su - icinga
  2. scl enable devtoolset-2 bash
  3. mkdir -p /apps/opt/icingadir ; mkdir -p cd /apps/opt/icingainstall; cd /apps/opt/icingainstall
  4. wget https://github.com/Icinga/icinga2/archive/master.zip -O icinga2.zip
  5. unzip -uo icinga2.zip -d .
  6. cd /apps/opt/icingainstall/icinga2-master/build
  7. cmake .. -DCMAKE_INSTALL_PREFIX=/apps/opt/icingadir
  8. make

Your Environment

@dnsmichi
Copy link
Contributor

dnsmichi commented May 5, 2017

@lazyfrosch raised the requirement to 1.48 in #5188 that may solve the compiling issue.

@lazyfrosch
Copy link
Contributor

Yes your errors are related with a Boost Requirement >= 1.48

Please see:

Also helpful for you might be:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants