Uploaded image for project: 'Data Management'
  1. Data Management
  2. DM-7008

Check boost.python building with Python 3

    XMLWordPrintable

    Details

    • Type: Story
    • Status: Done
    • Resolution: Done
    • Fix Version/s: None
    • Component/s: boost
    • Labels:
      None

      Description

      We may want to disable boost.python in the build. There are hints that there are problems with python3.5.

        Attachments

          Activity

          Hide
          tjenness Tim Jenness added a comment -

          Boost.python was failing to build because it could not find the python include files (Boost did not seem to understand the python3.5m scheme). For now on the branch boost.python has been disabled in the build.

          Show
          tjenness Tim Jenness added a comment - Boost.python was failing to build because it could not find the python include files (Boost did not seem to understand the python3.5m scheme). For now on the branch boost.python has been disabled in the build.
          Hide
          tjenness Tim Jenness added a comment -

          Turns out that Galsim requires boost.python...

          Show
          tjenness Tim Jenness added a comment - Turns out that Galsim requires boost.python...
          Hide
          tjenness Tim Jenness added a comment -

          I have looked further into this issue and it seems that boost configuration scripts do not understand PEP-3149 and builds the include path with:

          includes ?= $(prefix)/include/python$(version) ;
          

          This does not take into account architecture modifiers such as "m" indicating that Python was built with its internal malloc. The include path on Python 3 from Anaconda is include/python3.5m and this prevents the build of boost.python.

          The fix is to modify the generated project-config.jam file to add the include path explicitly. The using python directive takes a 3rd argument of an explicit include path that is not included by default. I now modify the jam file in the eupspkg.cfg.sh file after the configuration step to add the include path that I obtain from python itself. The change only triggers for python 3.

          Show
          tjenness Tim Jenness added a comment - I have looked further into this issue and it seems that boost configuration scripts do not understand PEP-3149 and builds the include path with: includes ?= $(prefix)/include/python$(version) ; This does not take into account architecture modifiers such as "m" indicating that Python was built with its internal malloc. The include path on Python 3 from Anaconda is include/python3.5m and this prevents the build of boost.python. The fix is to modify the generated project-config.jam file to add the include path explicitly. The using python directive takes a 3rd argument of an explicit include path that is not included by default. I now modify the jam file in the eupspkg.cfg.sh file after the configuration step to add the include path that I obtain from python itself. The change only triggers for python 3.
          Hide
          tjenness Tim Jenness added a comment -

          Please review. Currently I use perl to do the inplace fix up of the file. I don't do anything on python 2.

          Show
          tjenness Tim Jenness added a comment - Please review. Currently I use perl to do the inplace fix up of the file. I don't do anything on python 2.
          Hide
          ktl Kian-Tat Lim added a comment -

          One suggested change, otherwise OK.

          Show
          ktl Kian-Tat Lim added a comment - One suggested change, otherwise OK.
          Hide
          tjenness Tim Jenness added a comment -

          Suggested changes applied and now merged.

          Show
          tjenness Tim Jenness added a comment - Suggested changes applied and now merged.

            People

            Assignee:
            tjenness Tim Jenness
            Reporter:
            tjenness Tim Jenness
            Reviewers:
            Kian-Tat Lim
            Watchers:
            J Matt Peterson [X] (Inactive), Kian-Tat Lim, Paul Price, Tim Jenness
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:

                Jenkins

                No builds found.