【发布时间】:2013-08-14 18:28:46
【问题描述】:
尝试在 OSX 10.8 上编译 Mapnik
所以在我克隆 Github 存储库后,我会像这样运行配置命令:
./configure 然后得到错误:Checking for C++ library icuuc... noCould not find required header or shared library for icuuc
及以后:
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/)
查看 Mapnik 故障排除区域以寻求解决方案:https://github.com/mapnik/mapnik/wiki/InstallationTroubleshooting
说: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.
通过从命令行运行g++,我得到:i686-apple-darwin11-llvm-g++-4.2: no input files
所以这意味着 g++ 可用,但我不知道如何设置路径以便 configure 可以找到它们。
ICU 库是默认安装或使用自制软件安装的,不确定是哪个。
terminal: brew install icu4cWarning: icu4c-51.1 already installed
找到icu4c安装目录:terminal: mdfind icu4c/usr/local/Cellar/icu4c
【问题讨论】:
-
你安装了 ICU 库和头文件吗?
-
我有,但我有一种感觉,他们没有被找到或在他们的默认目录中。这不是我第一次遇到 ICU 问题。编辑问题以显示安装了哪个 ICU。
-
二进制文件不一定表示正在安装的库(开发端)或头文件(我对 brew 一无所知,所以如果 brew 总是将所有三个安装在一起,可能会使用 brew)。无论如何,如果正确的部分安装在 /usr/local/Cellar 下并且 g++ 未配置为默认查看那里,那么您只需在运行 configure 之前将那些 ICU_* 环境标志设置到您的 shell 中的正确位置。
-
其实就是安装了icu4c的目录,还有lib、include、bin等的子目录。所以你是对的,configure 没有在那里,但老实说我不知道如何“导出那些 ICU_* 环境标志”。在运行
./configure之前,我在终端中尝试过这个,但没有成功。 -
您在问题中引用的错误为您提供了示例值。您只需要修改它们以指向您系统的正确路径(可能是 /usr/local/Cellar/icu4c/lib 和 /usr/local/Cellar/icu4c/include)然后
export ICU_LIBS ICU_INCLUDES。
标签: makefile osx-mountain-lion configure mapnik