Sorry for bothering subscribers for posting about C++11 environment instead of cmake itself. Now I understand building gcc >= 4.8.5 manually might be easier, in comparison with the quest of libc++ for clang-3.4.
https://stackoverflow.com/questions/39332406/install-libc-on-ubuntu Regards, mpsuzuki suzuki toshiya wrote: > Dear Bo Zhou, > > Sorry, I've confirmed by myself. > By default, clang-3.4 for Ubuntu prioritizes old g++ header files, and clang > header files are searched as a fallback. > I can customize the searching order by -nostdinc++... > > Regards, > mpsuzuki > > suzuki toshiya wrote: >> Dear Bo Zhou, >> >> Thank you for prompt reply. >> >>> Be aware that GCC suite actually is independent from the libstdc++, so if >>> you have a newer compiler, the compiler might still pick the older >>> libstdc++ without the new API. >> Oh, so, even if I installed clang-3.4, still it uses older (maybe C++03) >> libraries are referred by it? >> >> Regards, >> mpsuzuki >> >> Bo Zhou wrote: >>> The emplace() is new API from C++11. >>> >>> Be aware that GCC suite actually is independent from the libstdc++, so if >>> you have a newer compiler, the compiler might still pick the older >>> libstdc++ without the new API. >>> >>> This issue doesn't exist at Windows, since Visual Studio is a complete >>> sytem. >>> >>> This issue happens on OSX also, so user must give the compiler a proper >>> MacOS SDK for the new header files etc. >>> >>> On Thu, Apr 5, 2018 at 1:33 PM, suzuki toshiya >>> <mpsuz...@hiroshima-u.ac.jp<mailto:mpsuz...@hiroshima-u.ac.jp>> wrote: >>> $ clang++ --version >>> Ubuntu clang version 3.4-1ubuntu3~precise2 (tags/RELEASE_34/final) (based on >>> LLVM 3.4) >>> Target: x86_64-pc-linux-gnu >>> Thread model: posix >>> >>> But I got following abort: >>> >>> cmake-3.11.0/Source/cmLocalGenerator.cxx:553:36: error: no member named >>> 'emplace' in >>> 'std::unordered_map<std::basic_string<char>, cmGeneratorTarget *, >>> std::hash<string>, std::equal_to<std::basic_string<char> >, >>> std::allocator<std::pair<const std::basic_string<char>, >>> cmGeneratorTarget >>> *> > >' >>> this->GeneratorTargetSearchIndex.emplace(gt->GetName(), gt); >>> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^ >>> >>> Grrrr.... X-D >>> >>> Regards, >>> mpsuzuki >>> >>> suzuki toshiya wrote: >>>> Dear Bo Zhou, >>>> >>>> Thank you for the info! Now I'm checking Ubuntu 12.04 in LXC. >>>> So, gcc-4.8.5 or later would be needed for C++11, it seems that the last >>>> version >>>> of gcc officially provided for Ubuntu-12 was 4.7. oh. >>>> According to https://clang.llvm.org/cxx_status.html , clang-3.3 supports >>>> C++11, >>>> and the last version of clang officially provided for Ubuntu-12 was 3.4. >>>> ooh. >>>> I will check if clang-3.4 for Ubuntu-12.04 can compile cmake (or any other >>>> dependency problems would arise). >>>> >>>>> Usually the ABI is not the problem but the libstdc++, you can use a old >>>>> Ubuntu with old libstdc++ but build CMake with new compiler and make sure >>>>> it links with old libstdc++. This is the trick. >>>> Indeed. >>>> >>>> Regards, >>>> mpsuzuki >>>> >>>> Bo Zhou wrote: >>>>> The latest CMake requires C++11 compiler, so what you need is just a >>>>> newer GCC which supports C++11 at your platform, that's it. >>>>> >>>>> Usually the ABI is not the problem but the libstdc++, you can use a old >>>>> Ubuntu with old libstdc++ but build CMake with new compiler and make sure >>>>> it links with old libstdc++. This is the trick. >>>>> >>>>> I don't know how to do this on Ubuntu, but on CentOS, it's possible to >>>>> build CMake in that way, so the CMake would be portable at older CentOS >>>>> platform with old libstdc++ . >>>>> >>>>> Good luck. >>>>> >>>>> On Thu, Apr 5, 2018 at 12:23 PM, Eric Wing >>>>> <ewmail...@gmail.com<mailto:ewmail...@gmail.com><mailto:ewmail...@gmail.com<mailto:ewmail...@gmail.com>>> >>>>> wrote: >>>>> I just discovered that CMake no longer builds on my Ubuntu 12.04. I >>>>> need to build binaries that are compatible with that ABI. >>>>> >>>>> I see that your binary distribution of CMake 3.11 still works on >>>>> Ubuntu 12.04. Can you tell me what you do to achieve this? What are >>>>> you doing for your official builds? >>>>> >>>>> Are you just using -static-libstdc++ -static-libgcc for >>>>> CMAKE_CXX_FLAGS, or is there more? >>>>> >>>>> (I just noticed that ldd shows that you don't have dependencies on >>>>> libssl, libcrypto, and libz, whereas I do.) >>>>> >>>>> Thanks, >>>>> Eric >>>>> -- >>>>> >>>>> Powered by www.kitware.com<http://www.kitware.com><http://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 >>>>> >>>>> >>>>> >>> -- >>> >>> Powered by www.kitware.com<http://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 >>> >>> > -- 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