2

I'm trying to install the Arma 2 OA dedicated server on a Virtualbox VM so I can test my own missions in a sandbox environment in a way that lets me offload them to another computer in my network. (The other computer is running the VM, but it's a windows machine, and I didn't want to hassle with its installation) It needs at least 2, and preferably 4GB of ram, so I thought I would install the AMD64 version of ubuntu 13.10 to get this going.

'How do you run a 32-bit program on a 64-bit version of Ubuntu?' already explained how to install 32bit software though apt-get and/or dpkg, but that doesn't apply in this case.

The server is offered as a compressed download on the site of BI Studio, the developer of the Arma games. Its installation instructions are obviously slightly out of date with the current state of the art. (probably because the state of the art has been updated quite recently :) ) It states that I have to install ia32-libs, which has now apparently been deprecated. Now I have to find out how to get the right packages installed to make sure that it will run.

My experience level is like novice-intermediate when it comes to these issues. I've installed a lot of packages though apt-get; I've solved dependency issues in the past; I haven't installed much software without using package managers. I can handle myself with basic administrative work like editing conf files and such.

I have just gone ahead and tried to install it without installing ia32-libs through apt-get but to install gcc to get the libs after all. My reasoning being that gcc will include the files for backward compatibility coding and on linux all libs are (as far as I can tell) installed at a system level in /libs . So far it seems to start up. (I can connect with the game server trough my in-game network browser, so it's communicating) I'm not sure if there's any dependency checking going on when running the game server program, so I'm left with a couple of questions:

  • Does 13.10 catch any calls to ia32libs libraries and translate the calls to the right code on amd64?
  • If it runs, does that mean that all required libraries have been loaded correctly, or is there a chance of it crashing later on when a library that was needed is missing after all?
  • Is it necessary to do a workaround such as installing gcc? (along with its i386 libs)
  • How do I find out what libraries I might need to run this software? (or any other piece of 32-bit software that isn't offered through a package manager)

  • 1

    1 Answer 1

    3

    It's mostly depends on the software and how it was written. In such cases I would go for the 32-bit Debian (if available) binary or the compiled 32-bits binary. This was already explained in my answer How do you run a 32-bit program on a 64-bit version of Ubuntu? and demonstrated even running a 64-bit version of a 32-bit system (which was impossible some years ago). It's actually easier to run 32-bits applications in 64-bits systems.

    Normally when you run the binary it will inform you of missing libraries, which you can look in the repositories.

    Does 13.10 catch any calls to ia32libs libraries and translate the calls to the right code on amd64?

    No. Developers should do this. The system only shows the libraries using the GNU Linker ld. If the software tries to use "hard-code" libraries, then you have to trick him and point them to the right libraries. Modern, well written software, do not need this.

    If it runs, does that mean that all required libraries have been loaded correctly, or is there a change of it crashing later on when a library that was needed is missing after all?

    If it runs, is perfect. Through libraries are loaded at the start of the executable, and without them (ie some of them are missing) it will not start, but even if they are present, not all calls are called at start so maybe a certain call for a certain function changed the way it behaves and the application doesn't support this, leading to a crash. This are corner cases scenarios but they are possible So you'll probably notice if it has incompatibilities with newer libraries. However, that's another issue altogether. To fix that you'll have to either adapt to the new libraries or downgrade the already installed.

    Is it necessary to do a workaround such as installing gcc?

    gcc is a compiler. Only if you will compile code using C or C++ you need to install it. Other cases may need a workaround, but I haven't seen a "binary" (already compiled executable) in need of the gcc compiler to run.

    How do I find out what libraries I might need to run this software? (or any other piece of 32-bit software that isn't offered through a package manager)

    Is a bit brutish, but if the instructions doesn't say exactly what libraries you need, or use the ld-linux.so --list command. Example:

    $ /lib64/ld-linux-x86-64.so.2 --list /bin/bash
        linux-vdso.so.1 =>  (0x00007fffd479f000)
        libtinfo.so.5 => /lib/x86_64-linux-gnu/libtinfo.so.5 (0x00007f0d39138000)
        libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2 (0x00007f0d38f34000)
        libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007f0d38b6a000)
        /lib64/ld-linux-x86-64.so.2 (0x00007f0d3937f000
    

    (the ldd binary provides the same output, thanks to @ubfan)

    As you can see, bash uses linux-vdso, libtinfo.so, libdl.so and libc.so. If those libraries are correct then bash is happy with them. This is for dinamicaly linked binaries. You may use --verify instead to check if the binary is really dynamically linked.

    Then you take the name of the libraries, lets say libtinfo.so.5, which it included in the packages:

    File                                Packages
    /lib/i386-linux-gnu/libtinfo.so.5   libtinfo5 [not amd64]
    /lib/x86_64-linux-gnu/libtinfo.so.5 libtinfo5 [not i386]
    /lib32/libtinfo.so.5                lib32tinfo5 [not i386]
    /lib64/libtinfo.so.5                lib64tinfo5 [not amd64]
    /usr/lib/debug/libtinfo.so.5        libtinfo5-dbg
    /usr/libx32/libtinfo.so.5           libx32tinfo5
    

    So, we just have to install the correct package for the architecture of the binary (if it's 32-bits, add :i386 to the name of the package, 64-bit :amd64) and we will be good to go.

    Needles to say, to run 64-bits binaries in a 32-bit platform your CPU must be 64-bits capable (most of the systems from 2008 and later are) and most likely will require a 64-bits kernel installed.

    5
    • I know gcc is a compiler (I actually code stuff, though ususally in windows), but it also needs libs to get things working, right? I installed the gcc i386 libraries along with it IIRC.
      – Onno
      Nov 1, 2013 at 16:46
    • 1
      ldd is a nice wrapper for the ld-linux.so command
      – ubfan1
      Nov 1, 2013 at 16:48
    • @Braiam: Could you elaborate a bit on the 2nd bullet? If it starts up, can it crash later because it is still missing some libs that it doesn't load from the get-go? I'm asking this because it usually isn't the case on on windows, as most dll's are loaded at the start, but could be done later if the program dynamically loads them later on, I don't know how this works for linux.
      – Onno
      Nov 1, 2013 at 16:49
    • @Onno 1st. Yes, it does need the libraries to work, it's as easier to install gcc:i386 if you want to install the 32-bits parts of the executable, thou. 2nd, through libraries are loaded at the start of the executable, and without them (ie some of them are missing) it will not start, but even if they are present, not all calls are called at start so maybe a certain call for a certain function changed the way it behaves and the application doesn't support this, leading to a crash. This are corner cases scenarios but they are possible.
      – Braiam
      Nov 1, 2013 at 16:55
    • @Braiam: I edited in the info in your previous comment so I can mark it as an answered question.
      – Onno
      Nov 1, 2013 at 17:03

    You must log in to answer this question.

    Not the answer you're looking for? Browse other questions tagged .