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