Question

Trying to compile Mapnik on OSX 10.8

So after I clone the Github repo, I go to run the configure command like so: ./configure and then get the error:
Checking for C++ library icuuc... no
Could not find required header or shared library for icuuc

and later: Exiting... the following required dependencies were not found:
- icuuc (ICU C++ library | configure with ICU_LIBS & ICU_INCLUDES or use ICU_LIB_NAME to specify custom lib name | more info: http://site.icu-project.org/)

Looking at the Mapnik troubleshooting area for a solution: https://github.com/mapnik/mapnik/wiki/InstallationTroubleshooting

Says: Solution: If g++ is available then ICU must be in a custom location so set the paths to the libs and includes - ie. ICU_LIBS=/usr/local/lib and ICU_INCLUDES=/usr/local/include.

By running g++ from command line I get: i686-apple-darwin11-llvm-g++-4.2: no input files

So this means that g++ is available, but I have no idea how to go about setting the paths so that configure can find them.

ICU Libraries were installed by default or with homebrew, not sure which.

terminal: brew install icu4c
Warning: icu4c-51.1 already installed

Finding the icu4c install directory:
terminal: mdfind icu4c
/usr/local/Cellar/icu4c

Était-ce utile?

La solution 2

As per our discussion and my last comment something like the following might work.

export ICU_LIBS=/usr/local/Cellar/icu4c/lib
export ICU_INCLUDES=/usr/local/Cellar/icu4c/include
./configure

Autres conseils

You can add the path of your ICU_LIB/INCLUDE to your configure command:

./configure ICU_INCLUDES=/usr/local/Cellar/icu4c/include ICU_LIBS=/usr/local/Cellar/icu4c/lib

And for more help about configure on what options are accepted do:

./configure --help 

For the installation reference, you can check this: https://github.com/mapnik/mapnik/blob/v2.2.0/INSTALL.md

If you find same errors:

Checking for C++ library XXX... no

Follow the command

sudo apt-get install g++ libXXX-dev

Using tips (TAB button), you can see what XXX libraries you have available

sudo apt-get install libXXX(press double TAB)
Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top