[CMake] 32 bits compilation on x64 platform - how to find system libraries
Marcel Loose
loose at astron.nl
Mon Dec 7 07:46:51 EST 2009
On Mon, 2009-12-07 at 13:19 +0100, Mathieu Malaterre wrote:
> On Mon, Dec 7, 2009 at 11:43 AM, Marcel Loose <loose at astron.nl> wrote:
> > Hi Olivier,
> >
> > I think you need to set the global property FIND_LIBRARY_USE_LIB64_PATHS
> > to OFF.
> >
> > BTW, I disagree with Mathieu that building 32-bit libraries/executables
> > on a 64-bit system is cross-compilation. These binaries can be run
> > without a problem on the host system. So, IMHO, you don't need a
> > toolchain file. The only thing you have to do is instruct gcc/g++ to
> > generate 32-bit objects/binaries, using the -m32 option, and tell CMake
> > to look in lib instead of lib64 by setting the aforementioned property.
>
>
> There is two things from the top of my head:
> 1. ia64 which is not x86 compatible
> 2. You still need a libz/libpng/libjpeg compiled as 32bits on your
> amd64 system...
>
> I think the project needs to be self contained (convenient libs)
> otherwise to get it compiled using the -m32 trick
>
> 2cts
Hi Mathieu
Indeed, ia64 is not x86 compatible. I thought that Olivier was using a
x86_64 processor. Most 64-bit distros (for x86_64 that is) also provide
32-bit libs/binaries.
Best regards,
Marcel Loose.
More information about the CMake
mailing list