[Wheel-builders] Problem with finding python library via CMake

Clarkson, Matt m.clarkson at ucl.ac.uk
Wed Jan 23 09:56:11 EST 2019


Thanks Matthew,
Understood. Good job I asked before I started hacking around too much! 
M

-----Original Message-----
From: Matthew Brett <matthew.brett at gmail.com>
Date: Wednesday, 23 January 2019 at 14:50
To: "Clarkson, Matt" <m.clarkson at ucl.ac.uk>
Cc: "wheel-builders at python.org" <wheel-builders at python.org>
Subject: Re: [Wheel-builders] Problem with finding python library via CMake

    Hi,
    
    On Wed, Jan 23, 2019 at 2:41 PM Clarkson, Matt <m.clarkson at ucl.ac.uk> wrote:
    >
    > Hi there,
    >
    > If someone could help me, I would be eternally grateful.
    >
    > I'm currently creating:
    > https://github.com/MattClarkson/CMakeCatchTemplate
    >
    > as a template project, from which others can generate their own C++ CMake, Catch, CTest project, and I'm providing support for building Boost.Python, PyBind11, and hence wheels, via Appveyor, and Travis, via manylinux.
    >
    > I'm currently on Issue #45, and branch: 45-pypi, and the Travis log looks like it's working:
    > https://travis-ci.com/MattClarkson/CMakeCatchTemplate/builds/98215507
    >
    > However, if you look at a Linux build, for example:
    > https://travis-ci.com/MattClarkson/CMakeCatchTemplate/jobs/172197399
    >
    > and line 599, we see that CMake is finding the right python executable, and the right python include dir, but picking up /usr/lib64/libpython2.4 instead of the required version 3.5.5. This means, when I pip install on another independent machine, downloading the wheel from pypi, I get a library not found error. I should say at this point, that I'm actually using the opencv-python docker image provided here: quay.io/skvark/manylinux, but this is essentially the same as manylinux, with these additions: https://github.com/skvark/opencv-python/tree/master/docker, but from a python perspective, its the same.
    >
    > So, my question (as I currently know almost nothing about docker):
    >
    > a) Does the docker image have all python libraries installed? If so, where are they? Is it worth trying to coax cmake 3.9 to find the right one? At the moment I do not yet know (and have limited time today), if I can run or log into the docker container to find the libraries.
    >
    > b) Or do we just create our own docker image, with a more up to date version of cmake?
    >
    > If you have any advice, I'd be grateful, as I'm new to wheel building.
    
    I think CMake is particularly prone to requiring the libpython
    library, which is deliberately not part of the Manylinux spec.  See
    the discussion here:
    
    https://www.python.org/dev/peps/pep-0513/#libpythonx-y-so-1
    
    Cheers,
    
    Matthew
    



More information about the Wheel-builders mailing list