[CMake] HowTo build one Linux binary set for all platforms?
Brad King
brad.king at kitware.com
Tue Apr 18 12:56:58 EDT 2006
Matt England wrote:
> At 4/18/2006 09:43 AM, Brad King wrote:
>
>> We have a least-common-denominator Linux system. We build the needed
>> system libraries statically (such as curses). We build our own gcc
>> using the --disable-shared configure script option to avoid getting a
>> shared C++ library. Look in the Utilities/Release directory at the
>> config_* files and the cmake_release.sh script for other details.
>
>
> Excellent info, thanks Brad. We most likely will be migrating our
> builds to such a thing.
>
> I suspect the Utilities/Release files do not mention which Linux system
> flavor you build on. Do you guys choose a particular system for this?
> eg, RH 7.x...or something else?
I think it's a Mandrake 10 box.
There is a bit of a trick needed for CMake due to support for loaded
commands. We link statically against everything but libc and libdl. In
order to work with the system libc on every other machine you need to
build with the oldest glibc you can find. We used to use an old glibc
2.0 system to build binaries but that old machine died so now we use a
glibc 2.3 system. A few years ago that may have been a problem but no
one has complained yet about needing glibc 2.3. For the few people that
have such old systems they can build from source.
-Brad
More information about the CMake
mailing list