Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

Homebrew Mapnik fails install – OSX 10.8.2 #1716

Closed
rdmurphy opened this Issue Feb 9, 2013 · 6 comments

Comments

Projects
None yet
3 participants

rdmurphy commented Feb 9, 2013

I unfortunately know next to nothing on how the insides of Mapnik works, but just in case anyone else is having this issue, I figured I'd put it here.

On 10.8.2, I'm having no luck getting Mapnik to install via Homebrew (using this guide). It's passing all dependency checks (per the guide's recommendation, libtool is definitely installed), and a brew list check confirms that everything appears to be there.

Here's what the verbose Homebrew log spits out: https://gist.github.com/rdmurphy/8a25ad1ea019fafb082f
And here's what the verbose Mapnik install log spits out: https://gist.github.com/rdmurphy/ddead9ac01d3f16d238a

The error in particular is below.

==> python scons/scons.py configure CC="cc" CXX="c++" JOBS=2 PREFIX=/usr/local/Cellar/mapn
==> python scons/scons.py install
        : grammar_(new feature_collection_grammar<iterator_type,feature_type>(ctx,tr)) {}
                       ^
2 errors generated.
scons: *** [src/json/feature_collection_parser.os] Error 1
scons: building terminated because of errors.
Owner

springmeyer commented Feb 10, 2013

Thanks for this report. It looks like homebrew upgraded to the boost release from last week, which is pretty aggressive and this is known to break mapnik: #1658.

Boost 1.53/52 has a number of big changes around the evolution of the new C++11 standard and general refactoring. Personally I think that homebrew should downgrade boost back to 1.51.

Anyway, so the potential ways to fix this are:

  1. You tweak your boost formula to use boost 1.51 (essentially rolling back Homebrew/legacy-homebrew@b39c936#Library/Formula/boost.rb)

  2. You build mapnik from latest master (which has the fix for this as part of #1658)

  3. We release a hotfix for Mapnik 2.1.1 to fix this issue - we should do this, but this is not going to be quick.

@springmeyer springmeyer referenced this issue in Homebrew/legacy-homebrew Feb 10, 2013

Closed

Security fix for boost and boost149 #17524

springmeyer pushed a commit that referenced this issue Feb 10, 2013

Owner

springmeyer commented Feb 10, 2013

Just fixed this problem in the 2.1.x branch (which will be what 2.1.1 will be cut from). This change cf70b99 could be used to patch the homebrew mapnik formula until 2.1.1 is released.

springmeyer pushed a commit that referenced this issue Feb 11, 2013

rclark commented Feb 23, 2013

Maybe this is a separate issue, or an upstream (boost) issue, but I still can't get mapnik correctly installed on OSX 10.8.2. I rolled back Homebrew to Boost 1.51.0, installed it with brew install --build-from-source boost and then brew install mapnik.

Then python -c "import mapnik" throws Fatal Python error: PyThreadState_Get: no current thread

homebrew$ otool -L `brew list boost | grep python-mt.dylib` | grep -i python
/usr/local/Cellar/boost/1.51.0/lib/libboost_python-mt.dylib:
/usr/local/lib/libboost_python-mt.dylib (compatibility version 0.0.0, current version 0.0.0)
/System/Library/Frameworks/Python.framework/Versions/2.7/Python (compatibility version 2.7.0, current version 2.7.2)

Still looks to me like boost is linked to system Python instead of homebrew?

homebrew$ which python
/usr/local/bin/python
Owner

springmeyer commented Feb 24, 2013

Yes the linking is your problem (not the original issue in this ticket). liboost_python must link to the version of python you are using and in this case that is not happening. So sounds like a lack of proper link flags in the boost build and nothing to do with Mapnik. You can fix by using install_name_tool to move the link from the system python to the homebrew python.

Owner

springmeyer commented Mar 8, 2013

for those following, this should work: https://gist.github.com/springmeyer/5113593

@pwnall pwnall referenced this issue in Homebrew/legacy-homebrew Mar 8, 2013

Closed

mapnik - Failed to build on 10.8.2 #18092

Owner

springmeyer commented Mar 11, 2013

closing, patch has been applied in homebrew (Homebrew/legacy-homebrew@b507fa8)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment