Consulta LD_ASSUME_KERNEL
Aldrin Gonzalo Martoq Ahumada
amartoq en dcc.uchile.cl
Lun Ago 6 12:54:12 CLT 2007
Estimados, me toca trabajar con software viejo y propietario
(principalmente IBM) y he notado que la variable de ambiente
LD_ASSUME_KERNEL ya no funciona como antaño.
Mi consulta es si esta caracteristica de LD_ASSUME_KERNEL se eliminó,
o hay que instalar algun paquete adicional. Segun tengo entendido,
esto es parte de libc.
He buscado en internet, pero todos indican comentar las líneas de tus
scripts, no a que se debe la causa ni cuando ocurrio... Tambien he
buscado referencias de cuando se eliminó el soporte a LinuxThreads en
la libc (y si existe alguna manera de reemplazarlo) y no he
encontrado. Servirá copiar todas las bibliotecas de libc de un sistema
mas viejo y poner esta en un LD_LIBRARY_PATH que este _ANTES_ de la
/libc/; digamos /compat/oldlibc6/ ???
Aqui hay algunos dumps de consola con los errores:
----- Ubuntu Feisty 7.04 ó Centos 5 ----
/opt/IBMJava2-131/jre/bin:# ./java -version
/opt/IBMJava2-131/jre/bin/exe/java: error while loading shared
libraries: libpthread.so.0: cannot open shared object file: No such
file or directory
/opt/IBMJava2-131/jre/bin:# uname -srv
Linux 2.6.20-16-generic #2 SMP Thu Jun 7 20:19:32 UTC 2007
/opt/IBMJava2-131/jre/bin:# dpkg -l libc6 | grep ^ii
ii libc6 2.5-0ubuntu14 GNU C Library: Shared libraries
/opt/IBMJava2-131/jre/bin:# ls -l /lib/libpthread*
-rwxr-xr-x 1 root root 108207 2007-04-04 06:48 /lib/libpthread-2.5.so
lrwxrwxrwx 1 root root 17 2007-04-20 13:14 /lib/libpthread.so.0 ->
libpthread-2.5.so
--- Comentando la linea LD_ASSUME_KERNEL en la shell ---
/opt/IBMJava2-131/jre/bin:# perl -pi'old.*' -e 's/(export
LD_ASSUME_KERNEL.*)/echo \1 > \/dev\/null/' java
/opt/IBMJava2-131/jre/bin:# ./java -version
java version "1.3.1"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.3.1)
Classic VM (build 1.3.1, J2RE 1.3.1 IBM build cxia32131ifx-20061109
(131SR10 + 110450 + 110188 + 111317) (JIT enabled: jitc))
---- En Debian 4.0, sin necesidad de comentar LD_ASSUME_KERNEL -----
/opt/IBMJava2-131/jre/bin:# ./java -version
java version "1.3.1"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.3.1)
Classic VM (build 1.3.1, J2RE 1.3.1 IBM build cxia32131ifx-20061109
(131SR10 + 110450 + 110188 + 111317) (JIT enabled: jitc))
/opt/IBMJava2-131/jre/bin:# uname -srv
Linux 2.6.18-4-xen-686 #1 SMP Thu May 10 03:24:35 UTC 2007
/opt/IBMJava2-131/jre/bin:# ls -l /lib/libpthread*
-rw-r--r-- 1 root root 81701 2007-02-21 12:13 /lib/libpthread-0.10.so
lrwxrwxrwx 1 root root 18 2007-07-30 18:11 /lib/libpthread.so.0 ->
libpthread-0.10.so
/opt/IBMJava2-131/jre/bin:# ls -l /lib/libpthread*
-rw-r--r-- 1 root root 81701 2007-02-21 12:13 /lib/libpthread-0.10.so
lrwxrwxrwx 1 root root 18 2007-07-30 18:11 /lib/libpthread.so.0 ->
libpthread-0.10.so
/opt/IBMJava2-131/jre/bin:# dpkg -l libc6 |grep ^ii
ii libc6 2.3.6.ds1-13 GNU C Library: Shared libraries
/opt/IBMJava2-131/jre/bin:# grep LD_ASSUME java
typeset set_LD_ASSUME_KERNEL_for_no_NPTL
set_LD_ASSUME_KERNEL_for_no_NPTL=""
if [ -z "$LD_ASSUME_KERNEL" ]
set_LD_ASSUME_KERNEL_for_no_NPTL="true"
# It is assumed that exporting LD_ASSUME_KERNEL to 2.4.10 is safe both
for RHAS 2.1 with floating stacks
export LD_ASSUME_KERNEL=2.2.5
if [ "$set_LD_ASSUME_KERNEL_for_no_NPTL"="true" ] #ibm en 76199
export LD_ASSUME_KERNEL=2.4.19
if [ "$set_LD_ASSUME_KERNEL_for_no_NPTL" = "true" ]
export LD_ASSUME_KERNEL=2.4.19
---------------------
Gracias,
--
Aldrin Martoq
Más información sobre la lista de distribución Linux