[PlanetCCRMA] problem installing cmucl-cm-clm-cmn

Wes Shull wes@kuoi.asui.uidaho.edu
Mon Dec 22 20:08:01 2003


On Monday 22 December 2003 02:35 pm, you wrote:
> What happens if you do a:
>   /usr/bin/lisp -core /usr/lib/cmucl/lisp-dist.core

Still segfaults.  Since we eliminated the cmucl-cm-clm-cmn core, that made me 
think the problem is in cmucl.

> And just in case there were some kind of upgrade problems, /usr/bin/lisp
> should be a shell script (check that).

Yup, it's there.

So, suspecting cmucl, I apt-got source cmucl, planning to recompile it 
myself...  then discovered "Note that to recompile CMUCL you need a working 
CMUCL system :-("

Next, I grabbed the latest cmucl (18e-8) and clc (3.80) debs, made minor 
necessary changes to the specfile, and rebuilt the rpm, but it still 
segfaulted.

Ok, getting desperate now, i busted out gdb.  Not even sure if this invocation 
is doing what I expect, but I did:
LD_ASSUME_KERNEL=2.2.5 LD_PRELOAD=/usr/lib/cmucl/lisp/libdl-2.3.2.so gdb 
/usr/bin/lisp.bin

then

(gdb) run -core /usr/lib/cmucl/lisp-dist.core
Starting program: /usr/bin/lisp.bin -core /usr/lib/cmucl/lisp-dist.core
(no debugging symbols found)...(no debugging symbols found)...(no debugging 
symbols found)...(no debugging symbols found)...
Program received signal SIGSEGV, Segmentation fault.
0x4e6d5400 in _dl_runtime_resolve () from /lib/ld-linux.so.2
(gdb) bt
#0  0x4e6d5400 in _dl_runtime_resolve () from /lib/ld-linux.so.2
#1  0x0805c3c1 in gc_init ()
#2  0x0804c3a8 in main ()
(gdb) x/8x 0x4e6d5400
0x4e6d5400 <_dl_runtime_resolve>:       0x00000000      0x00000000      
0x00000000      0x00000000
0x4e6d5410 <_dl_runtime_resolve+16>:    0x00000000      0x00000000      
0x00000000      0x00000000

This looks to me like /lib/ld-linux.so.2 isn't getting linked in properly, but 
ldd says it's finding it fine:

[wes@ip68-110-7-34 wes]$ ldd /usr/bin/lisp.bin
        libdl.so.2 => /lib/libdl.so.2 (0x438d4000)
        libm.so.6 => /lib/i686/libm.so.6 (0x4113d000)
        libc.so.6 => /lib/i686/libc.so.6 (0x41000000)
        /lib/ld-linux.so.2 => /lib/ld-linux.so.2 (0x4e6c9000)

Just to show that the LD_PRELOAD bit is working on my system:

[wes@ip68-110-7-34 wes]$ LD_PRELOAD=/usr/lib/cmucl/lisp/libdl-2.3.2.so ldd 
/usr/bin/lisp.bin
        /usr/lib/cmucl/lisp/libdl-2.3.2.so => 
/usr/lib/cmucl/lisp/libdl-2.3.2.so (0x40001000)
        libm.so.6 => /lib/i686/libm.so.6 (0x4113d000)
        libc.so.6 => /lib/i686/libc.so.6 (0x41000000)
        /lib/ld-linux.so.2 => /lib/ld-linux.so.2 (0x4e6c9000)

So (here's the payoff), I poked around a bit and discovered that you can 
actually run ld-linux.so explicitly.  I changed /usr/bin/lisp to this...

LD_ASSUME_KERNEL=2.2.5 LD_PRELOAD=/usr/lib/cmucl/lisp/libdl-2.3.2.so exec 
/lib/ld-linux.so.2 /usr/bin/lisp.bin $@

...and now it works.  That still leaves several questions unresolved though:
1) Why was it working for others, but not for me?
2) Why does explicitly calling ld-linux work for me, but not without?

--wes (not fully indoctrinated into the mysteries of dynamic linking)