# Compilation error on XRootD 5.5.1 - make\_unique is not a member of std

**URL:** <https://root-forum.cern.ch/t/compilation-error-on-xrootd-5-5-1-make-unique-is-not-a-member-of-std/53239>\
**Category:** Newbie\
**Created:** [January 24, 2023, 1:48pm UTC](https://root-forum.cern.ch/t/compilation-error-on-xrootd-5-5-1-make-unique-is-not-a-member-of-std/53239 "2023-01-24T13:48:03Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![vitlacil](https://root-forum.cern.ch/letter_avatar_proxy/v4/letter/v/7993a0/32.png) [@vitlacil](https://root-forum.cern.ch/u/vitlacil)\
**Post date:** [January 24, 2023, 1:48pm UTC](https://root-forum.cern.ch/t/compilation-error-on-xrootd-5-5-1-make-unique-is-not-a-member-of-std/53239/1 "2023-01-24T13:48:04Z")

</div>

Hi,

Newbie question on XRootD here:  
I’m trying to compile latest XRootD (5.5.1) on CentOS 7 and I’m getting a compilation error.  
I’m wondering if someone has seen or encountered this before, and if there are good tips to go around it.

Cheers,  
Dejan

```auto
------
Scanning dependencies of target XrdOssSIgpfsT-5
[59%] Building CXX object src/CMakeFiles/XrdOssSIgpfsT-5.dir/XrdOss/XrdOssSIgpfsT.cc.o
[59%] Linking CXX shared module libXrdOssSIgpfsT-5.so
[59%] Built target XrdOssSIgpfsT-5
Scanning dependencies of target XrdAccSciTokens-5
[59%] Building CXX object src/CMakeFiles/XrdAccSciTokens-5.dir/XrdSciTokens/XrdSciTokensAccess.cc.o
/home/centos/xrd/xrootd-5.5.1/src/XrdSciTokens/XrdSciTokensAccess.cc: In function 'std::string {anonymous}::AccessRuleStr(const AccessRulesRaw&)':
/home/centos/xrd/xrootd-5.5.1/src/XrdSciTokens/XrdSciTokensAccess.cc:153:71: error: 'make_unique' is not a member of 'std'
             auto result = rule_map.insert(std::make_pair(rule.second, std::make_unique<std::stringstream>()));
                                                                       ^
/home/centos/xrd/xrootd-5.5.1/src/XrdSciTokens/XrdSciTokensAccess.cc:153:105: error: expected primary-expression before '>' token
             auto result = rule_map.insert(std::make_pair(rule.second, std::make_unique<std::stringstream>()));
                                                                                                         ^
/home/centos/xrd/xrootd-5.5.1/src/XrdSciTokens/XrdSciTokensAccess.cc:153:107: error: expected primary-expression before ')' token
             auto result = rule_map.insert(std::make_pair(rule.second, std::make_unique<std::stringstream>()));
                                                                                                           ^
make[2]: *** [src/CMakeFiles/XrdAccSciTokens-5.dir/XrdSciTokens/XrdSciTokensAccess.cc.o] Error 1
make[1]: *** [src/CMakeFiles/XrdAccSciTokens-5.dir/all] Error 2
make: *** [all] Error 2
[centos@xrootd build-5.5.1]$ 
.........

```

---

<div class="post-metadata">

**Author:** ![couet](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/couet/32/12037_2.png) [@couet](https://root-forum.cern.ch/u/couet)\
**Post date:** [January 24, 2023, 2:03pm UTC](https://root-forum.cern.ch/t/compilation-error-on-xrootd-5-5-1-make-unique-is-not-a-member-of-std/53239/2 "2023-01-24T14:03:40Z")

</div>

may be @ganis can help ?

---

<div class="post-metadata">

**Author:** ![vpadulan](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/vpadulan/32/25315_2.png) [@vpadulan](https://root-forum.cern.ch/u/vpadulan)\
**Post date:** [January 24, 2023, 2:40pm UTC](https://root-forum.cern.ch/t/compilation-error-on-xrootd-5-5-1-make-unique-is-not-a-member-of-std/53239/3 "2023-01-24T14:40:08Z")

</div>

Hi @vitlacil,

What compiler are you using? Also, why are you compiling xrootd when you have the [official package](https://rhel.pkgs.org/7/epel-x86_64/xrootd-5.5.1-1.el7.x86_64.rpm.html) available?

Cheers,  
Vincenzo

---

<div class="post-metadata">

**Author:** ![vitlacil](https://root-forum.cern.ch/letter_avatar_proxy/v4/letter/v/7993a0/32.png) [@vitlacil](https://root-forum.cern.ch/u/vitlacil)\
**Post date:** [January 24, 2023, 2:50pm UTC](https://root-forum.cern.ch/t/compilation-error-on-xrootd-5-5-1-make-unique-is-not-a-member-of-std/53239/4 "2023-01-24T14:50:43Z")

</div>

Thanks for the link @vpadulan

I’m playing around and testing. I’m trying different installation processes.  
My final goal is to test XRootD with INDIGO IAM.

Cheers,  
Dejan

```auto
[centos@xrootd ~]$ g++ --version
g++ (GCC) 4.8.5 20150623 (Red Hat 4.8.5-44)
Copyright (C) 2015 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
[centos@xrootd ~]$ 

```

---

<div class="post-metadata">

**Author:** ![vpadulan](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/vpadulan/32/25315_2.png) [@vpadulan](https://root-forum.cern.ch/u/vpadulan)\
**Post date:** [January 24, 2023, 3:13pm UTC](https://root-forum.cern.ch/t/compilation-error-on-xrootd-5-5-1-make-unique-is-not-a-member-of-std/53239/5 "2023-01-24T15:13:07Z")

</div>

I see, I think that xrootd has been tested on INDIGO IAM in other instances, there should be literature about it but right now I don’t have a citation.

For your C++ issue, always double check the compiler you use, its version, the supported C++ standards (for the compiler and for the project).

For instance in your case:

`std::make_unique` is a C++14 feature. You could have seen this if you looked at some website with standard C++ references, such as [std::make\_unique, std::make\_unique\_for\_overwrite - cppreference.com](https://en.cppreference.com/w/cpp/memory/unique_ptr/make_unique)

GCC 4.8.5 does not support C++14, you could have found this out if you looked at the official C++ standard support for GCC, at their website [C++ Standards Support in GCC - GNU Project](https://gcc.gnu.org/projects/cxx-status.html#cxx14)

The default compiler on CentOS7 is indeed GCC 4.8.5, so you are out of luck here. There are many, _many_ ways to update the compiler, you can find references online for many of these.

My suggestion: avoid CentOS7 for new developments.

Cheers,  
Vincenzo

---

<div class="post-metadata">

**Author:** ![vitlacil](https://root-forum.cern.ch/letter_avatar_proxy/v4/letter/v/7993a0/32.png) [@vitlacil](https://root-forum.cern.ch/u/vitlacil)\
**Post date:** [January 24, 2023, 5:00pm UTC](https://root-forum.cern.ch/t/compilation-error-on-xrootd-5-5-1-make-unique-is-not-a-member-of-std/53239/6 "2023-01-24T17:00:18Z")

</div>

Thanks for your help and advices @vpadulan.
