Hi,

Il 14/12/18 14:34, Witold Baryluk ha scritto:
> $ objdump -R -T /usr/lib/x86_64-linux-gnu/libboost_python.so | grep PySlice
> 0000000000000000      D  *UND*        0000000000000000              
> PySlice_New
> 0000000000045778 R_X86_64_JUMP_SLOT  PySlice_New
> $
> 
> Yet, it doesn't link to proper library:
> 
> $ ldd /usr/lib/x86_64-linux-gnu/libboost_python.so
>     linux-vdso.so.1 (0x00007ffdc62cf000)
>     librt.so.1 => /lib/x86_64-linux-gnu/librt.so.1 (0x00007f70cfa6e000)
>     libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2 (0x00007f70cfa69000)
>     libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 
> (0x00007f70cfa48000)
>     libutil.so.1 => /lib/x86_64-linux-gnu/libutil.so.1 (0x00007f70cfa43000)
>     libstdc++.so.6 => /lib/x86_64-linux-gnu/libstdc++.so.6 
> (0x00007f70cf8c0000)
>     libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007f70cf72c000)
>     libgcc_s.so.1 => /lib/x86_64-linux-gnu/libgcc_s.so.1 (0x00007f70cf710000)
>     libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007f70cf553000)
>     /lib64/ld-linux-x86-64.so.2 (0x00007f70cfb00000)
> $
> 
> (no *python* libs linked). Is it using libdl to open python libs dynamically? 
> How would that even work?
> 
> The libpython2{,7}-dev are installed, and the symbols are in proper places:
> 
> $ objdump -T -R /usr/lib/x86_64-linux-gnu/libpython2.7.so | grep PySlice_New
> 0000000000172820 g    DF .text        00000000000000ec  Base        
> PySlice_New
> $
> 
> Why libbost_pythonX is not linked with -lpythonX ?

I think this is intended: see for example [1] (from the upstream
repository). I am not really sure of what is the rationale behind this,
but since it seems to be a conscious upstream decision, I would not
change it.

 [1] https://github.com/boostorg/python/blob/develop/build/Jamfile#L80

In practice, I think that you can fix your build failure by manually
adding -lpythonXY to your linking flags.

All the best, Giovanni.
-- 
Giovanni Mascellani <g.mascell...@gmail.com>
Postdoc researcher - Université Libre de Bruxelles
        

Attachment: signature.asc
Description: OpenPGP digital signature

Reply via email to