Results 1 to 4 of 4

Thread: 32-bit linux source repository

  1. #1
    Join Date
    Mar 2012
    Beans
    2

    32-bit linux source repository

    What repository do I need to retrieve 32 bit linux includes and libs? I want to compile my software code for 32 bit x86 architecture although I have 64-bit Ubuntu laptop.

  2. #2
    Join Date
    Nov 2005
    Location
    Bordeaux, France
    Beans
    11,297
    Distro
    Ubuntu 12.04 Precise Pangolin

    Re: 32-bit linux source repository

    First, cross-compiling is not trivial, and you sould only do it if you can't do otherwise. In your case, you can very well make a 32-bit VirtualBox, and it will work very well.

    If you really want to cross-compile, the first thing you will need is gcc-multilib, which contains 32-bit versions of all the compiling toolchain. Then there are libraries. There's a lot of them in tha package ia32-libs, and a few libraries have separate 32-bit package (look for packages beginning with lib32). In general, though, if your program uses a lot of third-party libraries, you will have to install some of them manually. It's not complicated, basically you download the 32-bit package for a library from http://packages.ubuntu.com, you extract it with dpkg -x, and you copy the library files into /usr/lib32. It's still a lot of hassle, though, so really, just make a 32-bit VBox.
    「明後日の夕方には帰ってるからね。」


  3. #3
    Join Date
    Sep 2009
    Beans
    1,293

    Re: 32-bit linux source repository

    Ubuntu comes with multiarch enabled by default these days (since oneiric?) on amd64.
    You should have something like
    Code:
    $ cat /etc/dpkg/dpkg.cfg.d/multiarch 
    foreign-architecture i386
    This means that i386 libs are available in synaptic or by appending :i386 on the command line. ie
    Code:
    $ sudo apt-get install libmath++-dev:i386
    Having said that I'd go with Bachstelze and use virtualisation instead. For one, multiarch libs won't always be installable, some will conflict and not install. You could have a chroot or a 32 bit toolchain but its just more work than is needed I'd say.
    Simplest method, install virtualbox or virt-manager, virtualbox is probably the best desktop choice. Then install a i386 ubuntu and build in there. You get an easily maintained 32 bit system with one click

  4. #4
    Join Date
    Mar 2012
    Beans
    2

    Re: 32-bit linux source repository

    Thank you. I will take your advice and the virtualbox route.

Tags for this Thread

Bookmarks

Posting Permissions

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