The boost libraries shipped in Ubuntu 18.04 (bionic) use a different naming scheme for the boost python libraries: - https://packages.ubuntu.com/bionic/amd64/libboost-python1.65-dev/filelist - https://packages.ubuntu.com/bionic/amd64/libboost-numpy1.65-dev/filelist It looks like the python libraries are built with the system default python interpreter when 18.04 got released, not the newer version you are installing. On Wed, Feb 17, 2021, 10:05 Roy de Bokx via Boost-users < boost-users@lists.boost.org> wrote:
Hi there,
I've been trying to get GP-GOMEA running in a dockerized environment https://github.com/marcovirgolin/GP-GOMEA/issues/2, which is a project that is built using Boost.
As part of the build process, the source code is compiled by the g++ compiler, using the flag -lboost_numpy37, which fails because (it seems) numpy cannot be found.
I've reported this also as an issue also in the boost repository https://github.com/boostorg/boost/issues/462, but mclow advised me to send this to the boost-users mailinglist too.
I've create the following Dockerfile as a minimal test case, which runs into the same problem. I'm a bit of a noob when it comes to Boost and numpy, but from what I found so far on the web, this should work (but it doesn't)
FROM ubuntu:20.04
ENV DEBIAN_FRONTEND noninteractive
RUN apt-get update && apt-get upgrade -y && apt-get clean RUN apt-get install -y curl python3.7 python3-dev python3-distutils python3-numpy
# Install latest boost version RUN apt-get -y install wget g++ RUN wget https://dl.bintray.com/boostorg/release/1.75.0/source/boost_1_75_0.tar.bz2 && \ tar --bzip2 -xf boost_1_75_0.tar.bz2 && \ cd boost_1_75_0 && \ # this will generate ./b2 ./bootstrap.sh --prefix=/usr/local && \ ./b2 --with=all install && \ sh -c 'echo "/usr/local/lib" >> /etc/ld.so.conf.d/local.conf' && \ ldconfig
# Check numpy installation RUN find / -name "numpy.hpp" RUN find / -name "libboost_numpy37.so" RUN find / -name "libboost_numpy3.so" RUN find / -name "libboost_numpy.so" RUN ld -lboost_numpy37 --verbose
This eventually results in the following error: The command '/bin/sh -c ld -lboost_numpy37 --verbose' returned a non-zero code: 1, because it could not find any libboost_numpy37.so or libboost_numpy37.o file.
The full logs are attached in the GH issue linked above. Did anyone encounter something similar, or does anyone have an idea what could cause this?
Any help is much appreciated!
-Roy _______________________________________________ Boost-users mailing list Boost-users@lists.boost.org https://lists.boost.org/mailman/listinfo.cgi/boost-users