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? Thanks, A. -- Ansgar Esztermann DV-Systemadministration Max-Planck-Institut für biophysikalische Chemie, Abteilung 105 -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
In <8AC86F2E-5BB2-4793-9183-CF4CB8E2084F@gwdg.de>, Ansgar Esztermann wrote:
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?
Newer versions of glibc should run programs compiled against older versions of glibc as long as the SO_NAME (and maybe SO_VERSION?) hasn't changed. You may want to report this segfaults as bugs in 11.1.
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)
The glibc package for 10.3 probably doesn't provide libc.so.6(GLIBC_2.7). In general compiling on a newer system and running on an older systems isn't supported. There's no good way to "fix up" an old version to match the new version, but you can "fix" a new version to match an old version.
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?
You may have to install some compatibility libraries on the 11.1 system. I do not have a 10.3 system around to investigate. -- Boyd Stephen Smith Jr. ,= ,-_-. =. bss@iguanasuicide.net ((_/)o o(\_)) ICQ: 514984 YM/AIM: DaTwinkDaddy `-'(. .)`-' http://iguanasuicide.net/ \_/
On Jun 30, 2009, at 18:27 , Boyd Stephen Smith Jr. wrote:
Newer versions of glibc should run programs compiled against older versions of glibc as long as the SO_NAME (and maybe SO_VERSION?) hasn't changed. You may want to report this segfaults as bugs in 11.1.
...unless the binary is (partly) static and calls e.g. getpwuid() (see Andreas' mail). I thought the binary in question was fully dynamic, but I was probably wrong.
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)
The glibc package for 10.3 probably doesn't provide libc.so. 6(GLIBC_2.7). In general compiling on a newer system and running on an older systems isn't supported. There's no good way to "fix up" an old version to match the new version, but you can "fix" a new version to match an old version.
OK, fair enough.
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?
You may have to install some compatibility libraries on the 11.1 system. I do not have a 10.3 system around to investigate.
There is a glibc-obsolete rpm, but it does not seem to install anything other than an empty directory. Thank you for your reply. A. -- Ansgar Esztermann DV-Systemadministration Max-Planck-Institut für biophysikalische Chemie, Abteilung 105 -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
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
On Jul 1, 2009, at 8:58 , Andreas Jaeger wrote:
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,
Thanks for making this clear. I was under the impression that the binary is dynamic, but I guess I was wrong. There are some static libraries created during the build process, so maybe that is where the error occurs. A. -- Ansgar Esztermann DV-Systemadministration Max-Planck-Institut für biophysikalische Chemie, Abteilung 105 -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
On Wednesday 01 July 2009 11:24:44 Ansgar Esztermann wrote:
Thanks for making this clear. I was under the impression that the binary is dynamic, but I guess I was wrong. There are some static libraries created during the build process, so maybe that is where the error occurs.
AFAIR a static library should still be ok - a static binary only is a problem, 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
On 01/07/09 05:24, Ansgar Esztermann wrote:
Thanks for making this clear. I was under the impression that the binary is dynamic,
The compiler will throw a warning as well.. "warning: Using 'getpwuid' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking" -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
On Jul 1, 2009, at 19:40 , Cristian Rodríguez wrote:
Thanks for making this clear. I was under the impression that the binary is dynamic,
The compiler will throw a warning as well..
"warning: Using 'getpwuid' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking"
... which it did not do in the present case. I searched the build logs, but there is nothing suspicious. Maybe there is a different cause of trouble elsewhere. A. -- Ansgar Esztermann DV-Systemadministration Max-Planck-Institut für biophysikalische Chemie, Abteilung 105 -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
participants (4)
-
Andreas Jaeger
-
Ansgar Esztermann
-
Boyd Stephen Smith Jr.
-
Cristian Rodríguez