我試圖在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做的,但我不能找出如何解決這個。
任何幫助將是真棒!
看起來像是一個問題,因爲您正在嘗試使用Xcode附帶的編譯器clang(llvm)進行編譯。開源的軟件包/庫(libgd在這裏)通常編譯得很好,並用gcc進行測試。蘋果不贊成OS X 10.8中的gcc編譯器。我不確定clang是否支持新的C++標準(TR1),它定義了哈希字典( 「unordered_map」)。 您需要通過macports或homebrew自己安裝g ++,或者從gcc.org獲取它來構建libgd。 –