Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

gem install on Ubuntu 12.04 failing #22

Closed
alibby opened this Issue · 6 comments

4 participants

@alibby

alibby@tilea:~/mapnik$ gem install ruby_mapnik
Building native extensions. This could take a while...
ERROR: Error installing ruby_mapnik:
ERROR: Failed to build gem native extension.

    /home/alibby/.rvm/rubies/ruby-1.9.3-p194/bin/ruby extconf.rb

checking for main() in -lrice... yes
creating Makefile

make
compiling _mapnik_map.rb.cpp
cc1plus: warning: command line option ‘-Wdeclaration-after-statement’ is valid for C/ObjC but not for C++ [enabled by default]
cc1plus: warning: command line option ‘-Wimplicit-function-declaration’ is valid for C/ObjC but not for C++ [enabled by default]
compiling _mapnik_coord.rb.cpp
cc1plus: warning: command line option ‘-Wdeclaration-after-statement’ is valid for C/ObjC but not for C++ [enabled by default]
cc1plus: warning: command line option ‘-Wimplicit-function-declaration’ is valid for C/ObjC but not for C++ [enabled by default]
compiling _mapnik_font_engine.rb.cpp
cc1plus: warning: command line option ‘-Wdeclaration-after-statement’ is valid for C/ObjC but not for C++ [enabled by default]
cc1plus: warning: command line option ‘-Wimplicit-function-declaration’ is valid for C/ObjC but not for C++ [enabled by default]
compiling _mapnik_style.rb.cpp
cc1plus: warning: command line option ‘-Wdeclaration-after-statement’ is valid for C/ObjC but not for C++ [enabled by default]
cc1plus: warning: command line option ‘-Wimplicit-function-declaration’ is valid for C/ObjC but not for C++ [enabled by default]
compiling _mapnik_shield_symbolizer.rb.cpp
cc1plus: warning: command line option ‘-Wdeclaration-after-statement’ is valid for C/ObjC but not for C++ [enabled by default]
cc1plus: warning: command line option ‘-Wimplicit-function-declaration’ is valid for C/ObjC but not for C++ [enabled by default]
_mapnik_shield_symbolizer.rb.cpp: In function ‘Rice::Object {anonymous}::get_shield_displacement(const mapnik::shield_symbolizer&)’:
_mapnik_shield_symbolizer.rb.cpp:39:18: error: ‘mapnik::position’ has no member named ‘first’
_mapnik_shield_symbolizer.rb.cpp:40:18: error: ‘mapnik::position’ has no member named ‘second’
make: *** [_mapnik_shield_symbolizer.rb.o] Error 1

Gem files will remain installed in /home/alibby/.rvm/gems/ruby-1.9.3-p194/gems/ruby_mapnik-0.1.4 for inspection.
Results logged to /home/alibby/.rvm/gems/ruby-1.9.3-p194/gems/ruby_mapnik-0.1.4/ext/ruby_mapnik/gem_make.out

@dboze

I have the same issue on 12.04, except my build fails in the next file

compiling ../../../../ext/ruby_mapnik/_mapnik_markers_symbolizer.rb.cpp
../../../../ext/ruby_mapnik/_mapnik_markers_symbolizer.rb.cpp: In function ‘const double {anonymous}::get_markers_opacity(const mapnik::markers_symbolizer&)’:
../../../../ext/ruby_mapnik/_mapnik_markers_symbolizer.rb.cpp:42:26: error: cannot convert ‘boost::optional’ to ‘const double’ in return
../../../../ext/ruby_mapnik/_mapnik_markers_symbolizer.rb.cpp:43:3: warning: control reaches end of non-void function [-Wreturn-type]
make: *** [_mapnik_markers_symbolizer.rb.o] Error 1
rake aborted!
Command failed with status (2): [make...]

Building against 2.1.0 nightly, as 2.0.x was causing even more issues.

@springmeyer
Owner

hey guys, sorry about the trouble. Master of this repo tracks master mapnik, but often falls behind as mapnik core is moving really fast right now.

Mapnik master will be released in a few weeks as Mapnik 2.1.0. At that time I will make sure to sync Ruby-Mapnik so compiles work. Thanks for the patience. In the meantime the best I can offer is to try Mapnik 2.0.1 with the ruby-mapnik tag of 0.1.2 as I mention at #20 (comment)

@dboze

That's great news! I was able to get the gem to build against 2.0.1 by pulling your repo, rewinding to 0.1.2, and applying the patch beanieboi provided in the above link. I suggest building Mapnik 2.0.x from source; ppa:mapnik/nightly-2.0 is built against libboost1.46, and some functions that require libboost1.47+ will not work (namely WKT support as far as I can tell).

Thank you! This issue is resolved in my opinion.

@springmeyer
Owner

@dboze - great you figured it out despite the potholes :) Also, we just tagged Mapnik 2.0.2 yesterday, please update to that - should compile cleanly as 2.0.1 - if not let me know. RE: boost for packages - they should be using boost 1.49 from our mapnik PPA - could you file an issue at https://github.com/mapnik/mapnik-packaging/issues requesting we look into fixing that? Thanks!

@elliotlaster

Thanks, Dane!

@springmeyer
Owner

@elliotlaster cheers :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.