Code Monkey home page Code Monkey logo

Comments (11)

isuruf avatar isuruf commented on June 22, 2024 1

If this is still an issue, this needs to be moved to the python-feedstock.

from boost-feedstock.

ccordoba12 avatar ccordoba12 commented on June 22, 2024

There is a current effort to create a different package for boost-python alone that should solve this problem:

conda-forge/staged-recipes#1887

from boost-feedstock.

isuruf avatar isuruf commented on June 22, 2024

This is unrelated to #1.
From travis-ci log, it seems correct packages are used.

Boost, numpy used are compiled with py27 and the python version is also 2.7.

    blas:            1.1-openblas                  conda-forge
    boost:           1.62.0-py27_0                 conda-forge
    bzip2:           1.0.6-3                       defaults   
    ca-certificates: 2016.9.26-0                   conda-forge
    cmake:           3.6.2-0                       conda-forge
    curl:            7.49.1-2                      conda-forge
    expat:           2.1.0-2                       conda-forge
    icu:             56.1-4                        conda-forge
    jsoncpp:         0.10.6-1                      conda-forge
    libarchive:      3.2.1-2                       conda-forge
    libgfortran:     3.0.0-0                       conda-forge
    libiconv:        1.14-3                        conda-forge
    ncurses:         5.9-10                        conda-forge
    numpy:           1.10.4-py27_blas_openblas_205 conda-forge [blas_openblas]
    openblas:        0.2.19-0                      conda-forge
    openssl:         1.0.2h-3                      conda-forge
    python:          2.7.12-1                      conda-forge
    readline:        6.2-0                         conda-forge
    sqlite:          3.13.0-1                      conda-forge
    tk:              8.5.19-1                      conda-forge
    toolchain:       2.0.0-0                       conda-forge
    xz:              5.2.2-0                       conda-forge
    zlib:            1.2.8-3                       conda-forge

from boost-feedstock.

dolfim avatar dolfim commented on June 22, 2024

Yes, I think it is not related to #1.

Thanks to the PR by @shadowwalkersb at dolfim/staged-recipes#1 I think the problem is the presence of two incompatible libboost libraries in the conda package.

# this seems to work
${PREFIX}/lib/libpython2.7.dylib

vs

# this gives me problems
${PREFIX}/lib/python2.7/config/libpython2.7.dylib

The latter one is actually provided by

import string; from distutils.sysconfig import *; print(get_config_vars('LIBPL'))

Is this a Conda bug? Where should it be reported?

from boost-feedstock.

isuruf avatar isuruf commented on June 22, 2024

${PREFIX}/lib/python2.7/config/libpython2.7.a is provided for embedding python. See here
Since you are not embedding python in this case, you are actually using the static python library in config folder and also linking with the dynamic library when a python session is started and your extension is loaded.

from boost-feedstock.

dolfim avatar dolfim commented on June 22, 2024

Thanks for the link, I was actually looking for a better explanation of LIBPL.

The point is that we have been linking against ${PREFIX}/lib/python2.7/config/libpython2.7.dylib for years without any problem. Also on a clean system I can link that way and everything works.

I put a simple Docker build in a clean Ubuntu environment at dolfim/boost-python-numpy.

The error I get in the Conda build somehow looks like a mismatch of the Python version.

Traceback (most recent call last):
  File "<string>", line 1, in <module>
TypeError: __init__() should return None, not 'NoneType'

from boost-feedstock.

shadowwalkersb avatar shadowwalkersb commented on June 22, 2024

Which Python is used to run the script? Seems like Dockerfile uses the system Python.

from boost-feedstock.

isuruf avatar isuruf commented on June 22, 2024

Conda's python package doesn't provide any ${PREFIX}/lib/python2.7/config/libpython2.7.dylib right? So you might be linking to an incorrect python library.
In my system python, ${PREFIX}/lib/python2.7/config/libpython2.7.so is symlinked to ${PREFIX}/lib/libpython.so which means there is no difference.

from boost-feedstock.

dolfim avatar dolfim commented on June 22, 2024

@shadowwalkersb : yes, the example built with Docker is just system standard system python and boost. It was to illustrate that linking against ${PREFIX}/lib/python2.7/config/libpython2.7.soactually works.

@isuruf : yes Conda doesn't seem to provide ${PREFIX}/lib/python2.7/config/libpython2.7.dylib, but the static lib is there.

I would anyway assume that the two libs could be interchangeable, but this doesn't seem to be the case.

from boost-feedstock.

jakirkham avatar jakirkham commented on June 22, 2024

Is there still an issue that needs to be solve here or is this effectively the same as issue ( #28 )?

from boost-feedstock.

jschueller avatar jschueller commented on June 22, 2024

I hink we can close this as boost.python is split now

from boost-feedstock.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.