在mac中安装libgd时出错10.9

问题描述:

我试图在mac OSX 10.9上安装libgd(https://mikewest.org/2007/04/installing-libgd-from-source-on-os-x)并在此处找到更多信息(Installing GD library for perl on MacOSX 10.6)。在mac中安装libgd时出错10.9

主要目标是能够安装和使用Circos。

我按照所有安装各种库libpgn,主要利用./configure && make && make sudo install pibjpeg和FreeType的步骤......但是 1)的libgd的./congigure命令不会发现我刚安装的库和我所得到的是以下:

** Configuration summary for libgd 2.1.0: 

    Support for Zlib:     yes 
    Support for PNG library:   no 
    Support for JPEG library:   no 
    Support for VPX library:   no 
    Support for TIFF library:   no 
    Support for Freetype 2.x library: no 
    Support for Fontconfig library: no 
    Support for Xpm library:   no 
    Support for pthreads:    yes 

我读的README文件(yeeee)建议使用--with-png=myDirectory --with-freetype=myDir etc..i这样做(不知道这就不一样了),但是当我到达make命令我碰到下面的错误

Undefined symbols for architecture x86_64: 
    "___sincos_stret", referenced from: 
     _gdImageCopyRotated in gd.o 
     _gdAffineRotate in gd_matrix.o 
     _gdImageRotateNearestNeighbour in gd_interpolation.o 
     _gdImageRotateGeneric in gd_interpolation.o 
     _gdImageRotateBilinear in gd_interpolation.o 
     _gdImageRotateBicubicFixed in gd_interpolation.o 
     _filter_bessel in gd_interpolation.o 
     ... 
    "_iconv", referenced from: 
     _do_convert in gdkanji.o 
    "_iconv_close", referenced from: 
     _do_convert in gdkanji.o 
    "_iconv_open", referenced from: 
     _do_convert in gdkanji.o 
ld: symbol(s) not found for architecture x86_64 
clang: error: linker command failed with exit code 1 (use -v to see invocation) 
make[2]: *** [libgd.la] Error 1 
make[1]: *** [all] Error 2 
make: *** [all-recursive] Error 1 

...在pastie更广泛:http://pastebin.com/BuvskMPe

所以我坚持,我在在线阅读和它看起来像它与Xcode和GCC做的,但我不能找出如何解决这个。

任何帮助将是真棒!

+0

看起来像是一个问题,因为您正在尝试使用Xcode附带的编译器clang(llvm)进行编译。开源的软件包/库(libgd在这里)通常编译得很好,并用gcc进行测试。苹果不赞成OS X 10.8中的gcc编译器。我不确定clang是否支持新的C++标准(TR1),它定义了哈希字典( “unordered_map”)。 您需要通过macports或homebrew自己安装g ++,或者从gcc.org获取它来构建libgd。 –

我用自制软件成功安装了它。

酿造安装GD

此安装LIB-GD版本2.1.0_1:因为它是那么简单。