How to run old linux code (32bit) on a current Ubuntu system (64bit)?
Carlos O'Donell
carlos@systemhalted.org
Thu Aug 1 05:43:00 GMT 2013
On Sat, Jul 27, 2013 at 4:47 PM, Peng Yu <pengyu.ut@gmail.com> wrote:
> Hi,
>
> I have some legacy binary code ("y"). When I run it on a current 64bit
> ubuntu system, I get the following errors. Do you know an easy way to
> get it running on my current 64bit Ubuntu system? Thanks.
AFAIK you did everything that you had to do...
> ~$ cat /etc/issue
> Ubuntu 13.04 \n \l
>
> ~$ sudo apt-get install ia32-libs
... this installs a 32-bit libc.
> ~$ file y
> y: ELF 32-bit LSB executable, Intel 80386, version 1 (SYSV),
> dynamically linked (uses shared libs), for GNU/Linux 2.0.0, not
> stripped
> ~$ ./y
> ./y: relocation error: ./y: symbol errno, version GLIBC_2.0 not
> defined in file libc.so.6 with link time reference
This is most likely because application `y' incorrectly defined
errno as `extern int errno;' which is invalid ISO C and breaks
when glibc switches errno to thread-local storage in later
versions.
If your `y' had correctly used `#include <errno.h>' and then
used errno everything would have continued to function.
The simplest options are:
(a) Contact your vendor for `y' and get a new fixed version
of `y'.
(b) Install an old chroot and run `y' inside that chroot, or
better yet run `y' in a VM of an old distribution.
Cheers,
Carlos.
More information about the Libc-help
mailing list