Re: [opensuse] glibc compatibility



On Tuesday 30 June 2009 17:54:05 Ansgar Esztermann wrote:
Hello everyone,


we're experiencing segfaults in binaries created on openSUSE 10.2 when
run on 11.1 systems. These occur in getpwuid(), so I am wondering what
the expected compatibilty between glibc versions is -- shouldn't the
linker complain if the user tries to execute a binary that's too old?

When compiling on 11.1 and executing on 10.3, the linker gives an error:
: lee$; /usr/local/gromacs/405/fftw312-gcc412/bin/pdb2gmx -f 1UBI.pdb

/usr/local/gromacs/405/fftw312-gcc412/bin/pdb2gmx: /lib64/libc.so.6:
version `GLIBC_2.7' not found (required by /usr/local/gromacs/405/
fftw312-gcc412/bin/pdb2gmx)

A quick check seems to indicate that 11.0 will run binaries compiled
on either 10.2 or 11.1, so we have some leeway. Is there any hope to
compile a binary that will run on both 10.3 and 11.1?

A binary compiled with an older glibc should run with a newer glibc. Seeing a
failure in getpwuid points to one of the exceptions: Static binaries using NSS
code like getpwuid might not work. If you only use shared objects you're fine
in general.

So, compile on 10.2 dynamically and it should run on 11.1,
Andreas
--
Andreas Jaeger, Director openSUSE, aj@{novell.com,opensuse.org}
SUSE LINUX Products GmbH, GF: Markus Rex, HRB 16746 (AG Nürnberg)
Maxfeldstr. 5, 90409 Nürnberg, Germany
GPG fingerprint = 93A3 365E CE47 B889 DF7F FED1 389A 563C C272 A126

Attachment: signature.asc
Description: This is a digitally signed message part.



Relevant Pages

  • Re: Upgrading FreeBSD 8.3 amd64
    ... It is even so that the ports work on all 'current' FreeBSD ... independent of the kernel version. ... On Linux I usually install binaries for the base system and desktop ... I install very often the binary and compile later from ...
    (freebsd-questions)
  • Re: [KCONFIG] Cant compile 2.6.12 without Gettext
    ... > toolchain". ... to compile a kernel. ... binaries. ...
    (Linux-Kernel)
  • Re: [LTP] Re: Recent changes in LTP test results
    ... Program Header: ... compile with cc -o x.rw -z noexecstack x.c produces a ... elf binary without execute permission on the stack. ... So binaries compiled with an old compiler are not being ...
    (Linux-Kernel)
  • Re: rb_sys_fail(socket(2)) Ticket #9438
    ... I don't have VC++ 8 & so can't compile. ... You could try the mingw ruby version. ... It might be a ruby bug, ... The binaries installed by the one click ...
    (comp.lang.ruby)