[CMake] Bootstrap fails to detect C++11 compiler on AIX 7.1/XL C 13.1.3 toolset

Chuck Atkins chuck.atkins at kitware.com
Tue Dec 19 14:50:47 EST 2017


Hi Nathan,
I am able to reproduce this error on our Dashboard machine; it should be
working and clearly it's not at the moment.

I will investigate...

----------
Chuck Atkins
Staff R&D Engineer, Scientific Computing
Kitware, Inc.

On Tue, Dec 19, 2017 at 11:48 AM, Nathan Strong <gblues+cmake at gmail.com>
wrote:

> I am having difficulty building CMake on AIX 7.1 using IBM XL C 13.1.3,
> which seems to be the newest version as of April 2017.
>
> The bootstrap script fails with the following error:
>
> ---------------------------------------------
> CMake 3.10.1, Copyright 2000-2017 Kitware, Inc. and Contributors
> Found XL toolchain
> C compiler on this system is: xlc
> ---------------------------------------------
> Error when bootstrapping CMake:
> Cannot find a C++ compiler supporting C++11 on this system.
> Please specify one using environment variable CXX.
> See cmake_bootstrap.log for compilers attempted.
> ---------------------------------------------
> Log of errors: src/cmake-3.10.1/Bootstrap.cmk/cmake_bootstrap.log
> ---------------------------------------------
>
> Given that AIX is explicitly listed as a supported platform, and I am
> using the latest version of the IBM AIX compiler, I find this error dubious.
>
> Below is a the contents of the cmake_bootstrap.log, where we can see that
> it does try to use the appropriate -q flag to enable the compiler's
> supported C++11 features.
>
> Is XL C simply unsupported?
>
> --- paste below ---
> Checking for XL toolchain
> Try: xlc
> Line: xlc  cmake_bootstrap_18350136_test.c -o
> cmake_bootstrap_18350136_test
> ----------  file   -----------------------
> int main() { return 0; }
> ------------------------------------------
> Test succeeded
> Try: xlC
> Line: xlC  cmake_bootstrap_18350136_test.cpp -o
> cmake_bootstrap_18350136_test
> ----------  file   -----------------------
> int main() { return 0; }
> ------------------------------------------
> Test succeeded
> Checking whether 'xlc  ' works.
> Try: xlc
> Line: xlc   cmake_bootstrap_18350136_test.c -o
> cmake_bootstrap_18350136_test
> ----------  file   -----------------------
>
> #ifdef __cplusplus
> # error "The CMAKE_C_COMPILER is set to a C++ compiler"
> #endif
>
> #if defined(__sun) && __STDC_VERSION__ < 199901L
> #error "On Solaris we need C99."
> #endif
>
> #include <stdio.h>
>
> int main(int argc, char* argv[])
> {
>   printf("%d%c", (argv != 0), (char)0x0a);
>   return argc - 1;
> }
>
> ------------------------------------------
> 1
> Test succeeded
> Checking whether 'xlC  ' works.
> Try: xlC
> Line: xlC   cmake_bootstrap_18350136_test.cxx -o
> cmake_bootstrap_18350136_test
> ----------  file   -----------------------
>
> #include <iostream>
> #include <memory>
> #include <unordered_map>
>
> #if __cplusplus < 201103L
> #error "Compiler is not in a mode aware of C++11."
> #endif
>
> #if defined(__SUNPRO_CC) && __SUNPRO_CC < 0x5140
> #error "SunPro <= 5.13 mode not supported due to bug in move semantics."
> #endif
>
> class Class
> {
> public:
>   int Get() const { return this->Member; }
> private:
>   int Member = 1;
> };
> int main()
> {
>   auto const c = std::unique_ptr<Class>(new Class);
>   std::cout << c->Get() << std::endl;
>   return 0;
> }
>
> ------------------------------------------
> "/opt/IBM/xlC/13.1.3/include/unordered_map", line 71.5: 1540-0859 (S)
> #error directive: To use the unordered map library, macro __IBMCPP_TR1__
> must be defined
> by user to non zero integer value..
> "cmake_bootstrap_18350136_test.cxx", line 7.2: 1540-0859 (S) #error
> directive: "Compiler is not in a mode aware of C++11.".
> Test failed to compile
> Checking whether 'xlC  ' works.
> Try: xlC
> Line: xlC   cmake_bootstrap_18350136_test.cxx -o
> cmake_bootstrap_18350136_test
> ----------  file   -----------------------
>
> #include <iostream>
> #include <memory>
> #include <unordered_map>
>
> #if __cplusplus < 201103L
> #error "Compiler is not in a mode aware of C++11."
> #endif
>
> #if defined(__SUNPRO_CC) && __SUNPRO_CC < 0x5140
> #error "SunPro <= 5.13 mode not supported due to bug in move semantics."
> #endif
>
> class Class
> {
> public:
>   int Get() const { return this->Member; }
> private:
>   int Member = 1;
> };
> int main()
> {
>   auto const c = std::unique_ptr<Class>(new Class);
>   std::cout << c->Get() << std::endl;
>   return 0;
> }
>
> ------------------------------------------
> "/opt/IBM/xlC/13.1.3/include/unordered_map", line 71.5: 1540-0859 (S)
> #error directive: To use the unordered map library, macro __IBMCPP_TR1__
> must be defined
> by user to non zero integer value..
> "cmake_bootstrap_18350136_test.cxx", line 7.2: 1540-0859 (S) #error
> directive: "Compiler is not in a mode aware of C++11.".
> Test failed to compile
> Checking whether 'xlC  -qlanglvl=extended1y' works.
> Try: xlC
> Line: xlC  -qlanglvl=extended1y cmake_bootstrap_18350136_test.cxx -o
> cmake_bootstrap_18350136_test
> ----------  file   -----------------------
>
> #include <iostream>
> #include <memory>
> #include <unordered_map>
>
> #if __cplusplus < 201103L
> #error "Compiler is not in a mode aware of C++11."
> #endif
>
> #if defined(__SUNPRO_CC) && __SUNPRO_CC < 0x5140
> #error "SunPro <= 5.13 mode not supported due to bug in move semantics."
> #endif
>
> class Class
> {
> public:
>   int Get() const { return this->Member; }
> private:
>   int Member = 1;
> };
> int main()
> {
>   auto const c = std::unique_ptr<Class>(new Class);
>   std::cout << c->Get() << std::endl;
>   return 0;
> }
>
> ------------------------------------------
> 1540-5200 (W) The option "langlvl=extended1y" is not supported.
> "/opt/IBM/xlC/13.1.3/include/unordered_map", line 71.5: 1540-0859 (S)
> #error directive: To use the unordered map library, macro __IBMCPP_TR1__
> must be defined
> by user to non zero integer value..
> "cmake_bootstrap_18350136_test.cxx", line 7.2: 1540-0859 (S) #error
> directive: "Compiler is not in a mode aware of C++11.".
> Test failed to compile
> Checking whether 'xlC  ' works.
> Try: xlC
> Line: xlC   cmake_bootstrap_18350136_test.cxx -o
> cmake_bootstrap_18350136_test
> ----------  file   -----------------------
>
> #include <iostream>
> #include <memory>
> #include <unordered_map>
>
> #if __cplusplus < 201103L
> #error "Compiler is not in a mode aware of C++11."
> #endif
>
> #if defined(__SUNPRO_CC) && __SUNPRO_CC < 0x5140
> #error "SunPro <= 5.13 mode not supported due to bug in move semantics."
> #endif
>
> class Class
> {
> public:
>   int Get() const { return this->Member; }
> private:
>   int Member = 1;
> };
> int main()
> {
>   auto const c = std::unique_ptr<Class>(new Class);
>   std::cout << c->Get() << std::endl;
>   return 0;
> }
>
> ------------------------------------------
> "/opt/IBM/xlC/13.1.3/include/unordered_map", line 71.5: 1540-0859 (S)
> #error directive: To use the unordered map library, macro __IBMCPP_TR1__
> must be defined
> by user to non zero integer value..
> "cmake_bootstrap_18350136_test.cxx", line 7.2: 1540-0859 (S) #error
> directive: "Compiler is not in a mode aware of C++11.".
> Test failed to compile
> Checking whether 'xlC  -std=gnu++11' works.
> Try: xlC
> Line: xlC  -std=gnu++11 cmake_bootstrap_18350136_test.cxx -o
> cmake_bootstrap_18350136_test
> ----------  file   -----------------------
>
> #include <iostream>
> #include <memory>
> #include <unordered_map>
>
> #if __cplusplus < 201103L
> #error "Compiler is not in a mode aware of C++11."
> #endif
>
> #if defined(__SUNPRO_CC) && __SUNPRO_CC < 0x5140
> #error "SunPro <= 5.13 mode not supported due to bug in move semantics."
> #endif
>
> class Class
> {
> public:
>   int Get() const { return this->Member; }
> private:
>   int Member = 1;
> };
> int main()
> {
>   auto const c = std::unique_ptr<Class>(new Class);
>   std::cout << c->Get() << std::endl;
>   return 0;
> }
>
> ------------------------------------------
> /opt/IBM/xlC/13.1.3/bin/.orig/xlC: 1501-210 (W) command option t contains
> an incorrect subargument
> "/opt/IBM/xlC/13.1.3/include/unordered_map", line 71.5: 1540-0859 (S)
> #error directive: To use the unordered map library, macro __IBMCPP_TR1__
> must be defined
> by user to non zero integer value..
> "cmake_bootstrap_18350136_test.cxx", line 7.2: 1540-0859 (S) #error
> directive: "Compiler is not in a mode aware of C++11.".
> Test failed to compile
> Checking whether 'xlC  -qlanglvl=extended0x' works.
> Try: xlC
> Line: xlC  -qlanglvl=extended0x cmake_bootstrap_18350136_test.cxx -o
> cmake_bootstrap_18350136_test
> ----------  file   -----------------------
>
> #include <iostream>
> #include <memory>
> #include <unordered_map>
>
> #if __cplusplus < 201103L
> #error "Compiler is not in a mode aware of C++11."
> #endif
>
> #if defined(__SUNPRO_CC) && __SUNPRO_CC < 0x5140
> #error "SunPro <= 5.13 mode not supported due to bug in move semantics."
> #endif
>
> class Class
> {
> public:
>   int Get() const { return this->Member; }
> private:
>   int Member = 1;
> };
> int main()
> {
>   auto const c = std::unique_ptr<Class>(new Class);
>   std::cout << c->Get() << std::endl;
>   return 0;
> }
>
> ------------------------------------------
> "/opt/IBM/xlC/13.1.3/include/unordered_map", line 71.5: 1540-0859 (S)
> #error directive: To use the unordered map library, macro __IBMCPP_TR1__
> must be defined
> by user to non zero integer value..
> "cmake_bootstrap_18350136_test.cxx", line 7.2: 1540-0859 (S) #error
> directive: "Compiler is not in a mode aware of C++11.".
> Test failed to compile
> Checking whether 'xlC  -qlanglvl=extended0x' works.
> Try: xlC
> Line: xlC  -qlanglvl=extended0x cmake_bootstrap_18350136_test.cxx -o
> cmake_bootstrap_18350136_test
> ----------  file   -----------------------
>
> #include <iostream>
> #include <memory>
> #include <unordered_map>
>
> #if __cplusplus < 201103L
> #error "Compiler is not in a mode aware of C++11."
> #endif
>
> #if defined(__SUNPRO_CC) && __SUNPRO_CC < 0x5140
> #error "SunPro <= 5.13 mode not supported due to bug in move semantics."
> #endif
>
> class Class
> {
> public:
>   int Get() const { return this->Member; }
> private:
>   int Member = 1;
> };
> int main()
> {
>   auto const c = std::unique_ptr<Class>(new Class);
>   std::cout << c->Get() << std::endl;
>   return 0;
> }
>
> ------------------------------------------
> "/opt/IBM/xlC/13.1.3/include/unordered_map", line 71.5: 1540-0859 (S)
> #error directive: To use the unordered map library, macro __IBMCPP_TR1__
> must be defined
> by user to non zero integer value..
> "cmake_bootstrap_18350136_test.cxx", line 7.2: 1540-0859 (S) #error
> directive: "Compiler is not in a mode aware of C++11.".
> Test failed to compile
> Checking whether 'xlC  -qlanglvl=extended0x' works.
> Try: xlC
> Line: xlC  -qlanglvl=extended0x cmake_bootstrap_18350136_test.cxx -o
> cmake_bootstrap_18350136_test
> ----------  file   -----------------------
>
> #include <iostream>
> #include <memory>
> #include <unordered_map>
>
> #if __cplusplus < 201103L
> #error "Compiler is not in a mode aware of C++11."
> #endif
>
> #if defined(__SUNPRO_CC) && __SUNPRO_CC < 0x5140
> #error "SunPro <= 5.13 mode not supported due to bug in move semantics."
> #endif
>
> class Class
> {
> public:
>   int Get() const { return this->Member; }
> private:
>   int Member = 1;
> };
> int main()
> {
>   auto const c = std::unique_ptr<Class>(new Class);
>   std::cout << c->Get() << std::endl;
>   return 0;
> }
>
> ------------------------------------------
> "/opt/IBM/xlC/13.1.3/include/unordered_map", line 71.5: 1540-0859 (S)
> #error directive: To use the unordered map library, macro __IBMCPP_TR1__
> must be defined
> by user to non zero integer value..
> "cmake_bootstrap_18350136_test.cxx", line 7.2: 1540-0859 (S) #error
> directive: "Compiler is not in a mode aware of C++11.".
> Test failed to compile
>
> --
>
> Powered by www.kitware.com
>
> Please keep messages on-topic and check the CMake FAQ at:
> http://www.cmake.org/Wiki/CMake_FAQ
>
> Kitware offers various services to support the CMake community. For more
> information on each offering, please visit:
>
> CMake Support: http://cmake.org/cmake/help/support.html
> CMake Consulting: http://cmake.org/cmake/help/consulting.html
> CMake Training Courses: http://cmake.org/cmake/help/training.html
>
> Visit other Kitware open-source projects at http://www.kitware.com/
> opensource/opensource.html
>
> Follow this link to subscribe/unsubscribe:
> https://cmake.org/mailman/listinfo/cmake
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://cmake.org/pipermail/cmake/attachments/20171219/7fa15f5a/attachment-0001.html>


More information about the CMake mailing list