# Error during compiling ROOTVecOps on ROOT v6.14.04

**URL:** <https://root-forum.cern.ch/t/error-during-compiling-rootvecops-on-root-v6-14-04/30525>\
**Category:** ROOT\
**Created:** [September 3, 2018, 10:38am UTC](https://root-forum.cern.ch/t/error-during-compiling-rootvecops-on-root-v6-14-04/30525 "2018-09-03T10:38:06Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![tcoates3](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/tcoates3/32/17022_2.png) [@tcoates3](https://root-forum.cern.ch/u/tcoates3)\
**Post date:** [September 3, 2018, 10:38am UTC](https://root-forum.cern.ch/t/error-during-compiling-rootvecops-on-root-v6-14-04/30525/1 "2018-09-03T10:38:06Z")

</div>

* * *

_ROOT Version:_ 6.14.04  
_Platform:_ Scientific Linux 6  
_Compiler:_ gcc 4.9.1

* * *

I’m trying to install ROOT 6.14.04 on a PC running Scientific Linux 6 as the OS, and having trouble with the compilation of ROOTVecOps. It’s important that I install ROOT on this machine rather than using e.g. lxplus, as it’s a requirement for a piece of software that must also be installed locally. I’m aware that the default versions of cmake and gcc that come with SL6 are too low for compiling ROOT, but I have switched to cmake 3.4.1 and gcc 4.9.1. The output of `gcc --version` is:

```auto
gcc (GCC) 4.9.1 20140922 (Red Hat 4.9.1-10)

```

and `cmake3 --version` is:

```auto
cmake version 3.4.1

```

This is the error message given during compilation:

```auto
[88%] Building CXX object math/vecops/CMakeFiles/ROOTVecOps.dir/G__ROOTVecOps.cxx.o
In file included from /home/dreamtest/dqmsoftware/root-6.14.04/obj/math/vecops/G__ROOTVecOps.cxx:41:0:
/home/dreamtest/dqmsoftware/root-6.14.04/obj/include/ROOT/RVec.hxx:826:1: error: ambiguous template specialization ‘fdim<>’ for ‘ROOT::VecOps::RVec<double> ROOT::VecOps::fdim(const ROOT::VecOps::RVec<double>&, const ROOT::VecOps::RVec<double>&)’
 TVEC_EXTERN_STD_FUNCTIONS(double)
 ^
/home/dreamtest/dqmsoftware/root-6.14.04/obj/include/ROOT/RVec.hxx:502:1: note: candidates are: template<class T0, class T1> ROOT::VecOps::RVec<decltype ((typename ROOT::VecOps::PromoteTypeImpl<T>::Type() + typename ROOT::VecOps::PromoteTypeImpl<V>::Type()))> ROOT::VecOps::fdim(const T0&, const ROOT::VecOps::RVec<T1>&)
 TVEC_STD_BINARY_FUNCTION(fdim)
 ^
/home/dreamtest/dqmsoftware/root-6.14.04/obj/include/ROOT/RVec.hxx:502:1: note: template<class T0, class T1> ROOT::VecOps::RVec<decltype ((typename ROOT::VecOps::PromoteTypeImpl<T>::Type() + typename ROOT::VecOps::PromoteTypeImpl<V>::Type()))> ROOT::VecOps::fdim(const ROOT::VecOps::RVec<T>&, const T1&)
 TVEC_STD_BINARY_FUNCTION(fdim)
 ^
/home/dreamtest/dqmsoftware/root-6.14.04/obj/include/ROOT/RVec.hxx:502:1: note: template<class T0, class T1> ROOT::VecOps::RVec<decltype ((typename ROOT::VecOps::PromoteTypeImpl<T>::Type() + typename ROOT::VecOps::PromoteTypeImpl<V>::Type()))> ROOT::VecOps::fdim(const ROOT::VecOps::RVec<T>&, const ROOT::VecOps::RVec<T1>&)
 TVEC_STD_BINARY_FUNCTION(fdim)
 ^
/home/dreamtest/dqmsoftware/root-6.14.04/obj/include/ROOT/RVec.hxx:826:1: error: ambiguous template specialization ‘fmod<>’ for ‘ROOT::VecOps::RVec<double> ROOT::VecOps::fmod(const ROOT::VecOps::RVec<double>&, const ROOT::VecOps::RVec<double>&)’
 TVEC_EXTERN_STD_FUNCTIONS(double)
 ^
/home/dreamtest/dqmsoftware/root-6.14.04/obj/include/ROOT/RVec.hxx:503:1: note: candidates are: template<class T0, class T1> ROOT::VecOps::RVec<decltype ((typename ROOT::VecOps::PromoteTypeImpl<T>::Type() + typename ROOT::VecOps::PromoteTypeImpl<V>::Type()))> ROOT::VecOps::fmod(const T0&, const ROOT::VecOps::RVec<T1>&)
 TVEC_STD_BINARY_FUNCTION(fmod)
 ^
/home/dreamtest/dqmsoftware/root-6.14.04/obj/include/ROOT/RVec.hxx:503:1: note: template<class T0, class T1> ROOT::VecOps::RVec<decltype ((typename ROOT::VecOps::PromoteTypeImpl<T>::Type() + typename ROOT::VecOps::PromoteTypeImpl<V>::Type()))> ROOT::VecOps::fmod(const ROOT::VecOps::RVec<T>&, const T1&)
 TVEC_STD_BINARY_FUNCTION(fmod)
 ^
/home/dreamtest/dqmsoftware/root-6.14.04/obj/include/ROOT/RVec.hxx:503:1: note: template<class T0, class T1> ROOT::VecOps::RVec<decltype ((typename ROOT::VecOps::PromoteTypeImpl<T>::Type() + typename ROOT::VecOps::PromoteTypeImpl<V>::Type()))> ROOT::VecOps::fmod(const ROOT::VecOps::RVec<T>&, const ROOT::VecOps::RVec<T1>&)
 TVEC_STD_BINARY_FUNCTION(fmod)
 ^
/home/dreamtest/dqmsoftware/root-6.14.04/obj/include/ROOT/RVec.hxx:826:1: error: ambiguous template specialization ‘remainder<>’ for ‘ROOT::VecOps::RVec<double> ROOT::VecOps::remainder(const ROOT::VecOps::RVec<double>&, const ROOT::VecOps::RVec<double>&)’
 TVEC_EXTERN_STD_FUNCTIONS(double)
 ^
/home/dreamtest/dqmsoftware/root-6.14.04/obj/include/ROOT/RVec.hxx:504:1: note: candidates are: template<class T0, class T1> ROOT::VecOps::RVec<decltype ((typename ROOT::VecOps::PromoteTypeImpl<T>::Type() + typename ROOT::VecOps::PromoteTypeImpl<V>::Type()))> ROOT::VecOps::remainder(const T0&, const ROOT::VecOps::RVec<T1>&)
 TVEC_STD_BINARY_FUNCTION(remainder)
 ^
/home/dreamtest/dqmsoftware/root-6.14.04/obj/include/ROOT/RVec.hxx:504:1: note: template<class T0, class T1> ROOT::VecOps::RVec<decltype ((typename ROOT::VecOps::PromoteTypeImpl<T>::Type() + typename ROOT::VecOps::PromoteTypeImpl<V>::Type()))> ROOT::VecOps::remainder(const ROOT::VecOps::RVec<T>&, const T1&)
 TVEC_STD_BINARY_FUNCTION(remainder)
 ^
/home/dreamtest/dqmsoftware/root-6.14.04/obj/include/ROOT/RVec.hxx:504:1: note: template<class T0, class T1> ROOT::VecOps::RVec<decltype ((typename ROOT::VecOps::PromoteTypeImpl<T>::Type() + typename ROOT::VecOps::PromoteTypeImpl<V>::Type()))> ROOT::VecOps::remainder(const ROOT::VecOps::RVec<T>&, const ROOT::VecOps::RVec<T1>&)
 TVEC_STD_BINARY_FUNCTION(remainder)
 ^
/home/dreamtest/dqmsoftware/root-6.14.04/obj/include/ROOT/RVec.hxx:826:1: error: ambiguous template specialization ‘pow<>’ for ‘ROOT::VecOps::RVec<double> ROOT::VecOps::pow(const ROOT::VecOps::RVec<double>&, const ROOT::VecOps::RVec<double>&)’
 TVEC_EXTERN_STD_FUNCTIONS(double)
 ^
/home/dreamtest/dqmsoftware/root-6.14.04/obj/include/ROOT/RVec.hxx:515:1: note: candidates are: template<class T0, class T1> ROOT::VecOps::RVec<decltype ((typename ROOT::VecOps::PromoteTypeImpl<T>::Type() + typename ROOT::VecOps::PromoteTypeImpl<V>::Type()))> ROOT::VecOps::pow(const T0&, const ROOT::VecOps::RVec<T1>&)
 TVEC_STD_BINARY_FUNCTION(pow)
 ^
/home/dreamtest/dqmsoftware/root-6.14.04/obj/include/ROOT/RVec.hxx:515:1: note: template<class T0, class T1> ROOT::VecOps::RVec<decltype ((typename ROOT::VecOps::PromoteTypeImpl<T>::Type() + typename ROOT::VecOps::PromoteTypeImpl<V>::Type()))> ROOT::VecOps::pow(const ROOT::VecOps::RVec<T>&, const T1&)
 TVEC_STD_BINARY_FUNCTION(pow)
 ^
/home/dreamtest/dqmsoftware/root-6.14.04/obj/include/ROOT/RVec.hxx:515:1: note: template<class T0, class T1> ROOT::VecOps::RVec<decltype ((typename ROOT::VecOps::PromoteTypeImpl<T>::Type() + typename ROOT::VecOps::PromoteTypeImpl<V>::Type()))> ROOT::VecOps::pow(const ROOT::VecOps::RVec<T>&, const ROOT::VecOps::RVec<T1>&)
 TVEC_STD_BINARY_FUNCTION(pow)
 ^
/home/dreamtest/dqmsoftware/root-6.14.04/obj/include/ROOT/RVec.hxx:826:1: error: ambiguous template specialization ‘hypot<>’ for ‘ROOT::VecOps::RVec<double> ROOT::VecOps::hypot(const ROOT::VecOps::RVec<double>&, const ROOT::VecOps::RVec<double>&)’
 TVEC_EXTERN_STD_FUNCTIONS(double)
 ^
/home/dreamtest/dqmsoftware/root-6.14.04/obj/include/ROOT/RVec.hxx:518:1: note: candidates are: template<class T0, class T1> ROOT::VecOps::RVec<decltype ((typename ROOT::VecOps::PromoteTypeImpl<T>::Type() + typename ROOT::VecOps::PromoteTypeImpl<V>::Type()))> ROOT::VecOps::hypot(const T0&, const ROOT::VecOps::RVec<T1>&)
 TVEC_STD_BINARY_FUNCTION(hypot)
 ^
/home/dreamtest/dqmsoftware/root-6.14.04/obj/include/ROOT/RVec.hxx:518:1: note: template<class T0, class T1> ROOT::VecOps::RVec<decltype ((typename ROOT::VecOps::PromoteTypeImpl<T>::Type() + typename ROOT::VecOps::PromoteTypeImpl<V>::Type()))> ROOT::VecOps::hypot(const ROOT::VecOps::RVec<T>&, const T1&)
 TVEC_STD_BINARY_FUNCTION(hypot)
 ^
/home/dreamtest/dqmsoftware/root-6.14.04/obj/include/ROOT/RVec.hxx:518:1: note: template<class T0, class T1> ROOT::VecOps::RVec<decltype ((typename ROOT::VecOps::PromoteTypeImpl<T>::Type() + typename ROOT::VecOps::PromoteTypeImpl<V>::Type()))> ROOT::VecOps::hypot(const ROOT::VecOps::RVec<T>&, const ROOT::VecOps::RVec<T1>&)
 TVEC_STD_BINARY_FUNCTION(hypot)
 ^
/home/dreamtest/dqmsoftware/root-6.14.04/obj/include/ROOT/RVec.hxx:826:1: error: ambiguous template specialization ‘atan2<>’ for ‘ROOT::VecOps::RVec<double> ROOT::VecOps::atan2(const ROOT::VecOps::RVec<double>&, const ROOT::VecOps::RVec<double>&)’
 TVEC_EXTERN_STD_FUNCTIONS(double)
 ^
/home/dreamtest/dqmsoftware/root-6.14.04/obj/include/ROOT/RVec.hxx:526:1: note: candidates are: template<class T0, class T1> ROOT::VecOps::RVec<decltype ((typename ROOT::VecOps::PromoteTypeImpl<T>::Type() + typename ROOT::VecOps::PromoteTypeImpl<V>::Type()))> ROOT::VecOps::atan2(const T0&, const ROOT::VecOps::RVec<T1>&)
 TVEC_STD_BINARY_FUNCTION(atan2)
 ^
/home/dreamtest/dqmsoftware/root-6.14.04/obj/include/ROOT/RVec.hxx:526:1: note: template<class T0, class T1> ROOT::VecOps::RVec<decltype ((typename ROOT::VecOps::PromoteTypeImpl<T>::Type() + typename ROOT::VecOps::PromoteTypeImpl<V>::Type()))> ROOT::VecOps::atan2(const ROOT::VecOps::RVec<T>&, const T1&)
 TVEC_STD_BINARY_FUNCTION(atan2)
 ^
/home/dreamtest/dqmsoftware/root-6.14.04/obj/include/ROOT/RVec.hxx:526:1: note: template<class T0, class T1> ROOT::VecOps::RVec<decltype ((typename ROOT::VecOps::PromoteTypeImpl<T>::Type() + typename ROOT::VecOps::PromoteTypeImpl<V>::Type()))> ROOT::VecOps::atan2(const ROOT::VecOps::RVec<T>&, const ROOT::VecOps::RVec<T1>&)
 TVEC_STD_BINARY_FUNCTION(atan2)
 ^
gmake[2]: *** [math/vecops/CMakeFiles/ROOTVecOps.dir/G__ROOTVecOps.cxx.o] Error 1
gmake[1]: *** [math/vecops/CMakeFiles/ROOTVecOps.dir/all] Error 2
gmake: *** [all] Error 2

```

I searched for previous cases of this problem, and found two solutions [here](https://sft.its.cern.ch/jira/browse/ROOT-9478?focusedCommentId=85968&page=com.atlassian.jira.plugin.system.issuetabpanels%3Acomment-tabpanel#comment-85968) and [here](https://root-forum.cern.ch/t/root-production-release-v6-14-00-is-out/29360/17), neither of which work for me. The line `set_property(GLOBAL APPEND PROPERTY ROOT_BUILTIN_TARGETS VDT)` is already present in the correct place in `cmake/modules/SearchInstalledSoftware.cmake` and when I use the command `cmake3 --build . --target VDT` the terminal responds with only:

```auto
Built target VDT

```

and further attempts at compiling ROOT after this have the same issue as above. What am I missing for compiling this?

---

<div class="post-metadata">

**Author:** ![Wile\_E\_Coyote](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/wile_e_coyote/32/12417_2.png) [@Wile\_E\_Coyote](https://root-forum.cern.ch/u/Wile_E_Coyote)\
**Post date:** [September 3, 2018, 10:53am UTC](https://root-forum.cern.ch/t/error-during-compiling-rootvecops-on-root-v6-14-04/30525/2 "2018-09-03T10:53:38Z")

</div>

[Note that your “gcc” compiler must not come from the “devtoolset”.](https://root-forum.cern.ch/t/missing-std-string-operator-std-string/20036/8)

---

<div class="post-metadata">

**Author:** ![tcoates3](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/tcoates3/32/17022_2.png) [@tcoates3](https://root-forum.cern.ch/u/tcoates3)\
**Post date:** [September 3, 2018, 10:58am UTC](https://root-forum.cern.ch/t/error-during-compiling-rootvecops-on-root-v6-14-04/30525/3 "2018-09-03T10:58:09Z")

</div>

Thanks for the quick response. Is there any workaround? Almost all resources I can find for installing different versions of gcc on SL6 involve using devtoolset.

---

<div class="post-metadata">

**Author:** ![Wile\_E\_Coyote](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/wile_e_coyote/32/12417_2.png) [@Wile\_E\_Coyote](https://root-forum.cern.ch/u/Wile_E_Coyote)\
**Post date:** [September 3, 2018, 11:12am UTC](https://root-forum.cern.ch/t/error-during-compiling-rootvecops-on-root-v6-14-04/30525/4 "2018-09-03T11:12:11Z")

</div>

If you have CVMFS, you could try one of the “/cvmfs/sft.cern.ch/lcg/contrib/gcc/” compilers or the “[LCG Software Elements](http://lcginfo.cern.ch/)”.

---

<div class="post-metadata">

**Author:** ![tcoates3](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/tcoates3/32/17022_2.png) [@tcoates3](https://root-forum.cern.ch/u/tcoates3)\
**Post date:** [September 4, 2018, 8:47am UTC](https://root-forum.cern.ch/t/error-during-compiling-rootvecops-on-root-v6-14-04/30525/5 "2018-09-04T08:47:09Z")

</div>

So I did manage to solve my problem! Despite the claim that devtoolset won’t work, I managed to compile using it. I had a suspicion it was because of an uncleaned build folder from previous failed attempts with lower versions of gcc, though I was hesitant to try a fresh build because of how long a ROOT build takes. But I created a clean build folder to run a build from scratch using gcc 4.9 and left it running over lunch.

The installation failed on not finding VDT, but I fixed this by going into `CMakeCache.txt` in the build folder, and editing the line `builtin_vdt:BOOL=OFF` to `ON`, then recompiling. This build attempt succeeded and the software I had to install that depended on ROOT also works perfectly.

---

<div class="post-metadata">

**Author:** ![Axel](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/axel/32/11084_2.png) [@Axel](https://root-forum.cern.ch/u/Axel)\
**Post date:** [September 4, 2018, 2:17pm UTC](https://root-forum.cern.ch/t/error-during-compiling-rootvecops-on-root-v6-14-04/30525/6 "2018-09-04T14:17:03Z")

</div>

You will still run into problems if you use anything C++11, like move constructors in `std::string` or `std::chrono` etc. But good if if works for you!

---

<div class="post-metadata">

**Author:** ![system](https://root-forum.cern.ch/uploads/default/original/3X/e/f/efe4f24398fd8ffeb76bccb6ecc46d9d9c003376.png) [@system](https://root-forum.cern.ch/u/system)\
**Post date:** [September 18, 2018, 2:17pm UTC](https://root-forum.cern.ch/t/error-during-compiling-rootvecops-on-root-v6-14-04/30525/7 "2018-09-18T14:17:06Z")

</div>

Closed on September 18, 2018, 2:17pm UTC

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.
