# Further diagnosis of ld-elf issues with lightspark



## pmooney (Jul 20, 2011)

This isn't a support request on a current port, but I didn't know where else to ask...

I cloned the lightspark-devel port and have been tweaking it to successfully build the 0.5-rc version.  Hoping to make small steps of progress, I've been testing only the CLI utility.  (Hopefully cutting down on complexity introduced by the browser plugin)  At this point the lightspark binary is segfaulting inside ld-elf.so.  I've done some debugging of this issue but I was wondering if there were any suggestions for documentation or other resources I should pursue to continue diagnosing the problem.

Here's a little more detail on the steps I took to arrive at this point:
1. Worked to get lightspark 0.5-rc to build outside of ports.  There were a few changes to the source needed in addition to the patches supplied by the port.
2. Discovered the libmap settings needed to get lightspark to link to the proper gcc45 libs at runtime
3. Rebuilt lightspark using my updated port with debugging symbols enabled
4. Temporarily installed an ld-elf.so binary with debugging symbols to help track down the issue

The current backtrace leads to _symlook_obj_:


```
#0  0x280508a3 in symlook_obj (name=0x2adc926f "_ZTVN10__cxxabiv120__si_class_type_infoE", hash=45514101, obj=0x2adc5a00,
 ventry=0x28095860, flags=0) at rtld.c:2804
#1  0x28050cf2 in symlook_list (name=0x2adc926f "_ZTVN10__cxxabiv120__si_class_type_infoE", hash=45514101,
 objlist=Variable "objlist" is not available.) at rtld.c:2717
#2  0x28050ed9 in symlook_default (name=0x2adc926f "_ZTVN10__cxxabiv120__si_class_type_infoE", hash=45514101,
 refobj=0x2adc6800, defobj_out=0xbfbfd948, ventry=0x28095860, flags=0) at rtld.c:2674
#3  0x28051597 in find_symdef (symnum=72, refobj=0x2adc6800, defobj_out=0xbfbfd9a8, flags=0, cache=0x2adcf000) at
 rtld.c:1208
#4  0x2804ec8e in reloc_non_plt (obj=0x2adc6800, obj_rtld=0x2807e6a0) at /usr/src/libexec/rtld-elf/i386/reloc.c:147
#5  0x28051338 in relocate_objects (first=Variable "first" is not available.) at rtld.c:1785
#6  0x28053675 in dlopen (name=0x2b01c18c "/usr/local/lib/lightspark/plugins/liblightsparkpulseplugin.so.old", mode=1)
 at rtld.c:2040
#7  0x280eca3d in std::_Rb_tree<lightspark::tiny_string, std::pair<lightspark::tiny_string const, lightspark::variable>,
 std::_Select1st<std::pair<lightspark::tiny_string const, lightspark::variable> >, std::less<lightspark::tiny_string>,
 std::allocator<std::pair<lightspark::tiny_string const, lightspark::variable> > >::_M_insert_equal_ () from
 /usr/local/lib/lightspark/liblightspark.so.0.5

...OUTPUT CUT...
```

The _obj_ structure being passed in appears to have some bogus data, at least relating to the other context of the function.  If I had to take a wild stab at it, I would guess that it still has to do with stdc++ versions, but my knowledge relating to the topic is frightfully limited.


I appreciate any input you have.

Thanks


----------

