【问题标题】:error installing libgd in mac 10.9在 mac 10.9 中安装 libgd 时出错
【发布时间】:2014-02-27 04:43:39
【问题描述】:

我正在尝试按照此处 (https://mikewest.org/2007/04/installing-libgd-from-source-on-os-x) 的说明在我的 mac OSX 10.9 上安装 libgd,并在此处 (Installing GD library for perl on MacOSX 10.6) 了解更多信息。

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

我按照所有步骤安装各种库 libpgn、pibjpeg 和 freetype,主要使用 ./configure && make && make sudo install...然而 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

我阅读了建议使用 --with-png=myDirectory --with-freetype=myDir 等的 README 文件 (yeeee)。我这样做了(不确定它是否有所不同)但是当我到达 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

...更广泛的馅饼:http://pastebin.com/BuvskMPe

所以我被卡住了,我正在网上阅读,它看起来与 Xcode 和 gcc 有关,但我不知道如何解决这个问题。

任何帮助都会很棒!

【问题讨论】:

  • 看起来像一个问题,因为您正在尝试使用 Xcode 附带的编译器 clang(llvm) 进行编译。开源包/库(此处为 libgd)通常编译良好并使用 gcc 进行测试。Apple 在 OS X 10.8 中弃用了 gcc 编译器。我不确定 clang 是否支持定义哈希字典的新 C++ 标准(TR1) (“无序地图”)。你需要通过 macports 或 homebrew 自己安装 g++,或者从 gcc.org 获取它来构建 libgd。

标签: macos perl gd libraries circos


【解决方案1】:

我使用自制软件成功安装了它。很简单:

brew install gd

这安装了 lib-gd 版本 2.1.0_1。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2023-04-04
    • 2013-12-01
    • 1970-01-01
    • 2014-06-19
    • 2013-11-15
    • 1970-01-01
    • 2014-11-07
    • 1970-01-01
    相关资源
    最近更新 更多