How to find out what the python version of libboost_python.so uses?

I would like to know which version of python boost_python.so is expecting. This is on a computer with several versions of python, and I myself did not create / install boost (and I do not have root access).

How can I find out for which python version boost_python.so has been compiled?

I did not find anything useful in exiting ldd, but turned it on here if someone sees something.

-bash-3.2$ ldd -v libboost_python.so.1.46.1 libutil.so.1 => /lib64/libutil.so.1 (0x00002ad65582d000) libpthread.so.0 => /lib64/libpthread.so.0 (0x00002ad655a30000) libdl.so.2 => /lib64/libdl.so.2 (0x00002ad655c4b000) librt.so.1 => /lib64/librt.so.1 (0x00002ad655e50000) libstdc++.so.6 => /usr/lib64/libstdc++.so.6 (0x00002ad656059000) libm.so.6 => /lib64/libm.so.6 (0x00002ad656359000) libgcc_s.so.1 => /lib64/libgcc_s.so.1 (0x00002ad6565dd000) libc.so.6 => /lib64/libc.so.6 (0x00002ad6567eb000) /lib64/ld-linux-x86-64.so.2 (0x000000374c600000) Version information: ./libboost_python.so.1.46.1: libgcc_s.so.1 (GCC_3.0) => /lib64/libgcc_s.so.1 libpthread.so.0 (GLIBC_2.2.5) => /lib64/libpthread.so.0 libc.so.6 (GLIBC_2.4) => /lib64/libc.so.6 libc.so.6 (GLIBC_2.2.5) => /lib64/libc.so.6 libstdc++.so.6 (CXXABI_1.3) => /usr/lib64/libstdc++.so.6 libstdc++.so.6 (GLIBCXX_3.4) => /usr/lib64/libstdc++.so.6 /lib64/libutil.so.1: libc.so.6 (GLIBC_2.2.5) => /lib64/libc.so.6 /lib64/libpthread.so.0: ld-linux-x86-64.so.2 (GLIBC_2.3) => /lib64/ld-linux-x86-64.so.2 ld-linux-x86-64.so.2 (GLIBC_2.2.5) => /lib64/ld-linux-x86-64.so.2 ld-linux-x86-64.so.2 (GLIBC_PRIVATE) => /lib64/ld-linux-x86-64.so.2 libc.so.6 (GLIBC_2.3.2) => /lib64/libc.so.6 libc.so.6 (GLIBC_PRIVATE) => /lib64/libc.so.6 libc.so.6 (GLIBC_2.2.5) => /lib64/libc.so.6 /lib64/libdl.so.2: ld-linux-x86-64.so.2 (GLIBC_PRIVATE) => /lib64/ld-linux-x86-64.so.2 libc.so.6 (GLIBC_PRIVATE) => /lib64/libc.so.6 libc.so.6 (GLIBC_2.2.5) => /lib64/libc.so.6 /lib64/librt.so.1: ld-linux-x86-64.so.2 (GLIBC_PRIVATE) => /lib64/ld-linux-x86-64.so.2 libpthread.so.0 (GLIBC_2.2.5) => /lib64/libpthread.so.0 libpthread.so.0 (GLIBC_PRIVATE) => /lib64/libpthread.so.0 libc.so.6 (GLIBC_2.3.2) => /lib64/libc.so.6 libc.so.6 (GLIBC_2.2.5) => /lib64/libc.so.6 libc.so.6 (GLIBC_PRIVATE) => /lib64/libc.so.6 /usr/lib64/libstdc++.so.6: ld-linux-x86-64.so.2 (GLIBC_2.3) => /lib64/ld-linux-x86-64.so.2 libgcc_s.so.1 (GCC_4.2.0) => /lib64/libgcc_s.so.1 libgcc_s.so.1 (GCC_3.3) => /lib64/libgcc_s.so.1 libgcc_s.so.1 (GCC_3.0) => /lib64/libgcc_s.so.1 libc.so.6 (GLIBC_2.3.2) => /lib64/libc.so.6 libc.so.6 (GLIBC_2.4) => /lib64/libc.so.6 libc.so.6 (GLIBC_2.3) => /lib64/libc.so.6 libc.so.6 (GLIBC_2.2.5) => /lib64/libc.so.6 /lib64/libm.so.6: libc.so.6 (GLIBC_2.2.5) => /lib64/libc.so.6 /lib64/libgcc_s.so.1: libc.so.6 (GLIBC_2.4) => /lib64/libc.so.6 libc.so.6 (GLIBC_2.2.5) => /lib64/libc.so.6 /lib64/libc.so.6: ld-linux-x86-64.so.2 (GLIBC_2.3) => /lib64/ld-linux-x86-64.so.2 ld-linux-x86-64.so.2 (GLIBC_PRIVATE) => /lib64/ld-linux-x86-64.so.2 
+7
source share
3 answers

Interestingly, on my OS X system, otool -L lists the python library, but on Linux I have access to it, it seems to be left as an unsatisfied dependency and not specified in the ldd output.

In my case, I know that it was compiled against python 2.7, but checking the strings /.../libboost_python.so does not indicate a mention of 2.7 , and 27 only happens in malformed characters not related to the python version.

So, I came to the conclusion that this is impossible to say without looking for the differences in the API in characters between, say, versions 2.6, 2.7.

Perhaps checking a modified timestamp would narrow it down?

0
source

From: https://github.com/mapnik/mapnik/wiki/InstallationTroubleshooting

"And sometimes even that doesn't work. TIP: pass the -d2 flag to see all the compilation commands sent to gcc by bjam, and you will most likely see something like -I / usr / include / python24 in the compilation arguments, when it should be -I / usr / include / python26 (or an older version of the python headers). If this happens, you can create a complete configuration file (with all possible python information) and pass a link to it on the bjam command line. here: http://www.boost.org/doc/libs/1_42_0/libs/python/doc/building.html#configuring-boost-build , and the following example:

Create a file called 'user-config.jam' (but change the python versions to the appropriate ones):

 import option ; import feature ; if ! gcc in [ feature.values <toolset> ] { using gcc ; } project : default-build <toolset>gcc ; using python : 2.5 # version : /usr/bin/python2.5 # cmd-or-prefix : /usr/include/python2.5/ # includes : /usr/lib/python2.5/config/ # a lib actually symlink : <toolset>gcc # condition ; libraries = --with-python ; 

"

Locate the .jam configuration file. If it exists, check the "using python" command. If it does not exist, run the -d2 flag with bjam to determine the default location of the python being used. This is obviously not a direct method and will just leave you with a likely answer, given the input (but maybe it's good enough).

+3
source

Is this what you are looking for?

 ~/Desktop$ dpkg --list | grep libboost ii libboost-filesystem1.46.1 1.46.1-5ubuntu2 filesystem operations (portable paths, iteration over directories, etc) in C++ ii libboost-program-options1.46.1 1.46.1-5ubuntu2 program options library for C++ ii libboost-python-dev 1.46.1.1 Boost.Python Library development files (default version) ii libboost-python1.46-dev 1.46.1-5ubuntu2 Boost.Python Library development files ii libboost-python1.46.1 1.46.1-5ubuntu2 Boost.Python Library ii libboost-regex1.46.1 1.46.1-5ubuntu2 regular expression library for C++ ii libboost-serialization1.46.1 1.46.1-5ubuntu2 serialization library for C++ ii libboost-signals1.46.1 1.46.1-5ubuntu2 managed signals and slots library for C++ ii libboost-system1.46.1 1.46.1-5ubuntu2 Operating system (eg diagnostics support) library ii libboost-thread1.46.1 1.46.1-5ubuntu2 portable C++ multi-threading ii libboost1.46-dev 1.46.1-5ubuntu2 Boost C++ Libraries development files 

The above works for debian based distributions. I believe the equivalent for Fedora should be:

 rpm -qa | grep libboost 

NTN!

+2
source

All Articles