Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Boost.Python not found: location differs per distribution #4788

Closed
gerion0 opened this issue Jan 16, 2019 · 5 comments
Closed

Boost.Python not found: location differs per distribution #4788

gerion0 opened this issue Jan 16, 2019 · 5 comments

Comments

@gerion0
Copy link
Contributor

gerion0 commented Jan 16, 2019

I have the problem that Boost.Python is not found with this line:

boost_dep = dependency('boost', modules : ['python3'])

This results in -lboost_python3 and the search of libboost_python3.so, that is not part of my system. I use gentoo. My Boost.Python is installed as:

lrwxrwxrwx 1 root root   22 10. Jan 12:59 /usr/lib64/libboost_python-2.7-mt.so -> libboost_python-2.7.so
lrwxrwxrwx 1 root root   29 10. Jan 12:59 /usr/lib64/libboost_python-2.7.so -> libboost_python-2.7.so.1.65.0
-rwxr-xr-x 1 root root 284K 10. Jan 12:59 /usr/lib64/libboost_python-2.7.so.1.65.0
lrwxrwxrwx 1 root root   22 10. Jan 12:59 /usr/lib64/libboost_python-3.5-mt.so -> libboost_python-3.5.so
lrwxrwxrwx 1 root root   29 10. Jan 12:59 /usr/lib64/libboost_python-3.5.so -> libboost_python-3.5.so.1.65.0
-rwxr-xr-x 1 root root 272K 10. Jan 12:59 /usr/lib64/libboost_python-3.5.so.1.65.0
lrwxrwxrwx 1 root root   22 10. Jan 12:59 /usr/lib64/libboost_python-3.6-mt.so -> libboost_python-3.6.so
lrwxrwxrwx 1 root root   29 10. Jan 12:59 /usr/lib64/libboost_python-3.6.so -> libboost_python-3.6.so.1.65.0
-rwxr-xr-x 1 root root 272K 10. Jan 12:59 /usr/lib64/libboost_python-3.6.so.1.65.0

A symlink tolibboost_python3.so fixes the problem of course. Writing ['python-3.6'] does not since python3 is hardcoded.

I have filed a bug in Gentoo, too (resolved as invalid). Appearently this is handled in different ways within several distributions:

  • Debian/Ubuntu (versions differ but the pattern is equal)
lrwxrwxrwx 1 root root   22 Nov 12  2016 /usr/lib/x86_64-linux-gnu/libboost_python.a -> libboost_python-py27.a
-rw-r--r-- 1 root root 641K Nov 12  2016 /usr/lib/x86_64-linux-gnu/libboost_python-py27.a
lrwxrwxrwx 1 root root   30 Nov 12  2016 /usr/lib/x86_64-linux-gnu/libboost_python-py27.so -> libboost_python-py27.so.1.62.0
-rw-r--r-- 1 root root 296K Nov 12  2016 /usr/lib/x86_64-linux-gnu/libboost_python-py27.so.1.62.0
-rw-r--r-- 1 root root 633K Nov 12  2016 /usr/lib/x86_64-linux-gnu/libboost_python-py35.a
lrwxrwxrwx 1 root root   30 Nov 12  2016 /usr/lib/x86_64-linux-gnu/libboost_python-py35.so -> libboost_python-py35.so.1.62.0
-rw-r--r-- 1 root root 292K Nov 12  2016 /usr/lib/x86_64-linux-gnu/libboost_python-py35.so.1.62.0
lrwxrwxrwx 1 root root   23 Nov 12  2016 /usr/lib/x86_64-linux-gnu/libboost_python.so -> libboost_python-py27.so
  • OpenSuse
-rwxr-xr-x 1 root root 818K  4. Okt 19:22 /usr/lib64/libboost_python-py2_7.so.1.68.0
-rwxr-xr-x 1 root root 802K  4. Okt 19:22 /usr/lib64/libboost_python-py3.so.1.68.0

Edit: Remove the self created symlink to libboost_python3.so on Gentoo. This is my workaround fix, but not from the distribution.

@jtojnar
Copy link
Contributor

jtojnar commented Jan 17, 2019

And yet another on NixOS:

lrwxrwxrwx 1 root root   27 Jan  1  1970 /nix/store/lzq2p4xwji0vifmf58zfhmvnhh7pi1g8-boost-1.67_0/lib/libboost_python37.so -> libboost_python37.so.1.67.0
-r-xr-xr-x 1 root root 336K Jan  1  1970 /nix/store/lzq2p4xwji0vifmf58zfhmvnhh7pi1g8-boost-1.67_0/lib/libboost_python37.so.1.67.0

@gerion0
Copy link
Contributor Author

gerion0 commented Oct 22, 2019

The naming pattern for Gentoo has changed. Now it is (seem similar to Debian/Ubuntu):

% ls -lh /usr/lib64/libboost_python*
lrwxrwxrwx 1 root root   20  1. Jul 15:40 /usr/lib64/libboost_python27-mt.so -> libboost_python27.so
lrwxrwxrwx 1 root root   27  1. Jul 15:40 /usr/lib64/libboost_python27.so -> libboost_python27.so.1.70.0
lrwxrwxrwx 1 root root   27  1. Jul 15:40 /usr/lib64/libboost_python27.so.1 -> libboost_python27.so.1.70.0
lrwxrwxrwx 1 root root   27  1. Jul 15:40 /usr/lib64/libboost_python27.so.1.70 -> libboost_python27.so.1.70.0
-rwxr-xr-x 1 root root 350K  1. Jul 15:40 /usr/lib64/libboost_python27.so.1.70.0
lrwxrwxrwx 1 root root   20  1. Jul 15:40 /usr/lib64/libboost_python36-mt.so -> libboost_python36.so
lrwxrwxrwx 1 root root   27  1. Jul 15:40 /usr/lib64/libboost_python36.so -> libboost_python36.so.1.70.0
lrwxrwxrwx 1 root root   27  1. Jul 15:40 /usr/lib64/libboost_python36.so.1 -> libboost_python36.so.1.70.0
lrwxrwxrwx 1 root root   27  1. Jul 15:40 /usr/lib64/libboost_python36.so.1.70 -> libboost_python36.so.1.70.0
-rwxr-xr-x 1 root root 345K  1. Jul 15:40 /usr/lib64/libboost_python36.so.1.70.0
lrwxrwxrwx 1 root root   20  1. Jul 15:40 /usr/lib64/libboost_python37-mt.so -> libboost_python37.so
lrwxrwxrwx 1 root root   27  1. Jul 15:40 /usr/lib64/libboost_python37.so -> libboost_python37.so.1.70.0
lrwxrwxrwx 1 root root   27  1. Jul 15:40 /usr/lib64/libboost_python37.so.1 -> libboost_python37.so.1.70.0
lrwxrwxrwx 1 root root   27  1. Jul 15:40 /usr/lib64/libboost_python37.so.1.70 -> libboost_python37.so.1.70.0
-rwxr-xr-x 1 root root 345K  1. Jul 15:40 /usr/lib64/libboost_python37.so.1.70.0

@DimStar77
Copy link
Contributor

the openSUSE variant given are incomplete - the full overview is:

lzeus:~ # ls -la /usr/lib64/libboost_python*
lrwxrwxrwx 1 root root     31 Dec 24 14:22 /usr/lib64/libboost_python-py2_7.so -> libboost_python-py2_7.so.1.71.0
-rwxr-xr-x 1 root root 556744 Dec 24 14:23 /usr/lib64/libboost_python-py2_7.so.1.71.0
lrwxrwxrwx 1 root root     29 Dec 24 14:20 /usr/lib64/libboost_python-py3.so -> libboost_python-py3.so.1.71.0
-rwxr-xr-x 1 root root 552616 Dec 24 14:23 /usr/lib64/libboost_python-py3.so.1.71.0
lrwxrwxrwx 1 root root     24 Dec 24 14:22 /usr/lib64/libboost_python.so -> libboost_python-py2_7.so
lrwxrwxrwx 1 root root     22 Dec 24 14:22 /usr/lib64/libboost_python3.so -> libboost_python-py3.so

(there are _python and _python3 symlinks in place)

@DimStar77
Copy link
Contributor

DimStar77 commented Jan 15, 2020

meson-testsuite-boost.patch.txt

on openSUSE, I need this patch to get the test suite passed due to this issue (using boost 1.71)

@mensinda
Copy link
Member

mensinda commented Apr 1, 2020

This should now be fixed with #6887, closing. Feel free to reopen if there are still issues on some distros.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants