Opened 11 years ago

Closed 11 years ago

#41568 closed defect (fixed)

boost @1.55.0: patch phase fails with python3x variants

Reported by: tamyrvoll@… Owned by: macports-tickets@…
Priority: Normal Milestone:
Component: ports Version: 2.2.1
Keywords: Cc: ryandesign (Ryan Carsten Schmidt), mamoll (Mark Moll), NeilGirdhar (Neil), samuelandjw, cooljeanius (Eric Gallager)
Port: boost

Description

Upgrading boost 1_54_0 to 1_55_0 fails. I have attached the log-file.

Specifics about my system that may be of relevance:

  • My Macports installation resides on a separate volume with a link from /opt/local
  • I have "sandbox_enable no" in my macports.conf
  • Current boost is installed as "boost @1.54.0_0+no_single+no_static+python33"

Attachments (3)

main.log (11.4 KB) - added by tamyrvoll@… 11 years ago.
patch-boost.diff (3.7 KB) - added by mamoll (Mark Moll) 11 years ago.
main.log.bz2 (281.7 KB) - added by ryandesign (Ryan Carsten Schmidt) 11 years ago.

Download all attachments as: .zip

Change History (18)

Changed 11 years ago by tamyrvoll@…

Attachment: main.log added

comment:1 Changed 11 years ago by ryandesign (Ryan Carsten Schmidt)

Owner: changed from macports-tickets@… to ryandesign@…
Status: newassigned
Summary: Upgrade to boost 1.55.0 failsboost @1.55.0: patch phase fails with python3x variants

Oops, I didn't test the python3x variants.

comment:2 Changed 11 years ago by ryandesign (Ryan Carsten Schmidt)

Cc: ryandesign@… mmoll@… added
Owner: changed from ryandesign@… to macports-tickets@…
Status: assignednew

I tried removing the patch, and when installing with +python33 +openmpi, the build succeeded, but destroot failed with:

Error: org.macports.destroot for port boost returned: error renaming "/opt/local/var/macports/build/_Users_rschmidt_macports_dports_devel_boost/boost/work/destroot/opt/local/lib/mpi.so": no such file or directory

so I guess the patch is still needed, but I don't know how to update it for boost 1.55.0. Mark, do you? You originally added the patch in #39193.

comment:3 in reply to:  2 Changed 11 years ago by mamoll (Mark Moll)

That's weird. If I remove the patch, destroy and install work fine for me (on Mavericks with latest Xcode). Does mpi.so exist anywhere in your build directory?

I did notice some small unrelated problem. In python3 the import statement has changed. The following one-line change is necessary for boost+python3X:

--- libs/mpi/build/__init__.py.orig	2013-11-27 12:52:37.000000000 -0600
+++ libs/mpi/build/__init__.py	2013-11-27 12:52:55.000000000 -0600
@@ -6,5 +6,5 @@
     import mpi
     sys.setdlopenflags(flags)
 else:
-    import mpi
+    from . import mpi
Version 0, edited 11 years ago by mamoll (Mark Moll) (next)

comment:4 Changed 11 years ago by todmorrison (Tod Morrison)

Cc: todmorrison@… added

Cc Me!

comment:5 Changed 11 years ago by josephsacco

SYSTEM: MacBookPro OS X 10.9

The python3 patch, patch-boost-python3.diff, attempts to patch two files:

  • libs/mpi/src/python/datatypes.cpp
  • libs/mpi/src/python/py_environment.cpp

The patches for the second file, are unnecessary [see the source code]. I removed the unnecessary patches and built the python33 variant:

boost @1.55.0_0+no_single+no_static+python33 (active)

-Joseph

Last edited 11 years ago by josephsacco (previous) (diff)

comment:6 Changed 11 years ago by todmorrison (Tod Morrison)

Cc: todmorrison@… removed

Cc Me!

comment:7 Changed 11 years ago by NeilGirdhar (Neil)

Cc: mistersheik@… added

Cc Me!

comment:8 Changed 11 years ago by josephsacco

SYSTEM: dual G4 PowerMac OS X 10.5.8

Boost 1.55 builds on a PPC-based PowerMac using macports-gcc-4.8

  • boost @1.55.0_0+no_single+no_static+python27
  • boost @1.55.0_0+no_single+no_static+python33 (active)

To do so, edit ./tools/build/v2/tools/darwin.jam to eliminate the "-arch" option, which is not supported by the MacPorts compiler. The python33 variant requires the changes to patch-boost-python3.diff specified in comment #5.

-Joseph

Changed 11 years ago by mamoll (Mark Moll)

Attachment: patch-boost.diff added

comment:9 Changed 11 years ago by mamoll (Mark Moll)

drjesacco, can you create a patch for ./tools/build/v2/tools/darwin.jam? For which compilers exactly is this patch necessary? I have summarized the required changes to the Boost Portfile and patches in patch-boost.diff.

ryandesign, can you provide any more information about your setup? I can't replicate your problem.

comment:10 Changed 11 years ago by samuelandjw

Cc: samuelandjw@… added

Cc Me!

comment:11 Changed 11 years ago by mamoll (Mark Moll)

I have committed my patch in r114354. ryandesign, can you confirm this fixes things for you?

comment:12 Changed 11 years ago by ryandesign (Ryan Carsten Schmidt)

"sudo port install boost +python33 +openmpi" fails during destroot with "error renaming "/opt/local/var/macports/build/_Users_rschmidt_macports_dports_devel_boost/boost/work/destroot/opt/local/lib/mpi.so": no such file or directory". I'll attach the main.log.

Changed 11 years ago by ryandesign (Ryan Carsten Schmidt)

Attachment: main.log.bz2 added

comment:13 Changed 11 years ago by mamoll (Mark Moll)

One problem seemed to be that with the python3X variants, the correct python interpreter wasn't used. It would fall back on the "python" interpreter in the path, which in my case is python3.3, but ryandesign's case corresponds to python2.7. I am not sure if that completely fixes the problem, but it was definitely a bug. Fixed in r114377.

comment:14 Changed 11 years ago by cooljeanius (Eric Gallager)

Cc: egall@… added

Cc Me!

comment:15 Changed 11 years ago by ryandesign (Ryan Carsten Schmidt)

Resolution: fixed
Status: newclosed

Good catch. Works for me!

Note: See TracTickets for help on using tickets.