[Neurodebian-devel] Debian packages for Stimfit
Yaroslav Halchenko
debian at onerussian.com
Wed Feb 2 20:17:33 UTC 2011
oops -- missed this one...
I don't think it is a matter of dlopen, but just missing inclusion of
functionality from recording.* ... e.g. on a blunt attempt:
$> objdump -t ./.libs/libstf.so.0.0.0 | grep _ZN9Recording9SetFitEndEi
0000000000000000 *UND* 0000000000000000 _ZN9Recording9SetFitEndEi
$> g++ -shared -nostdlib /usr/lib/gcc/x86_64-linux-gnu/4.4.5/../../../../lib/crti.o /usr/lib/gcc/x86_64-linux-gnu/4.4.5/crtbeginS.o .libs/libstf_la-stfswig_wrap.o .libs/libstf_la-stfswig.o -lwx_baseu-2.8 -lwx_gtk2u_core-2.8 -lwx_gtk2u_adv-2.8 -lwx_gtk2u_aui-2.8 -lwx_baseu_net-2.8 -L/usr/lib/python2.6 -lpython2.6 -L/usr/lib/gcc/x86_64-linux-gnu/4.4.5 -L/usr/lib/gcc/x86_64-linux-gnu/4.4.5/../../../../lib -L/lib/../lib -L/usr/lib/../lib -L/usr/lib/gcc/x86_64-linux-gnu/4.4.5/../../.. -lstdc++ -lm -lc -lgcc_s /usr/lib/gcc/x86_64-linux-gnu/4.4.5/crtendS.o /usr/lib/gcc/x86_64-linux-gnu/4.4.5/../../../../lib/crtn.o -pthread -pthread -pthread -Wl,-soname -Wl,libstf.so.0 -o .libs/libstf.so.0.0.0 ../../stimfit-recording.o
/usr/bin/ld: ../../stimfit-recording.o: relocation R_X86_64_32 against `.bss' can not be used when making a shared object; recompile with -fPIC
../../stimfit-recording.o: could not read symbols: Bad value
i.e. we need portable code to get into the library... rebuild ../../stimfit-recording.o with -fPIC:
novo:~/deb/perspect/stimfit/stimfit-0.10.5/src/stfswig
$> g++ -shared -nostdlib /usr/lib/gcc/x86_64-linux-gnu/4.4.5/../../../../lib/crti.o /usr/lib/gcc/x86_64-linux-gnu/4.4.5/crtbeginS.o .libs/libstf_la-stfswig_wrap.o .libs/libstf_la-stfswig.o -lwx_baseu-2.8 -lwx_gtk2u_core-2.8 -lwx_gtk2u_adv-2.8 -lwx_gtk2u_aui-2.8 -lwx_baseu_net-2.8 -L/usr/lib/python2.6 -lpython2.6 -L/usr/lib/gcc/x86_64-linux-gnu/4.4.5 -L/usr/lib/gcc/x86_64-linux-gnu/4.4.5/../../../../lib -L/lib/../lib -L/usr/lib/../lib -L/usr/lib/gcc/x86_64-linux-gnu/4.4.5/../../.. -lstdc++ -lm -lc -lgcc_s /usr/lib/gcc/x86_64-linux-gnu/4.4.5/crtendS.o /usr/lib/gcc/x86_64-linux-gnu/4.4.5/../../../../lib/crtn.o -pthread -pthread -pthread -Wl,-soname -Wl,libstf.so.0 -o .libs/libstf.so.0.0.0 ../../stimfit-recording.o
$> objdump -t ./.libs/libstf.so.0.0.0 | grep _ZN9Recording9SetFitEndEi
0000000000023aa0 g F .text 0000000000000028 _ZN9Recording9SetFitEndEi
voila! ;-)
it seems to me that
neurodebian at lego:/tmp/stimfit$ dpkg -c stimfit_0.10.7-0ubuntu2_amd64.deb | grep \.so
-rw-r--r-- root/root 1195145 2011-01-31 09:52 ./usr/lib/stimfit/libstf.so
-rw-r--r-- root/root 1195145 2011-01-31 09:52 ./usr/lib/python2.6/dist-packages/stimfit/_stf.so
i.e. they are identical things
should be improved that there would be ./usr/lib/stimfit/libstf.so which would
absorbs all the code (e.g. like recording.*) which will be used (linked
dynamically) by both _stf.so and bin/stimfit
and definitions present in /usr/lib/stimfit/libstf.so would be defined
On Mon, 31 Jan 2011, Yury V. Zaytsev wrote:
> > * during build there is report of
> > dpkg-shlibdeps: warning: debian/stimfit/usr/lib/python2.6/dist-packages/stimfit/_stf.so contains an unresolvable reference to symbol _ZN9Recording9SetFitEndEi: it's probably a plugin.
> > is that indeed a plugged in via some custom loading of some dynamic library? I see it undefined:
> > $> objdump -t /usr/lib/python2.6/dist-packages/stimfit/_stf.so | grep _ZN9Recording9SetFitEndEi
> > 0000000000000000 *UND* 0000000000000000 _ZN9Recording9SetFitEndEi
> > $> objdump -t /usr/lib/stimfit/libstf.so | grep _ZN9Recording9SetFitEndEi
> > 0000000000000000 *UND* 0000000000000000 _ZN9Recording9SetFitEndEi
> It is a Python module which is supposed to be dlopen()'ed by the Python
> interpreter at runtime whenever the package is imported by the user. I
> remember having similar problem when I was packaging PyNEST, but somehow
> it went away after I figures out how to use pysupport.
--
=------------------------------------------------------------------=
Keep in touch www.onerussian.com
Yaroslav Halchenko www.ohloh.net/accounts/yarikoptic
More information about the Neurodebian-devel
mailing list