Alien :: wxWidgets error fails on OSX10.10

I am trying to install Alien :: wxWidgets version 0.67 with wxWidgets version 3.0.2, but no matter what I do, I get the following error:

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. 

I tried building with the flags --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/SDK/MacOSX10.11.sdk/, but none of them worked.

Here is the part of config.log where I see the error, but I have no idea how to solve it:

 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> 

If you have an idea how to solve this problem and get wxWidgets working in OSX 10.10, I would be very grateful.

+3
source share
4 answers

This is the wrong part of config.log , this error is normal / expected, you should look below to see the real one. Without seeing this, it’s hard to be sure, but I think that -mmacosx-version-min=10.5 is the culprit, your SDK may be too new to support 10.5. Try either choosing a different SDK if you have an older version installed (see /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs for verification), or track down where this 10.5 /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs from , and replace it with 10.7, which is supported by the 10.10 SDK (not sure if 10.11).

0
source

Add the following:

- c-MacOSX-version-min = 10.11

0
source

Here's how I got mostly on Mac OS 10.11.4:

  • Download Alien :: wxWidgets from https://metacpan.org/pod/Alien::wxWidgets
  • tar xzf Alien-wxWidgets-0.67.tar.gz
  • cd Alien-wxWidgets
  • perl ./Build.PL --wxWidgets-extraflags="--with-macosx-versin-min=10.11"
  • ./Build

After several minutes of compilation below, the error stopped the build process:

 ../src/osx/webview_webkit.mm:936:25: error: cannot initialize a variable of type 'WebBackForwardList *' with an rvalue of type 'WKBackForwardList *' WebBackForwardList* history = [m_webView backForwardList]; ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~ ../src/osx/webview_webkit.mm:954:25: error: cannot initialize a variable of type 'WebBackForwardList *' with an rvalue of type 'WKBackForwardList *' WebBackForwardList* history = [m_webView backForwardList]; ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~ 15 warnings and 2 errors generated. make: *** [webviewdll_osx_webview_webkit.o] Error 1 system: make all: 512 at ./Build line 60. 

So, --with-macosx-versin-min=10.11 allows us to advance further in the build process, but not (for now) to a successful build .: - (

0
source

I used the steps from @Cal above, but with a patch from the wxWidgets project, to fix mismatch errors like m_webView. The wxWidgets issue is tracked here: http://trac.wxwidgets.org/ticket/16329 , and the patch is here: http://trac.wxwidgets.org/attachment/ticket/16329/0001-using-proper-types-for- webkit-options-see-16329.patch , which gives you an html representation of the patch. The download link is here: http://trac.wxwidgets.org/raw-attachment/ticket/16329/0001-using-proper-types-for-webkit-variants-see-16329.patch

It looks like they fixed it in trunk for releases> = 3.1, and this is the proposed patch for possible 3.0.3, but since there is no action for 18 mos., Maybe they will just skip it, and this will go in the next release.

I repackaged the patch for working with Alien :: wxWidgets Build.PL here: http://markwal.imtqy.com/patches/Alien-wxWidgets-0.67-El-Capitan.patch

So, to repeat, the steps that I used to build under Mac OS X El Capitan 10.11.6:

0
source

Source: https://habr.com/ru/post/1246346/


All Articles