# Solaris 11.4: ‘to\_string’ is not a member of ‘std’ compiler error

**URL:** https://discourse.cmake.org/t/solaris-11-4-to-string-is-not-a-member-of-std-compiler-error/4518
**Category:** Usage
**Tags:** os:linux
**Created:** [November 21, 2021, 2:32am UTC](https://discourse.cmake.org/t/solaris-11-4-to-string-is-not-a-member-of-std-compiler-error/4518 "2021-11-21T02:32:00Z")
**Posts on this page:** 6
**Page:** 1

<div class="post-metadata">

### Author: ![Yongliang](https://discourse.cmake.org/letter_avatar_proxy/v4/letter/y/5e9695/32.png) [@Yongliang](https://discourse.cmake.org/u/Yongliang)
#### Post date: [November 21, 2021, 2:32am UTC](https://discourse.cmake.org/t/solaris-11-4-to-string-is-not-a-member-of-std-compiler-error/4518/1 "2021-11-21T02:32:00Z")

</div>

when I compile on Sun Solaris11.4, the following error is reported, What do I do to solve it?  
thank you!

## Compiler Information:

## CMake 3.22.0, Copyright 2000-2021 Kitware, Inc. and Contributors C compiler on this system is: gcc -std=gnu11 C++ compiler on this system is: g++ -std=gnu++1y Makefile processor on this system is: gmake g++ has setenv g++ has unsetenv g++ does not have environ in stdlib.h g++ has stl wstring g++ has \<ext/stdio\_filebuf.h\>

Error information:  
/usr/local/cmake-3.22.0/Source/cmCommandArgumentParserHelper.cxx:103:14: error: ‘to\_string’ is not a member of ‘std’  
line = std::to\_string(this-\>FileLine);  
^  
gmake: \*\*\* [cmCommandArgumentParserHelper.o] エラー 1

/usr/local/cmake-3.22.0/Source/cmFileCommand.cxx:3436:24: error: ‘stoi’ is not a member of ‘std’  
compressionLevel = std::stoi(parsedArgs.CompressionLevel);

---

<div class="post-metadata">

### Author: ![ben.boeckel](https://discourse.cmake.org/letter_avatar_proxy/v4/letter/b/ea5d25/32.png) [@ben.boeckel](https://discourse.cmake.org/u/ben.boeckel)
#### Post date: [November 22, 2021, 11:36am UTC](https://discourse.cmake.org/t/solaris-11-4-to-string-is-not-a-member-of-std-compiler-error/4518/2 "2021-11-22T11:36:34Z")

</div>

Hmm. We do have [nightly tests running on Solaris](https://open.cdash.org/index.php?project=CMake&filtercount=1&showfilters=1&field1=buildname&compare1=63&value1=Solaris). What version of CMake are you using to build CMake itself? Though this looks like `bootstrap` output.

Cc: @brad.king

---

<div class="post-metadata">

### Author: ![brad.king](https://discourse.cmake.org/user_avatar/discourse.cmake.org/brad.king/32/11_2.png) [@brad.king](https://discourse.cmake.org/u/brad.king)
#### Post date: [November 22, 2021, 3:09pm UTC](https://discourse.cmake.org/t/solaris-11-4-to-string-is-not-a-member-of-std-compiler-error/4518/3 "2021-11-22T15:09:12Z")

</div>

The output shown is from the `bootstrap` script, and it is picking a GNU compiler. What version of the GNU compiler are you using?

---

<div class="post-metadata">

### Author: ![Yongliang](https://discourse.cmake.org/letter_avatar_proxy/v4/letter/y/5e9695/32.png) [@Yongliang](https://discourse.cmake.org/u/Yongliang)
#### Post date: [November 22, 2021, 3:41pm UTC](https://discourse.cmake.org/t/solaris-11-4-to-string-is-not-a-member-of-std-compiler-error/4518/4 "2021-11-22T15:41:58Z")

</div>

Please see the following Info,thank you!  
root@solaris:/opt# uname -a  
SunOS solaris 5.11 11.3 i86pc i386 i86pc  
root@solaris:/opt# gcc --version  
gcc (GCC) 4.8.2

---

<div class="post-metadata">

### Author: ![brad.king](https://discourse.cmake.org/user_avatar/discourse.cmake.org/brad.king/32/11_2.png) [@brad.king](https://discourse.cmake.org/u/brad.king)
#### Post date: [November 22, 2021, 4:01pm UTC](https://discourse.cmake.org/t/solaris-11-4-to-string-is-not-a-member-of-std-compiler-error/4518/5 "2021-11-22T16:01:46Z")

</div>

I think gcc 4.8 is too old, at least on Solaris. Our nightly testing of building CMake itself on Solaris is done with Oracle Studio 12.6 and with GNU 5.5.

---

<div class="post-metadata">

### Author: ![Yongliang](https://discourse.cmake.org/letter_avatar_proxy/v4/letter/y/5e9695/32.png) [@Yongliang](https://discourse.cmake.org/u/Yongliang)
#### Post date: [November 23, 2021, 11:31am UTC](https://discourse.cmake.org/t/solaris-11-4-to-string-is-not-a-member-of-std-compiler-error/4518/6 "2021-11-23T11:31:03Z")

</div>

Today, I installed GCC7.1 and can use cmade, thank you very much!
