Opened 15 years ago

Closed 15 years ago

Last modified 15 years ago

#17405 closed update (fixed)

different boost update

Reported by: adfernandes (Andrew Fernandes) Owned by: sanchom (Sancho McCann)
Priority: Normal Milestone:
Component: ports Version: 1.6.0
Keywords: Cc: MarcusCalhoun-Lopez (Marcus Calhoun-Lopez)
Port: boost

Description (last modified by mf2k (Frank Schima))

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 (1)

Portfile.patch (7.5 KB) - added by adfernandes (Andrew Fernandes) 15 years ago.
1.37.0 Revision 3

Download all attachments as: .zip

Change History (13)

comment:1 Changed 15 years ago by mf2k (Frank Schima)

Keywords: boost removed
Owner: changed from macports-tickets@… to sanchom@…
Type: defectenhancement

Assigning to maintainer.

comment:2 Changed 15 years ago by mf2k (Frank Schima)

Description: modified (diff)

comment:3 Changed 15 years ago by adfernandes (Andrew Fernandes)

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 15 years ago by adfernandes (Andrew Fernandes)

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 15 years ago by adfernandes (Andrew Fernandes)

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 15 years ago by adfernandes (Andrew Fernandes)

Attachment: Portfile.patch added

1.37.0 Revision 3

comment:6 Changed 15 years ago by adfernandes (Andrew Fernandes)

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 15 years ago by MarcusCalhoun-Lopez (Marcus Calhoun-Lopez)

Cc: mcalhoun@… added

Cc Me!

comment:8 Changed 15 years ago by MarcusCalhoun-Lopez (Marcus Calhoun-Lopez)

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 15 years ago by sanchom (Sancho McCann)

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 15 years ago by MarcusCalhoun-Lopez (Marcus Calhoun-Lopez)

Resolution: fixed
Status: newclosed

comment:11 Changed 15 years ago by jmroot (Joshua Root)

Type: enhancementupdate

comment:12 Changed 15 years ago by (none)

Milestone: Port Updates

Milestone Port Updates deleted

Note: See TracTickets for help on using tickets.