macos - Alien::wxWidgets 在 OSX10.10 上安装失败

标签 macos perl wxwidgets osx-yosemite wxperl

我正在尝试使用 wxWidgets 版本 3.0.2 安装 Alien::wxWidgets 版本 0.67,但无论我做什么,都会收到以下错误:

checking if C compiler (clang -mmacosx-version-min=10.5) works with SDK/version options... configure: error: in `/Users/David/.cpan/build/Alien-wxWidgets-0.67-GGkXTu/wxWidgets-3.0.2/bld':
configure: error: no.  Try a different SDK
See `config.log' for more details
system: echo exit | sh ../configure --prefix=/Users/David/perl5/perlbrew/perls/perl-5.16.0/lib/site_perl/5.16.0/darwin-2level/Alien/wxWidgets/osx_cocoa_3_0_2_uni --with-osx_cocoa --with-opengl --disable-compat24 --enable-unicode  --disable-monolithic --disable-universal_binary  --enable-graphics_ctx CC=clang CXX=clang++ CXXFLAGS="-stdlib=libc++ -std=c++11" OBJCXXFLAGS="-stdlib=libc++ -std=c++11" LDFLAGS=-stdlib=libc++: 256 at Build line 60.

我尝试使用标志进行构建 --with-macosx-sdk=10.5、--with-macosx-sdk=10.10、--without-macosx-sdk、--with-macosx-sdk=/Applications/Xcode .app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.11.sdk/但它们都不起作用。

这是 config.log 的一部分,我在其中看到错误,但我不知道如何解决它:

configure:16429: checking for gcc
configure:16456: result: clang
configure:16685: checking for C compiler version
configure:16694: clang --version >&5
Apple LLVM version 7.0.0 (clang-700.0.72)
Target: x86_64-apple-darwin14.5.0
Thread model: posix
configure:16705: $? = 0
configure:16694: clang -v >&5
Apple LLVM version 7.0.0 (clang-700.0.72)
Target: x86_64-apple-darwin14.5.0
Thread model: posix
configure:16705: $? = 0
configure:16694: clang -V >&5
clang: error: argument to '-V' is missing (expected 1 value)
clang: error: no input files
configure:16705: $? = 1
configure:16694: clang -qversion >&5
clang: error: unknown argument: '-qversion'
clang: error: no input files
configure:16705: $? = 1
configure:16725: checking whether the C compiler works
configure:16747: clang   -stdlib=libc++ conftest.c  >&5
configure:16751: $? = 0
configure:16799: result: yes
configure:16802: checking for C compiler default output file name
configure:16804: result: a.out
configure:16810: checking for suffix of executables
configure:16817: clang -o conftest   -stdlib=libc++ conftest.c  >&5
configure:16821: $? = 0
configure:16843: result: 
configure:16865: checking whether we are cross compiling
configure:16873: clang -o conftest   -stdlib=libc++ conftest.c  >&5
configure:16877: $? = 0
configure:16884: ./conftest
configure:16888: $? = 0
configure:16903: result: no
configure:16908: checking for suffix of object files
configure:16930: clang -c   conftest.c >&5
configure:16934: $? = 0
configure:16955: result: o
configure:16959: checking whether we are using the GNU C compiler
configure:16978: clang -c   conftest.c >&5
configure:16978: $? = 0
configure:16987: result: yes
configure:16996: checking whether clang accepts -g
configure:17016: clang -c -g  conftest.c >&5
configure:17016: $? = 0
configure:17057: result: yes
configure:17074: checking for clang option to accept ISO C89
configure:17137: clang  -c   conftest.c >&5
configure:17137: $? = 0
configure:17150: result: none needed
configure:17183: checking whether we are using the Intel C compiler
configure:17203: clang -c   conftest.c >&5
conftest.c:18:17: error: use of undeclared identifier 'choke'
                choke me
                ^
1 error generated.
configure:17203: $? = 1
configure: failed program was:
| /* confdefs.h */
| #define PACKAGE_NAME "wxWidgets"
| #define PACKAGE_TARNAME "wxwidgets"
| #define PACKAGE_VERSION "3.0.2"
| #define PACKAGE_STRING "wxWidgets 3.0.2"
| #define PACKAGE_BUGREPORT "wx-dev@lists.wxwidgets.org"
| #define PACKAGE_URL ""
| #define __BSD__ 1
| #define __DARWIN__ 1
| #define TARGET_CARBON 1
| /* end confdefs.h.  */
| 
| int
| main ()
| {
| 
|              #ifndef __INTEL_COMPILER
|                 choke me
|              #endif
| 
|   ;
|   return 0;
| }
configure:17213: result: no
configure:17936: checking how to run the C preprocessor
configure:17967: clang -E  conftest.c
configure:17967: $? = 0
configure:17981: clang -E  conftest.c
conftest.c:12:10: fatal error: 'ac_nonexistent.h' file not found
#include <ac_nonexistent.h>
         ^
1 error generated.
configure:17981: $? = 1
configure: failed program was:
| /* confdefs.h */
| #define PACKAGE_NAME "wxWidgets"
| #define PACKAGE_TARNAME "wxwidgets"
| #define PACKAGE_VERSION "3.0.2"
| #define PACKAGE_STRING "wxWidgets 3.0.2"
| #define PACKAGE_BUGREPORT "wx-dev@lists.wxwidgets.org"
| #define PACKAGE_URL ""
| #define __BSD__ 1
| #define __DARWIN__ 1
| #define TARGET_CARBON 1
| /* end confdefs.h.  */
| #include <ac_nonexistent.h>

如果您知道如何解决这个问题并使 wxWidgets 在 OSX 10.10 上运行,我将非常感激。

最佳答案

添加以下内容:

--with-macosx-version-min=10.11

关于macos - Alien::wxWidgets 在 OSX10.10 上安装失败,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/32689670/

相关文章:

Angular 不断自动重新加载

macos - 检查 Cocoa 中的两个文件是否相同

perl - 使用 Valgrind 测量 Perl 进程的峰值内存使用量

mysql - 如果 DBI::mysql_enable_utf8 未正确设置会发生什么情况?

python - 在wxPython中嵌入matplotlib FuncAnimation : Unwanted figure pop-up

c - getresuid 在 c99 中是否已弃用?

objective-c - NSStatusItem 的图形错误

perl - 如何将 Perl 拆分命令与空白修剪结合起来?

c++ - 使用 wxAutomationObject 将内存位图传递给 Powerpoint?

c++ - 使用 wxButton 避免 SPACE 和 ENTER 键