Find the answer to your Linux question:
Results 1 to 2 of 2
Hi. Im kind of a noob to Linux so dont be afraid to point out obvious mistakes Im trying to compile an application on my Dreamhost account (which uses 64-bit ...
  1. #1
    Just Joined!
    Join Date
    Nov 2010
    Posts
    1

    Need Help compiling 32 bit on 64 bit Linux

    Hi. Im kind of a noob to Linux so dont be afraid to point out obvious mistakes

    Im trying to compile an application on my Dreamhost account (which uses 64-bit Debian apparently), but the application must be 32-bit.

    I found the -m32 flag to tell gcc to make it 32 bit, but I'm still missing something else because its not working. Its not just a simple gcc call, but a rather large makefile so I may have added the -m32 to the wrong place, or maybe to not enough places. I added the flag to the CFLAGS variable like so:

    Code:
    CFLAGS = -m32 -g -I../src -pthread -Wall -Dx86_l1 -fPIC
    but still when I try to make, I get a bunch of errors like this:

    Code:
    i386 architecture of input file `rlmgenkeys.o' is incompatible with i386:x86-64 output
    i386 architecture of input file `rlm.a(rlm_authenticate.o)' is incompatible with i386:x86-64 output
    i386 architecture of input file `rlm.a(rlm_malloc.o)' is incompatible with i386:x86-64 output
    So I dont know if my -m32 flag actually did anything. However the .o and .a files came already inside the tar file I got so I dont know how that works. Should they work for both 32-bit and 64-bit, or should there be a different package for each architecture (there isnt, theres only 1 package it seems)

    I hope i was clear enough, thanks.

  2. #2
    ved
    ved is offline
    Linux User ved's Avatar
    Join Date
    Jan 2008
    Location
    New Delhi
    Posts
    309
    Take risks: if you win, you will be happy; if you lose, you will be wise.
    New Users : Read This First

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •