problem compiling 32 bit application on 64 bit Linux server
Ishita Kapadiya
ishimegh@gmail.com
Fri Mar 11 14:59:00 GMT 2011
Hi Ian,
I am using 'make' to compile this plug-in. I have used the Makefile
that generated at the time of installation of web server. So I think
it should work with little change (e.g. adding '-m32' to make it 32
bit). I have used the same Makefile previously and it worked fine for
me with -m32 option. Not sure why it's throwing error. After adding
--verbose in LD Flags it seems like gcc is using
--host=x86_64-redhat-linux option.
I think solution would be as per this link -
http://gcc.gnu.org/ml/gcc-help/2011-02/msg00182.html
But not sure how to force gcc to use 32 bit libraries?
Any help will be be great..
On Fri, Mar 11, 2011 at 1:00 AM, Ian Lance Taylor <iant@google.com> wrote:
> Ishita Kapadiya <ishimegh@gmail.com> writes:
>
>> CC FLAGS I have used are - /usr/bin/gcc -fpic -DNET_SSL -DLinux
>> -DLINUX -D_REENTRANT
>> LD FLAGS are - /usr/bin/gcc -shared -m32 --verbose
>
> Are you passing -m32 when you compile?
>
>> /usr/bin/ld: warning: i386:x86-64 architecture of input file `test.o'
>> is incompatible with i386 output
>
> This is telling you that you used -m32 on the link line but that test.o
> was compiled without -m32.
>
> Ian
>
More information about the Gcc-help
mailing list