2016-04-03 156 views
5

它基本上和this one一樣沒有真正結束。Alien :: wxWidgets在OSX上安裝失敗10

我面臨同樣的問題,我走得更遠一點。我不得不更改代碼以允許更新的Macos sdk(10.11)。因此,編制了一段時間,但此後未能蒙山這樣的:

❯❯❯ perl build 
Building Alien-wxWidgets 
/Users/guiohm/.cpan/build/Alien-wxWidgets-0.67-rVjMTK/wxWidgets-3.0.2/bld/bk-deps clang -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.11.sdk -mmacosx-version-min=10.7 -c -o wxtiff_tif_lzma.o -DNDEBUG -I../src/jpeg -I/Users/guiohm/.cpan/build/Alien-wxWidgets-0.67-rVjMTK/wxWidgets-3.0.2/bld/src/tiff/libtiff -I../src/tiff/libtiff -dynamic -fPIC -DPIC -D_FILE_OFFSET_BITS=64 -I/Users/guiohm/.cpan/build/Alien-wxWidgets-0.67-rVjMTK/wxWidgets-3.0.2/bld/lib/wx/include/osx_cocoa-unicode-3.0 -I../include -Wall -Wundef -O2 -fno-strict-aliasing -fno-common ../src/tiff/libtiff/tif_lzma.c 
../src/tiff/libtiff/tif_lzma.c:38:10: fatal error: 'lzma.h' file not found 
#include "lzma.h" 
     ^
1 error generated. 
make: *** [wxtiff_tif_lzma.o] Error 1 
system: make all: 512 at build line 68. 

❯❯❯ brew search 
lzma is now part of the xz formula. 

❯❯❯ brew info 
xz: stable 5.2.2 (bottled) 
General-purpose data compression with high compression ratio 
http://tukaani.org/xz/ 
/usr/local/Cellar/xz/5.2.2 (91 files, 1.4M) * 
    Poured from bottle 
From: https://github.com/Homebrew/homebrew-core/blob/master/Formula/xz.rb 
==> Options 
--universal 
    Build a universal binary 

❯❯❯ brew install xz 
Warning: xz-5.2.2 already installed 

❯❯❯ find/-name "lzma.h" 
/usr/local/Cellar/xz/5.2.2/include/lzma.h 
/usr/local/include/lzma.h 

❯❯❯ ll /usr/local/include/lzm* 
lrwxr-xr-x 1 guiohm admin 31 Oct 11 15:58 /usr/local/include/lzma -> ../Cellar/xz/5.2.2/include/lzma 
lrwxr-xr-x 1 guiohm admin 33 Oct 11 15:58 /usr/local/include/lzma.h -> ../Cellar/xz/5.2.2/include/lzma.h 

奇怪的是,當我檢查的配置日誌: 這一個(./wxWidgets-3.0.2/bld/src/tiff/config.log)具有其他錯誤比LZMA,例如:

configure:18047: checking for lzma_code in -llzma 
configure:18072: clang -o conftest -g -O2 -Wall -W -stdlib=libc++ conftest.c -llzma -ljpeg -lz >&5 
configure:18072: $? = 0 
configure:18081: result: yes 
configure:18096: checking lzma.h usability 
configure:18096: clang -c -g -O2 -Wall -W conftest.c >&5 
configure:18096: $? = 0 
configure:18096: result: yes 
configure:18096: checking lzma.h presence 
configure:18096: clang -E conftest.c 
configure:18096: $? = 0 
configure:18096: result: yes 
configure:18096: checking for lzma.h 
configure:18096: result: yes 
configure:18199: checking for X 
configure:18307: clang -E conftest.c 
conftest.c:89:10: fatal error: 'X11/Xlib.h' file not found 
#include <X11/Xlib.h> 
     ^
1 error generated. 
configure:18307: $? = 1 
configure: failed program was: 
| /* confdefs.h */ 
| #define PACKAGE_NAME "LibTIFF Software" 
| #define PACKAGE_TARNAME "tiff" 

See the full version

回答與./wxWidgets-3.0.2/bld/config.log差不多。

當我更改代碼以允許os10.10 SDK時,它以前預計高達10.8或10.9。我想現在整個問題都來自這個問題。 我應該試圖抓取一箇舊的MacOS SDK嗎?

基本上,我只是想從源碼編譯Slic3r --gui,它需要Wx,它需要wxwidgets。

+0

這裏是全'/ wxWidgets的-3.0.2/BLD/config.log':http://pastebin.com/raw/6d3zBSbj – guiohm

+0

奇怪的,你可以嘗試編譯wxWidgets的手動,即沒有自動化?只要做../configure && make && make install即可。 – Igor

+1

'brew卸載xz'爲我解決了它。來源:https://bugs.launchpad.net/kicad/+bug/1285317 – bits

回答

2

這裏的問題是,配置的libtiff檢測lzma.h/usr/local下,因爲它不使用-isysroot,但它確實編譯,因爲SDK的選項,並沒有找到它。正確的做法是在wxWidgets配置中明確使用-I/usr/local/include,但現在您應該能夠通過執行export CPATH=/usr/local/include LIBRARY_PATH=/usr/local/lib來避開它。

另外(和恕我直言,最好),做brew install tiff jpeg png(不知道公式名稱是否正確,請檢查它們),以避免首先建立這些庫的內置版本。