[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

compiling for 32bit with -m32?

Hello list,

I thought it was possible to explicitly compile for 32bit with the -m32
flag. What else do I need to set/install, because I get this error:

-- snip --
[steini@telesto] ~/coding/tests % g++-3.4 -m32 constructor.cpp -o test
/usr/bin/ld: skipping incompatible
/usr/lib/gcc/x86_64-linux/3.4.2/libstdc++.so when searching for -lstdc++
/usr/bin/ld: skipping incompatible
/usr/lib/gcc/x86_64-linux/3.4.2/libstdc++.a when searching for -lstdc++
-- snap --

This is what I have installed:
-- snip --
[steini@telesto] ~/coding/tests % dpkg -l | grep ia32
ii  ia32-libs      0.7            IA-32 shared libraries for use on
64-bit sys
ii  ia32-libs-dev  0.7            Development files for IA-32 libraries
on 64-
ii  lib32gcc1      3.4.1- GCC support library (ia32)
ii  lib32stdc++6   3.4.2-2        The GNU Standard C++ Library v3 (ia32)
-- snap --

Or would this only work for programs with a minimal set of libraries
anyway, so I'd better do all this in a 32bit chroot? I have one running,
but I hope to get around it so I won't have to install all those
development packages in two places (they're huge :-\ )...
Sebastian Steinlechner

Attachment: signature.asc
Description: This is a digitally signed message part

Reply to: