Alien::wxWidgets install fails on OSX10.10

爱⌒轻易说出口 提交于 2019-12-05 15:40:32

Add the following:

--with-macosx-version-min=10.11

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

This is how I got to to mostly build under Mac OS 10.11.4:

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

After several minutes of compiling, the below 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 gets us farther into the build process, but not (yet) to a successful build. :-(

I used the steps from @Cal above, but with the patch from wxWidgets project to fix the m_webView type mismatch errors. 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-variants-see-16329.patch which gives you a html view 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've fixed this in trunk for releases >= 3.1 and this is the proposed patch for a possible 3.0.3, but since no action for 18 mos., perhaps they'll just skip it and this will go away in the next release.

I repackaged the patch to work with Alien::wxWidgets Build.PL here: http://markwal.github.io/patches/Alien-wxWidgets-0.67-El-Capitan.patch

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

  1. Download Alien::wxWidgets from https://metacpan.org/pod/Alien::wxWidgets
  2. tar xvf Alien-wxWidgets-0.67.tar.gz
  3. Download the patch from http://markwal.github.io/patches/Alien-wxWidgets-0.67-El-Capitan.patch
  4. cd Alien-wxWidgets-0.67
  5. patch -p1 < ../Alien-wxWidgets-0.67-El-Capitan.patch
  6. perl ./Build.PL --wxWidgets-extraflags="--with-macosx-version-min=10.11"
  7. perl Build
  8. perl Build test
  9. perl Build install
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!