Coder Social home page Coder Social logo

Comments (12)

stefanseefeld avatar stefanseefeld commented on August 18, 2024

I just tried

$ brew install boost-python --with-python3 

which resulted in a command

./bootstrap.sh --prefix=/usr/local/Cellar/boost-python/1.63.0 --libdir=/usr/local/Cellar/boost-python/1.63.0/lib --with-libraries=python --with-python=python --with-python-root=/System/Library/Frameworks/Python.framework/Versions/2.7
...

I don't know the brew tool and how it translates its own command-line arguments into sub-commands, but the above looks clearly wrong. I suggest you report this to the brew project instead.

from python.

abemammen avatar abemammen commented on August 18, 2024

from python.

stefanseefeld avatar stefanseefeld commented on August 18, 2024

Oh, now I see what you are reporting: while the boost_python library is built twice, once as libboost_python and once as libboost_python3, there is only libboost_numpy, i.e. presumably the python3-version of it should be named libboost_numpy3, rather than having the same name as the python-version. Correct ?

from python.

abemammen avatar abemammen commented on August 18, 2024

from python.

stefanseefeld avatar stefanseefeld commented on August 18, 2024

OK, then I'm not quite sure what you are saying:
After the build, you have libboost_python.dylib and libboost_python3.dylib, as well as libboost_numpy.dylib and libboost_numpy3.dylib. But rather than having libboost_python3.dylib and libboost_numpy3.dylib referencing symbols in libpython3.x.dylib, they are referencing symbols in libpython2.x.dylib ? Is that what you are saying ?

In other words: could you please give a specific test case that should pass but fails ?

from python.

abemammen avatar abemammen commented on August 18, 2024

from python.

stefanseefeld avatar stefanseefeld commented on August 18, 2024

OK, I believe I see the problem. Can you try out this patch:

diff --git a/build/Jamfile b/build/Jamfile
index 313fdab..235c519 100644
--- a/build/Jamfile
+++ b/build/Jamfile
@@ -140,7 +140,7 @@ rule lib_boost_numpy ( is-py3 ? )
             [ cond [ python.numpy ] : <library>/python//python_for_extensions ]
             [ unless [ python.numpy ] : <build>no ]
            <include>$(numpy-include)
-           <library>boost_python
+           [ cond $(is-py3) : <library>boost_python3 : <library>boost_python ]
             <python-debugging>on:<define>BOOST_DEBUG_PYTHON
             [ cond $(is-py3) : <python>$(py3-version) ]
 

(to the libs/python/build/Jamfile file in the boost source tree) ?

from python.

abemammen avatar abemammen commented on August 18, 2024

from python.

abemammen avatar abemammen commented on August 18, 2024

That worked. Can this change be rolled into the repo? I would like to get it from and build with brew. I have a linux version to configure and build as well so would prefer to get this change directly from source.

from python.

stefanseefeld avatar stefanseefeld commented on August 18, 2024

Great, thanks for testing ! Yes, I will roll it into the develop branch (and eventually merge into master). Can you build from the github repo ?

Thanks for raising this and helping me understand !

from python.

abemammen avatar abemammen commented on August 18, 2024

I didn't build from the github repo but instead just grabbed the downloaded version that Brew had initiated via:
https://downloads.sourceforge.net/project/boost/boost/1.63.0/boost_1_63_0.tar.bz2.
But I did that for the Linux version so I can do the same - I just need to know the name of the develop branch.

from python.

stefanseefeld avatar stefanseefeld commented on August 18, 2024

I just pushed the fix to the develop branch in https://github.com/boostorg/python/, so you should be able to build from there.
Thanks again !

from python.

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.