mapnik/Ruby-Mapnik — Issue #7: gem install fails on ubuntu
Author: springmeyer
Created: 2011-10-09 04:28:27+00:00
State: open

```sh
$ gem-ruby-1.9.2-p290 install ruby_mapnik
Fetching: rice-1.4.2.gem (100%)
Building native extensions. This could take a while...
Fetching: ruby_mapnik-0.1.gem (100%)
Building native extensions. This could take a while...
ERROR: Error installing ruby_mapnik:
ERROR: Failed to build gem native extension.

/home/mapnik/.rvm/rubies/ruby-1.9.2-p290/bin/ruby extconf.rb
checking for main() in -lrice... yes
creating Makefile

make
g++ -I. -I/home/mapnik/.rvm/rubies/ruby-1.9.2-p290/include/ruby-1.9.1/x86_64-linux -I/home/mapnik/.rvm/rubies/ruby-1.9.2-p290/include/ruby-1.9.1/ruby/backward -I/home/mapnik/.rvm/rubies/ruby-1.9.2-p290/include/ruby-1.9.1 -I. -I/home/mapnik/.rvm/gems/ruby-1.9.2-p290/gems/rice-1.4.2/ruby/lib/include -fPIC -O3 -ggdb -Wextra -Wno-unused-parameter -Wno-parentheses -Wpointer-arith -Wwrite-strings -Wno-missing-field-initializers -Wno-long-long -fPIC-I/usr/include -I/usr/include -I/usr/include/freetype2 -I/usr/include/libxml2 -I/usr/include/postgresql -I/usr/include/gdal -DHAVE_JPEG -DBOOST_REGEX_HAS_ICU -ansi -Wall -pthread -ftemplate-depth-300 -DLINUX -DBOOST_SPIRIT_THREADSAFE -DMAPNIK_THREADSAFE -O3 -finline-functions -Wno-inline -DNDEBUG -DHAVE_CAIRO -DLIBTOOL_SUPPORTS_ADVISE -DHAVE_LIBXML2 -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -I/usr/include/libpng12 -I/usr/include/cairomm-1.0 -I/usr/lib/cairomm-1.0/include -I/usr/include/cairo -I/usr/include/sigc++-2.0 -I/usr/lib/sigc++-2.0/include -I/usr/include/pixman-1 -Wall -g -o ruby_mapnik.o -c ruby_mapnik.cpp
cc1plus: error: unrecognized command line option "-fPIC-I/usr/include"
```