2016-04-03 32 views
5

Về cơ bản nó giống như this one không thực sự kết thúc.Alien :: wxWidgets cài đặt không thành công trên OSX 10

Tôi đang gặp phải sự cố tương tự và tôi đã tiến xa hơn một chút. Tôi đã phải thay đổi mã để cho phép một sdk Macos mới hơn (10,11). Vì vậy, nó được biên soạn trong một thời gian nhưng sau đó thất bại whith này:

❯❯❯ 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 

Điều lạ là khi tôi kiểm tra các bản ghi cấu hình: Cái này (./wxWidgets-3.0.2/bld/src/tiff/config.log) có các lỗi khác hơn LZMA, ví dụ:

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.

Ans ít nhiều giống với ./wxWidgets-3.0.2/bld/config.log.

Khi tôi thay đổi mã để cho phép os10.10 SDK, trước đây nó đã dự kiến ​​lên đến 10.8 hoặc có thể là 10.9. Tôi cho rằng toàn bộ vấn đề đến từ điều này. Tôi có nên thử tìm nạp một MacOS SDK cũ không?

Về cơ bản, tôi chỉ muốn biên dịch Slic3r --gui từ nguồn, yêu cầu Wx, yêu cầu wxwidgets.

+0

Và đây là đầy đủ '/ wxWidgets-3.0.2/bld/config.log':. Http://pastebin.com/raw/6d3zBSbj – guiohm

+0

lạ, có thể bạn cố gắng để biên dịch wxWidgets bằng tay, tức là không có tự động hóa? Chỉ cần thực hiện ../configure && make && make install. – Igor

+1

'brew uninstall xz' đã sửa nó cho tôi. source: https://bugs.launchpad.net/kicad/+bug/1285317 – bits

Trả lời

2

Vấn đề ở đây là cấu hình libtiff phát hiện lzma.h dưới /usr/local vì nó không sử dụng -isysroot, nhưng biên dịch của nó, do tùy chọn SDK và không tìm thấy. Điều đúng đắn cần làm là sử dụng -I/usr/local/include một cách rõ ràng trong cấu hình wxWidgets, nhưng bây giờ bạn sẽ có thể giải quyết vấn đề này bằng cách thực hiện export CPATH=/usr/local/include LIBRARY_PATH=/usr/local/lib để bỏ qua nó.

Hoặc (và IMHO tốt hơn), làm brew install tiff jpeg png (không chắc chắn tên công thức là chính xác, vui lòng kiểm tra chúng) để tránh tạo phiên bản nội tuyến của các thư viện này ngay từ đầu.

Các vấn đề liên quan