New Ticket     Tickets     Wiki     Browse Source     Timeline     Roadmap     Ticket Reports     Search

Ticket #17405 (closed update: fixed)

Opened 4 years ago

Last modified 4 years ago

different boost update

Reported by: andrew@… Owned by: sanchom@…
Priority: Normal Milestone:
Component: ports Version: 1.6.0
Keywords: Cc: mcalhoun@…
Port: boost

Description (last modified by macsforever2000@…) (diff)

Hi - I have a slightly different patch to boost 1.35.0 to 1.37.0. Mine builds openmpi variants, python 2.6, etc. This is a different (more complete) patch than ticket #17338.

Attachments

Portfile.patch (7.5 KB) - added by andrew@… 4 years ago.
1.37.0 Revision 3

Change History

comment:1 Changed 4 years ago by macsforever2000@…

  • Owner changed from macports-tickets@… to sanchom@…
  • Keywords boost removed
  • Type changed from defect to enhancement

Assigning to maintainer.

comment:2 Changed 4 years ago by macsforever2000@…

  • Description modified (diff)

comment:3 Changed 4 years ago by andrew@…

Yay! Fun! The mpi module now loads if the python26 variant is used! I'm so happy I could just cry! :-) Not sure about 2.5, though... but here's to hoping...

comment:4 Changed 4 years ago by andrew@…

Updating the patch to 1.37 revision 2 to change the python mpi.so module. This puts it in

"${prefix}/Library/Frameworks/Python.framework/Versions/${pyversion}/lib/python${pyversion}/site-packages/boost/"

so it can be loaded with

import boost.mpi as mpi

in order to avoid namespace conflicts.

comment:5 Changed 4 years ago by andrew@…

Okay, okay - I'm really sorry to be constantly updating this - but I'm a python newbie and (sheepish grin) I forgot to add the init.py file.

Now the following program works without damn import errors:

#/usr/bin/env python2.6

import boost.mpi as mpi # OR 'from boost import mpi' (both work)

print "I am process %d of %d." % (mpi.rank, mpi.size)

This is Revision 3. Sorry. I hope this is the last update.

Changed 4 years ago by andrew@…

1.37.0 Revision 3

comment:6 Changed 4 years ago by andrew@…

Even better - the whole boost-python interface appears to work.

Makefile :

YFRM = /opt/local/Library/Frameworks/Python.framework/Versions/2.6
PYINC = -I$(PYFRM)/include/python2.6 -L/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/config 
MACPT = -I/opt/local/include -L/opt/local/lib
LIBS = -dynamiclib -lboost_python-xgcc40-mt -lpython2.6

hello.so : hello.cpp
        $(CXX) $(MACPT) $(PYINC) $? $(LIBS) -o $@

.PHONY : test clean

test : test.py
        ./test.py

clean :
        rm -f hello.so

hello.cpp :

char const* greet()
{
   return "hello, world";
}

#include <boost/python.hpp>

BOOST_PYTHON_MODULE(hello)
{
    using namespace boost::python;
    def("greet", greet);
}

test.py :

#!/usr/bin/env python2.6

import sys

sys.path.append('.')

import hello

print hello.greet()

comment:7 Changed 4 years ago by mcalhoun@…

  • Cc mcalhoun@… added

Cc Me!

comment:8 Changed 4 years ago by mcalhoun@…

boost was upgraded in r43281. Issues remain with python25 (but not python26) remain (see #16378). There are still no variants for other compilers.

Perhaps this ticket should be closed. The outstanding issues can then get their own tickets.

comment:9 Changed 4 years ago by sanchom@…

Agree. We should close this. If there are issues with the r43281, we should open new tickets to patch against that revision.

comment:10 Changed 4 years ago by mcalhoun@…

  • Status changed from new to closed
  • Resolution set to fixed

comment:11 Changed 4 years ago by jmr@…

  • Type changed from enhancement to update

comment:12 Changed 4 years ago by anonymous

  • Milestone Port Updates deleted

Milestone Port Updates deleted

Note: See TracTickets for help on using tickets.