Thread: opensuse 10.3 building 32-bit on 64-bit os

  1. #1
    Registered User
    Join Date
    Oct 2006
    Posts
    3,445

    opensuse 10.3 building 32-bit on 64-bit os

    I'm trying to build a 32-bit program (because the proprietary libraries it uses are 32-bit only on linux) on a 64-bit installation of OpenSuse 10.3, and I have all of the proper packages installed, but the problem I'm having is that the linker tries (and fails) to use the 64-bit libgcc_s, when it should be using the 32-bit one. how do I get it to ignore a whole library folder (/lib64) or even just a single library (/lib64/libgcc_s.so.1) when compiling?

  2. #2
    Registered User
    Join Date
    Jul 2007
    Posts
    131
    Give flag -m32 for cc.

  3. #3
    Registered User
    Join Date
    Oct 2006
    Posts
    3,445
    I'm doing that, but it still seems to want to use the 64-bit version of ligcc_s.

  4. #4
    Registered User
    Join Date
    Jul 2007
    Posts
    131
    I think that is a bug. I think compiler driver should realise to link 32-bit libraries when it's told to generate 32-bit code. Have you tried invoking the link editor yourself?

    And you have 32-bit libraries installed? Even in that case it should IMO report missing 32-bit library and not try to use 64-bit library.

  5. #5
    Registered User
    Join Date
    Oct 2006
    Posts
    3,445
    I'm not sure I understand what you mean by 'link editor'

  6. #6
    Registered User
    Join Date
    Jul 2007
    Posts
    131
    The linker. Link editor is another term used and I'm used to it.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Replies: 7
    Last Post: 12-10-2004, 08:18 AM
  2. polymorphism - 64 bit - va_arg - advanced
    By anonytmouse in forum C Programming
    Replies: 2
    Last Post: 12-03-2003, 09:27 AM
  3. question about 32 bit addresses??
    By newbie02 in forum C++ Programming
    Replies: 3
    Last Post: 09-12-2003, 02:02 PM
  4. 16 bit or 32 bit
    By Juganoo in forum C Programming
    Replies: 9
    Last Post: 12-19-2002, 07:24 AM