[mlpack-git] [mlpack] Failed to build mlpack using gcc 5.2.0 (#522)

Li Dong notifications at github.com
Tue Feb 16 21:30:18 EST 2016


I am using Mac OS X 10.11 with gcc 5.2.0. The compilation errors are as following:
```
In file included from /opt/software/1/include/boost/heap/priority_queue.hpp:20:0,
                 from /opt/software/packages/mlpack/mlpack-2.0.1/src/mlpack/core/tree/cosine_tree/cosine_tree.hpp:18,
                 from /opt/software/packages/mlpack/mlpack-2.0.1/src/mlpack/core/tree/cosine_tree/cosine_tree.cpp:14:
/opt/software/1/include/boost/heap/detail/stable_heap.hpp: In instantiation of 'boost::heap::detail::size_holder<false, SizeType>::size_holder(const boost::heap::detail::size_holder<false, SizeType>&) [with SizeType = long unsigned int]':
/opt/software/1/include/boost/heap/detail/stable_heap.hpp:185:68:   required from 'boost::heap::detail::heap_base<T, Cmp, constant_time_size, StabilityCounterType, stable>::heap_base(const boost::heap::detail::heap_base<T, Cmp, constant_time_size, StabilityCounterType, stable>&) [with T = mlpack::tree::CosineTree*; Cmp = mlpack::tree::CompareCosineNode; bool constant_time_size = false; StabilityCounterType = long unsigned int; bool stable = false]'
/opt/software/1/include/boost/heap/priority_queue.hpp:247:23:   required from 'void boost::heap::priority_queue<T, A0, A1, A2, A3>::push(const value_type&) [with T = mlpack::tree::CosineTree*; A0 = boost::heap::compare<mlpack::tree::CompareCosineNode>; A1 = boost::parameter::void_; A2 = boost::parameter::void_; A3 = boost::parameter::void_; boost::heap::priority_queue<T, A0, A1, A2, A3>::value_type = mlpack::tree::CosineTree*]'
/opt/software/packages/mlpack/mlpack-2.0.1/src/mlpack/core/tree/cosine_tree/cosine_tree.cpp:93:23:   required from here
/opt/software/1/include/boost/heap/detail/stable_heap.hpp:99:37: warning: unused parameter 'rhs' [-Wunused-parameter]
     size_holder(size_holder const & rhs)
                                     ^   
/opt/software/1/include/boost/heap/detail/stable_heap.hpp:99:37: warning: unused parameter 'rhs' [-Wunused-parameter]
/opt/software/1/include/boost/heap/detail/stable_heap.hpp: In instantiation of 'boost::heap::detail::size_holder<false, SizeType>::size_holder(boost::heap::detail::size_holder<false, SizeType>&&) [with SizeType = long unsigned int]':
/opt/software/1/include/boost/heap/detail/stable_heap.hpp:176:72:   required from 'boost::heap::detail::heap_base<T, Cmp, constant_time_size, StabilityCounterType, stable>::heap_base(boost::heap::detail::heap_base<T, Cmp, constant_time_size, StabilityCounterType, stable>&&) [with T = mlpack::tree::CosineTree*; Cmp = mlpack::tree::CompareCosineNode; bool constant_time_size = false; StabilityCounterType = long unsigned int; bool stable = false]'
/opt/software/gcc/5.2.0/include/c++/5.2.0/bits/predefined_ops.h:133:12:   required from 'void std::push_heap(_RAIter, _RAIter, _Compare) [with _RAIter = __gnu_cxx::__normal_iterator<mlpack::tree::CosineTree**, std::vector<mlpack::tree::CosineTree*, std::allocator<mlpack::tree::CosineTree*> > >; _Compare = boost::heap::detail::heap_base<mlpack::tree::CosineTree*, mlpack::tree::CompareCosineNode, false, long unsigned int, false>]'
/opt/software/1/include/boost/heap/priority_queue.hpp:247:23:   required from 'void boost::heap::priority_queue<T, A0, A1, A2, A3>::push(const value_type&) [with T = mlpack::tree::CosineTree*; A0 = boost::heap::compare<mlpack::tree::CompareCosineNode>; A1 = boost::parameter::void_; A2 = boost::parameter::void_; A3 = boost::parameter::void_; boost::heap::priority_queue<T, A0, A1, A2, A3>::value_type = mlpack::tree::CosineTree*]'
/opt/software/packages/mlpack/mlpack-2.0.1/src/mlpack/core/tree/cosine_tree/cosine_tree.cpp:93:23:   required from here
/opt/software/1/include/boost/heap/detail/stable_heap.hpp:96:32: warning: unused parameter 'rhs' [-Wunused-parameter]
     size_holder(size_holder && rhs)
                                ^   
/opt/software/1/include/boost/heap/detail/stable_heap.hpp:96:32: warning: unused parameter 'rhs' [-Wunused-parameter]
In file included from /opt/software/packages/mlpack/mlpack-2.0.1/src/mlpack/../mlpack/methods/kmeans/kmeans.hpp:199:0,
                 from /opt/software/packages/mlpack/mlpack-2.0.1/src/mlpack/methods/gmm/em_fit.hpp:22,
                 from /opt/software/packages/mlpack/mlpack-2.0.1/src/mlpack/methods/gmm/gmm.hpp:22,
                 from /opt/software/packages/mlpack/mlpack-2.0.1/src/mlpack/methods/gmm/gmm.cpp:16:
/opt/software/packages/mlpack/mlpack-2.0.1/src/mlpack/../mlpack/methods/kmeans/kmeans_impl.hpp: In member function 'void mlpack::kmeans::KMeans<MetricType, InitialPartitionPolicy, EmptyClusterPolicy, LloydStepType, MatType>::Cluster(const MatType&, size_t, arma::mat&, bool)': 
/opt/software/packages/mlpack/mlpack-2.0.1/src/mlpack/../mlpack/methods/kmeans/kmeans_impl.hpp:178:20: error: there are no arguments to 'isnan' that depend on a template parameter, so a declaration of 'isnan' must be available [-fpermissive]
     if (isnan(cNorm) || isinf(cNorm))
                    ^   
/opt/software/packages/mlpack/mlpack-2.0.1/src/mlpack/../mlpack/methods/kmeans/kmeans_impl.hpp:178:20: note: (if you use '-fpermissive', G++ will accept your code, but allowing the use of an undeclared name is deprecated)
/opt/software/packages/mlpack/mlpack-2.0.1/src/mlpack/../mlpack/methods/kmeans/kmeans_impl.hpp:178:36: error: there are no arguments to 'isinf' that depend on a template parameter, so a declaration of 'isinf' must be available [-fpermissive]
     if (isnan(cNorm) || isinf(cNorm))
                                    ^   
make[2]: *** [src/mlpack/CMakeFiles/mlpack.dir/methods/gmm/gmm.cpp.o] Error 1
make[2]: *** Waiting for unfinished jobs....
make[1]: *** [src/mlpack/CMakeFiles/mlpack.dir/all] Error 2
make: *** [all] Error 2
```

---
Reply to this email directly or view it on GitHub:
https://github.com/mlpack/mlpack/issues/522
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mailman.cc.gatech.edu/pipermail/mlpack-git/attachments/20160216/87f7a5f0/attachment.html>


More information about the mlpack-git mailing list