简体   繁体   English

在OSX 10上Alien :: wxWidgets安装失败

[英]Alien::wxWidgets install fails on OSX 10

It's basically the same as this one which didn't really ended up. 它基本上与这个没有真正结束的那个相同。

I'm facing the same issue and I went a bit further. 我面临同样的问题而且我走得更远了。 I had to change the code to allow a newer Macos sdk (10.11). 我不得不更改代码以允许更新的Macos sdk(10.11)。 So it compiled for a while but then failed whith this: 所以它编译了一段时间但后来失败了:

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

The weird thing is when I checked the config logs: This one ( ./wxWidgets-3.0.2/bld/src/tiff/config.log ) has other errors than lzma, for instance: 奇怪的是当我检查配置日志时:这个( ./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 . 查看完整版本

Ans it's more or less the same with ./wxWidgets-3.0.2/bld/config.log . 回答它与./wxWidgets-3.0.2/bld/config.log相同。

When I changed the code to allow os10.10 SDK, it was previously expecting up to 10.8 or maybe 10.9. 当我更改代码以允许os10.10 SDK时,它之前预计高达10.8或10.9。 I suppose the whole issue comes now from this. 我想整个问题现在都来自于此。 Should I try to fetch an old MacOS SDK? 我应该尝试获取旧的MacOS SDK吗?

Basically, I just want to compile Slic3r --gui from source, which requires Wx, which requires wxwidgets. 基本上,我只想从源代码编译Slic3r --gui,这需要Wx,这需要wxwidgets。

The problem here is that libtiff configure detects lzma.h under /usr/local because it doesn't use -isysroot , but its compilation does, because of the SDK option, and fails to find it. 这里的问题是libtiff configure在/usr/local下检测lzma.h ,因为它不使用-isysroot ,但是由于SDK选项,它的编译确实没有找到它。 The right thing to do would be to use -I/usr/local/include explicitly in wxWidgets configure, but for now you should be able to work around this by doing export CPATH=/usr/local/include LIBRARY_PATH=/usr/local/lib to bypass it. 正确的做法是在wxWidgets configure中明确使用-I/usr/local/include ,但是现在你应该可以通过export CPATH=/usr/local/include LIBRARY_PATH=/usr/local/lib来解决这个问题。 export CPATH=/usr/local/include LIBRARY_PATH=/usr/local/lib绕过它。

Alternatively (and IMHO preferably), do brew install tiff jpeg png (not sure that the formulae names are correct, please check them) to avoid building the builtin versions of these libraries in the first place. 或者(最好是恕我直言),执行brew install tiff jpeg png (不确定公式名称是否正确,请检查它们),以避免首先构建这些库的内置版本。

Running brew install xz fixed the issue for me. 运行brew install xz为我解决了这个问题。

See https://stackoverflow.com/a/37594849/6381715 请参阅https://stackoverflow.com/a/37594849/6381715

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM