How to build CMake so it works on an older Linux?

classic Classic list List threaded Threaded
25 messages Options
12
Reply | Threaded
Open this post in threaded view
|

How to build CMake so it works on an older Linux?

Eric Wing
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

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
Reply | Threaded
Open this post in threaded view
|

Re: How to build CMake so it works on an older Linux?

Bo Zhou
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 <[hidden email]> 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

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
Reply | Threaded
Open this post in threaded view
|

Re: How to build CMake so it works on an older Linux?

suzuki toshiya
In reply to this post by Eric Wing
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 <[hidden email]<mailto:[hidden email]>> 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>
>
> 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
Reply | Threaded
Open this post in threaded view
|

[FYI] clang-3.4 vs cmake-3.11.0 (How to build CMake so it works on an older Linux?)

suzuki toshiya
In reply to this post by Eric Wing
$ 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 <[hidden email]<mailto:[hidden email]>> 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>
>>
>> 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
Reply | Threaded
Open this post in threaded view
|

Re: [FYI] clang-3.4 vs cmake-3.11.0 (How to build CMake so it works on an older Linux?)

Bo Zhou
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 <[hidden email]> 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 <[hidden email]<mailto:[hidden email]>> 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>
>>
>> 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


--

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
Reply | Threaded
Open this post in threaded view
|

Re: [FYI] clang-3.4 vs cmake-3.11.0 (How to build CMake so it works on an older Linux?)

suzuki toshiya
In reply to this post by suzuki toshiya
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 <[hidden email]<mailto:[hidden email]>> 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 <[hidden email]<mailto:[hidden email]><mailto:[hidden email]<mailto:[hidden email]>>> 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
Reply | Threaded
Open this post in threaded view
|

Re: [FYI] clang-3.4 vs cmake-3.11.0 (How to build CMake so it works on an older Linux?)

suzuki toshiya
In reply to this post by suzuki toshiya
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 <[hidden email]<mailto:[hidden email]>> 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 <[hidden email]<mailto:[hidden email]><mailto:[hidden email]<mailto:[hidden email]>>> 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
Reply | Threaded
Open this post in threaded view
|

Re: [FYI] clang-3.4 vs cmake-3.11.0 (How to build CMake so it works on an older Linux?)

suzuki toshiya
In reply to this post by suzuki toshiya
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 <[hidden email]<mailto:[hidden email]>> 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 <[hidden email]<mailto:[hidden email]><mailto:[hidden email]<mailto:[hidden email]>>> 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
Reply | Threaded
Open this post in threaded view
|

Re: How to build CMake so it works on an older Linux?

Eric Wing
In reply to this post by suzuki toshiya
Thanks for the responses. Yes, I just need this to run on Ubuntu 12.04
(and some other old Linux's in that era). Yes, I think the probably is
the libstdc++ dependency.

As pointed out, it is really hard to get a newer compiler on Ubuntu
12.04. I've been down this road before, and if memory serves, the gcc
bootstrapping process to get a newer compiler doesn't seem to work
with a compiler older than gcc 4.8. Same goes for clang, which also
weirdly relies on gcc 4.8 to bootstrap itself.

Anyway, CMake seems to already know how to ship binaries that work
across Linux distros. I'm pretty sure they just statically linked
libstdc++ and libgcc. In fact, I just built it with -static-libstdc++
-static-libgcc on a newer Linux and tested it on 12.04 and it seemed
to work.

But I wanted to know for sure how CMake is building their own binaries
in case there are subtle problems with what I did, and they have a
completely different way of building it, e.g. statically libmusl for C
and libc++ for C++, avoiding gcc entirely.

Also, I did not take care of the libssl, libcrypto, and libz
dependencies. I'm curious in practice how much trouble these are. (My
recollection with zlib is that it is extremely stable and they care a
great deal about not breaking backwards compatibility. I don't know
about the others.)

Thanks,
Eric
--

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
Reply | Threaded
Open this post in threaded view
|

Re: How to build CMake so it works on an older Linux?

suzuki toshiya
In reply to this post by suzuki toshiya
Dear Eric,

# if anybody think "how C++11 environment should be prepared
# on legacy GNU/Linux" is off-topic and should be discussed
# in off-list, please let me know. I will do so.

Eric Wing wrote:
> Thanks for the responses. Yes, I just need this to run on Ubuntu 12.04
> (and some other old Linux's in that era). Yes, I think the probably is
> the libstdc++ dependency.
>
> As pointed out, it is really hard to get a newer compiler on Ubuntu
> 12.04. I've been down this road before, and if memory serves, the gcc
> bootstrapping process to get a newer compiler doesn't seem to work
> with a compiler older than gcc 4.8. Same goes for clang, which also
> weirdly relies on gcc 4.8 to bootstrap itself.

At least, gcc-4.6.3, the last official gcc for Ubuntu-12.04, could
build gcc-4.8.5 manually (without shared libstdc++, so confused
dependency could be avoided). And, I could build cmake-3.11.0 by it.
Now I'm checking "make test".

If you can give the preferred prefix to install gcc-4.8.5 + cmake-3.11.0,
I would be able to a tarball of the binaries. but please prepare
some virus + malware checking :-)

Regards,
mpsuzuki

> Anyway, CMake seems to already know how to ship binaries that work
> across Linux distros. I'm pretty sure they just statically linked
> libstdc++ and libgcc. In fact, I just built it with -static-libstdc++
> -static-libgcc on a newer Linux and tested it on 12.04 and it seemed
> to work.
>
> But I wanted to know for sure how CMake is building their own binaries
> in case there are subtle problems with what I did, and they have a
> completely different way of building it, e.g. statically libmusl for C
> and libc++ for C++, avoiding gcc entirely.
>
> Also, I did not take care of the libssl, libcrypto, and libz
> dependencies. I'm curious in practice how much trouble these are. (My
> recollection with zlib is that it is extremely stable and they care a
> great deal about not breaking backwards compatibility. I don't know
> about the others.)
>
> Thanks,
> Eric
>

--

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
Reply | Threaded
Open this post in threaded view
|

Re: [FYI] clang-3.4 vs cmake-3.11.0 (How to build CMake so it works on an older Linux?)

Marcel Loose
In reply to this post by suzuki toshiya
Hi Suzuki,

Sorry for chiming in late, but you may want to try the PPA for Ubuntu
Toolchain test builds, which contains compiler builds up to gcc-8 for
Ubuntu version as old as 10.04. Much less of a hassle than building GCC
yourself, I can tell from experience. Check out
https://launchpad.net/~ubuntu-toolchain-r/+archive/ubuntu/test

Cheers,
Marcel.


On 05/04/18 07:29, suzuki toshiya wrote:

> 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 <[hidden email]<mailto:[hidden email]>> 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 <[hidden email]<mailto:[hidden email]><mailto:[hidden email]<mailto:[hidden email]>>> 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

loose.vcf (304 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: [FYI] clang-3.4 vs cmake-3.11.0 (How to build CMake so it works on an older Linux?)

suzuki toshiya
In reply to this post by suzuki toshiya
Dear Marcel,

Oh, I slipped to remind the exist of launchpad... Thanks!
at least, gcc-6.2.0 seems to be available for 12.04.

Regards,
mpsuzuki

Marcel Loose wrote:

> Hi Suzuki,
>
> Sorry for chiming in late, but you may want to try the PPA for Ubuntu
> Toolchain test builds, which contains compiler builds up to gcc-8 for
> Ubuntu version as old as 10.04. Much less of a hassle than building GCC
> yourself, I can tell from experience. Check out
> https://launchpad.net/~ubuntu-toolchain-r/+archive/ubuntu/test
>
> Cheers,
> Marcel.
>
>
> On 05/04/18 07:29, suzuki toshiya wrote:
>> 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 <[hidden email]<mailto:[hidden email]>> 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 <[hidden email]<mailto:[hidden email]><mailto:[hidden email]<mailto:[hidden email]>>> 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
Reply | Threaded
Open this post in threaded view
|

Re: How to build CMake so it works on an older Linux?

Stephen McDowell
In reply to this post by suzuki toshiya
Hi Suzuki,

(Note: to other CMake mailing list readers, this pertains very little to CMake itself.  I’m sending it to the mailing list so that future users with this issue may also have a possible solution).

Getting a newer version of GCC is quite challenging by yourself indeed, but you may be interested in the Spack package manager: http://spack.readthedocs.io/en/latest/getting_started.html

It’s designed for high performance computing, but has a special emphasis on supporting older distributions (since updating HPC cluster operating systems is the devil).

Some quick tips:

1. Once you start installing things, you cannot move the spack directory.  So decide where you want it and clone it there.  For example, I keep all of my installations in /opt/spack

    cd /opt

    Assuming you are `user` on this system (echo $USER)
    sudo chown -R user spack/

Then proceed with the getting started tutorial.

2. You have many possible newer versions of GCC available, by default `spack install gcc` installs the newest one.  Run `spack info gcc` to see the versions available.  Suppose you installed gcc@6.4.0 (which will as you know take a while).  You will want to make this available as a compiler, so you `spack load gcc@6.4.0` (it might tell you to source a script, so do that) and run `spack compiler find`.  When `spack compiler list` shows your shiny new GCC compiler, you can now `spack install cmake %gcc@6.4.0` to use GCC 6.4.0 to compile Cmake!  Note you don’t need to install GCC 6.4.0, that was purely an example.  I know there have been some issues with really old GCC versions compiling newer versions, but I think we fixed the underlying problem that caused that.  AKA my hope is this works seamlessly, but you may run into trouble.  If you do, you might try installing an older version of GCC (in this example, say 6.4.0 didn’t work, maybe try GCC 5.5.0).

I hope this is helpful for you!  There’s a lot more to spack, but if you get stuck raise an issue on GitHub.  The spack user community is very helpful and friendly to newcomers :)

Good luck!

-Stephen


--

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
Reply | Threaded
Open this post in threaded view
|

Re: How to build CMake so it works on an older Linux?

Robert Maynard
In reply to this post by Eric Wing
The official CMake binaries do the same thing as you and build with a
static libstdc++ and libgcc.
As far as dependencies we use static builds of those too, with most
being the version provided inside CMake, and an external openssl.

You can find the more information on the exact flags we are using at:
https://gitlab.kitware.com/cmake/cmake/blob/master/Utilities/Release/linux64_release.cmake

On Thu, Apr 5, 2018 at 3:09 AM, Eric Wing <[hidden email]> wrote:

> Thanks for the responses. Yes, I just need this to run on Ubuntu 12.04
> (and some other old Linux's in that era). Yes, I think the probably is
> the libstdc++ dependency.
>
> As pointed out, it is really hard to get a newer compiler on Ubuntu
> 12.04. I've been down this road before, and if memory serves, the gcc
> bootstrapping process to get a newer compiler doesn't seem to work
> with a compiler older than gcc 4.8. Same goes for clang, which also
> weirdly relies on gcc 4.8 to bootstrap itself.
>
> Anyway, CMake seems to already know how to ship binaries that work
> across Linux distros. I'm pretty sure they just statically linked
> libstdc++ and libgcc. In fact, I just built it with -static-libstdc++
> -static-libgcc on a newer Linux and tested it on 12.04 and it seemed
> to work.
>
> But I wanted to know for sure how CMake is building their own binaries
> in case there are subtle problems with what I did, and they have a
> completely different way of building it, e.g. statically libmusl for C
> and libc++ for C++, avoiding gcc entirely.
>
> Also, I did not take care of the libssl, libcrypto, and libz
> dependencies. I'm curious in practice how much trouble these are. (My
> recollection with zlib is that it is extremely stable and they care a
> great deal about not breaking backwards compatibility. I don't know
> about the others.)
>
> Thanks,
> Eric
> --
>
> 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
--

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
Reply | Threaded
Open this post in threaded view
|

Re: How to build CMake so it works on an older Linux?

Patrick Griffiths
I had a similar problem on 14.04 and solved it by installing gcc 4.9 (other version are also available) from the ubuntu-toolchain-r PPA. 

This worked for me. YMMV:

$ sudo add-apt-repository ppa:ubuntu-toolchain-r/test
$ sudo apt-get update
$ sudo apt-get install gcc-4.9
$ sudo apt-get install g++-4.9

When building CMake I set the CXX and CC variables at the command line

$ CXX=g++-4.9 CC=gcc-4.9 ../path/to/bootstrap ...etc ..
$ CXX=g++-4.9 CC=gcc-4.9 make install

HTH 
Patrick

On Thu, Apr 5, 2018 at 7:15 AM, Robert Maynard <[hidden email]> wrote:
The official CMake binaries do the same thing as you and build with a
static libstdc++ and libgcc.
As far as dependencies we use static builds of those too, with most
being the version provided inside CMake, and an external openssl.

You can find the more information on the exact flags we are using at:
https://gitlab.kitware.com/cmake/cmake/blob/master/Utilities/Release/linux64_release.cmake

On Thu, Apr 5, 2018 at 3:09 AM, Eric Wing <[hidden email]> wrote:
> Thanks for the responses. Yes, I just need this to run on Ubuntu 12.04
> (and some other old Linux's in that era). Yes, I think the probably is
> the libstdc++ dependency.
>
> As pointed out, it is really hard to get a newer compiler on Ubuntu
> 12.04. I've been down this road before, and if memory serves, the gcc
> bootstrapping process to get a newer compiler doesn't seem to work
> with a compiler older than gcc 4.8. Same goes for clang, which also
> weirdly relies on gcc 4.8 to bootstrap itself.
>
> Anyway, CMake seems to already know how to ship binaries that work
> across Linux distros. I'm pretty sure they just statically linked
> libstdc++ and libgcc. In fact, I just built it with -static-libstdc++
> -static-libgcc on a newer Linux and tested it on 12.04 and it seemed
> to work.
>
> But I wanted to know for sure how CMake is building their own binaries
> in case there are subtle problems with what I did, and they have a
> completely different way of building it, e.g. statically libmusl for C
> and libc++ for C++, avoiding gcc entirely.
>
> Also, I did not take care of the libssl, libcrypto, and libz
> dependencies. I'm curious in practice how much trouble these are. (My
> recollection with zlib is that it is extremely stable and they care a
> great deal about not breaking backwards compatibility. I don't know
> about the others.)
>
> Thanks,
> Eric
> --
>
> 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
--

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


--

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
Reply | Threaded
Open this post in threaded view
|

Re: How to build CMake so it works on an older Linux?

Juan E. Sanchez
In reply to this post by Eric Wing
Hello,

SHORT VERSION:

BTW, Ubuntu 12 is officially End of Life on April 28, 2017

http://releases.ubuntu.com/12.04/

So unless you are paying them for support, you should really upgrade to
Ubuntu 14.

LONG VERSION:

I recommend starting a docker image of centos 6 in a newer version of
Ubuntu.  This would be a virtual machine environment you can build a
version with a newer compiler, g++, but with an older glibc.  The
libstdc++ you link against would then be compatible with most modern
distributions.

This is by getting the devtoolset-6 or devtoolset-7 tools provided by
redhat.  You can communicate with me offline on how to do this, but in
principle the installation of the compiler is this:

yum install -y centos-release-scl
yum install -y devtoolset-6-gcc devtoolset-6-gcc-c++
devtoolset-6-libquadmath-devel devtoolset-6-gcc-gfortran

Docker is freely available and used across the open source community to
build for multiple linux versions.  It can be installed directly from
ubuntu as a standard package.

You can then package the application, and it would more than likely run
on your system.

Regards,

Juan

On 4/4/18 10:23 PM, Eric Wing 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

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
Reply | Threaded
Open this post in threaded view
|

Re: How to build CMake so it works on an older Linux?

Alexander Neundorf
In reply to this post by suzuki toshiya
On 2018 M04 5, Thu 16:15:17 CEST suzuki toshiya wrote:

> Dear Eric,
>
> # if anybody think "how C++11 environment should be prepared
> # on legacy GNU/Linux" is off-topic and should be discussed
> # in off-list, please let me know. I will do so.
>
> Eric Wing wrote:
> > Thanks for the responses. Yes, I just need this to run on Ubuntu 12.04
> > (and some other old Linux's in that era). Yes, I think the probably is
> > the libstdc++ dependency.
> >
> > As pointed out, it is really hard to get a newer compiler on Ubuntu
> > 12.04. I've been down this road before, and if memory serves, the gcc
> > bootstrapping process to get a newer compiler doesn't seem to work
> > with a compiler older than gcc 4.8. Same goes for clang, which also
> > weirdly relies on gcc 4.8 to bootstrap itself.
>
> At least, gcc-4.6.3, the last official gcc for Ubuntu-12.04, could
> build gcc-4.8.5 manually (without shared libstdc++, so confused
> dependency could be avoided). And, I could build cmake-3.11.0 by it.
> Now I'm checking "make test".

I have recently built a gcc 4.9.5 on Centos 5, i.e. gcc 4.1. There were no
issues after getting the configure flags right.

Alex

--

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
Reply | Threaded
Open this post in threaded view
|

Re: How to build CMake so it works on an older Linux?

Alexander Neundorf
On 2018 M04 5, Thu 21:24:40 CEST Alexander Neundorf wrote:

> On 2018 M04 5, Thu 16:15:17 CEST suzuki toshiya wrote:
> > Dear Eric,
> >
> > # if anybody think "how C++11 environment should be prepared
> > # on legacy GNU/Linux" is off-topic and should be discussed
> > # in off-list, please let me know. I will do so.
> >
> > Eric Wing wrote:
> > > Thanks for the responses. Yes, I just need this to run on Ubuntu 12.04
> > > (and some other old Linux's in that era). Yes, I think the probably is
> > > the libstdc++ dependency.
> > >
> > > As pointed out, it is really hard to get a newer compiler on Ubuntu
> > > 12.04. I've been down this road before, and if memory serves, the gcc
> > > bootstrapping process to get a newer compiler doesn't seem to work
> > > with a compiler older than gcc 4.8. Same goes for clang, which also
> > > weirdly relies on gcc 4.8 to bootstrap itself.
> >
> > At least, gcc-4.6.3, the last official gcc for Ubuntu-12.04, could
> > build gcc-4.8.5 manually (without shared libstdc++, so confused
> > dependency could be avoided). And, I could build cmake-3.11.0 by it.
> > Now I'm checking "make test".
>
> I have recently built a gcc 4.9.5 on Centos 5, i.e. gcc 4.1. There were no
> issues after getting the configure flags right.

4.9.4 I mean.
You can see the flags here:
https://hub.docker.com/r/aneundorf/docker-centos5-build-svn-gcc/~/dockerfile/
(but the docker image didn't build, it was killed by a dockerhub timeout).

Alex

--

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
Reply | Threaded
Open this post in threaded view
|

Re: How to build CMake so it works on an older Linux?

Ben Sferrazza


On Thu, Apr 5, 2018 at 12:30 PM, Alexander Neundorf <[hidden email]> wrote:
On 2018 M04 5, Thu 21:24:40 CEST Alexander Neundorf wrote:
> On 2018 M04 5, Thu 16:15:17 CEST suzuki toshiya wrote:
> > Dear Eric,
> >
> > # if anybody think "how C++11 environment should be prepared
> > # on legacy GNU/Linux" is off-topic and should be discussed
> > # in off-list, please let me know. I will do so.
> >
> > Eric Wing wrote:
> > > Thanks for the responses. Yes, I just need this to run on Ubuntu 12.04
> > > (and some other old Linux's in that era). Yes, I think the probably is
> > > the libstdc++ dependency.
> > >
> > > As pointed out, it is really hard to get a newer compiler on Ubuntu
> > > 12.04. I've been down this road before, and if memory serves, the gcc
> > > bootstrapping process to get a newer compiler doesn't seem to work
> > > with a compiler older than gcc 4.8. Same goes for clang, which also
> > > weirdly relies on gcc 4.8 to bootstrap itself.
> >
> > At least, gcc-4.6.3, the last official gcc for Ubuntu-12.04, could
> > build gcc-4.8.5 manually (without shared libstdc++, so confused
> > dependency could be avoided). And, I could build cmake-3.11.0 by it.
> > Now I'm checking "make test".
>
> I have recently built a gcc 4.9.5 on Centos 5, i.e. gcc 4.1. There were no
> issues after getting the configure flags right.

4.9.4 I mean.
You can see the flags here:
https://hub.docker.com/r/aneundorf/docker-centos5-build-svn-gcc/~/dockerfile/
(but the docker image didn't build, it was killed by a dockerhub timeout).

Alex

Were you able to actually build the newer versions of Cmake that require c++11 on Centos 5? I have built up a bootstrapped toolchain, following much of the guidance found in Linux From Scratch, on a Centos 5 system at work (which unfortunately cannot be upgrade due to the support of legacy software). The toolchain uses the latest gcc 7.3.0, binutils 2.30, and glibc 2.19 (the latest version of glibc supported by the 2.6.18 kernel of Centos 5). Yet cmake complains that my toolchain does not support c++11. Which kernel and glibc version do you have on your Centos 5 box? Thank you.

--

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
Reply | Threaded
Open this post in threaded view
|

Re: How to build CMake so it works on an older Linux?

Juan E. Sanchez
Hello,

Centos 5, Redhat 5 is EOL as of March 31, 2017.

Building cmake in docker:

cd /root;
curl -L -O https://cmake.org/files/v3.11/cmake-3.11.0.tar.gz;
tar xzvf cmake-3.11.0.tar.gz;
yum install -y centos-release-scl;
yum install -y devtoolset-6-gcc devtoolset-6-gcc-c++
devtoolset-6-libquadmath-devel devtoolset-6-gcc-gfortran;
source /opt/rh/devtoolset-6/enable;
cd cmake-3.11.0;
./bootstrap --prefix=/root/cmake --parallel=4;
make -j4;
make install;
cd /root;
tar czvf cmake.tgz;

Please note that cmake will silently ignore features for packages that
haven't been installed into the image, (ncurses, curl).

Regards,

Juan

On 4/5/18 2:50 PM, Ben Sferrazza wrote:

>
>
> On Thu, Apr 5, 2018 at 12:30 PM, Alexander Neundorf <[hidden email]
> <mailto:[hidden email]>> wrote:
>
>     On 2018 M04 5, Thu 21:24:40 CEST Alexander Neundorf wrote:
>     > On 2018 M04 5, Thu 16:15:17 CEST suzuki toshiya wrote:
>     > > Dear Eric,
>     > >
>     > > # if anybody think "how C++11 environment should be prepared
>     > > # on legacy GNU/Linux" is off-topic and should be discussed
>     > > # in off-list, please let me know. I will do so.
>     > >
>     > > Eric Wing wrote:
>     > > > Thanks for the responses. Yes, I just need this to run on Ubuntu 12.04
>     > > > (and some other old Linux's in that era). Yes, I think the probably is
>     > > > the libstdc++ dependency.
>     > > >
>     > > > As pointed out, it is really hard to get a newer compiler on Ubuntu
>     > > > 12.04. I've been down this road before, and if memory serves, the gcc
>     > > > bootstrapping process to get a newer compiler doesn't seem to work
>     > > > with a compiler older than gcc 4.8. Same goes for clang, which also
>     > > > weirdly relies on gcc 4.8 to bootstrap itself.
>     > >
>     > > At least, gcc-4.6.3, the last official gcc for Ubuntu-12.04, could
>     > > build gcc-4.8.5 manually (without shared libstdc++, so confused
>     > > dependency could be avoided). And, I could build cmake-3.11.0 by it.
>     > > Now I'm checking "make test".
>     >
>     > I have recently built a gcc 4.9.5 on Centos 5, i.e. gcc 4.1. There were no
>     > issues after getting the configure flags right.
>
>     4.9.4 I mean.
>     You can see the flags here:
>     https://hub.docker.com/r/aneundorf/docker-centos5-build-svn-gcc/~/dockerfile/
>     <https://hub.docker.com/r/aneundorf/docker-centos5-build-svn-gcc/~/dockerfile/>
>     (but the docker image didn't build, it was killed by a dockerhub
>     timeout).
>
>     Alex
>
>
> Were you able to actually build the newer versions of Cmake that require
> c++11 on Centos 5? I have built up a bootstrapped toolchain, following
> much of the guidance found in Linux From Scratch, on a Centos 5 system
> at work (which unfortunately cannot be upgrade due to the support of
> legacy software). The toolchain uses the latest gcc 7.3.0, binutils
> 2.30, and glibc 2.19 (the latest version of glibc supported by the
> 2.6.18 kernel of Centos 5). Yet cmake complains that my toolchain does
> not support c++11. Which kernel and glibc version do you have on your
> Centos 5 box? Thank you.
>
>

--

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
12