Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot build 3.0.5 on macOS with system clang #1247

Closed
fxcoudert opened this issue May 31, 2019 · 3 comments · Fixed by #1862
Closed

Cannot build 3.0.5 on macOS with system clang #1247

fxcoudert opened this issue May 31, 2019 · 3 comments · Fixed by #1862

Comments

@fxcoudert
Copy link

fxcoudert commented May 31, 2019

Operating system: macOS 10.14.5
wxPython version & source: 4.0.6, trying to self-build
Python version & source: Python 3.7.3 from Homebrew

Description of the problem:

I am trying to update the version shipped in Homebrew (of which I am a maintainer) to the latest (we currently ship 3.0.2.0). The configuration finishes successfully with:

    Configured wxWidgets 3.0.5 for `x86_64-apple-darwin18.6.0'

      Which GUI toolkit should wxWidgets use?                 osx_cocoa
      Should wxWidgets be compiled into single library?       no
      Should wxWidgets be linked as a shared library?         yes
      Should wxWidgets support Unicode?                       yes (using wchar_t)
      What level of wxWidgets compatibility should be enabled?
                                           wxWidgets 2.6      no
                                           wxWidgets 2.8      yes
      Which libraries should wxWidgets use?
                                           STL                no
                                           jpeg               sys
                                           png                sys
                                           regex              builtin
                                           tiff               sys
                                           zlib               sys
                                           expat              sys
                                           libmspack          no
                                           sdl                no

but the build fails with:

    clang: error: cannot specify -o when generating multiple output files
    make: *** [.pch/wxprec_basedll/wx/wxprec.h.gch] Error 1
    make: *** Waiting for unfinished jobs....
    clang: error: cannot specify -o when generating multiple output files
    make: *** [.pch/wxprec_netdll/wx/wxprec.h.gch] Error 1
    clang: error: cannot specify -o when generating multiple output files
    make: *** [.pch/wxprec_coredll/wx/wxprec.h.gch] Error 1
    Error building
    ERROR: failed building wxWidgets
@fxcoudert
Copy link
Author

fxcoudert commented May 31, 2019

The build can be fixed by patching buildtools/build_wxwidgets.py to add wxpy_configure_opts.append("--disable-precomp-headers") on darwin (for example here: https://github.com/wxWidgets/Phoenix/blob/master/buildtools/build_wxwidgets.py#L295)

Homebrew issue: Homebrew/homebrew-core#40562

@fxcoudert
Copy link
Author

ping @RobinD42 this is still present in the latest released version, we would like to have an official fix instead of hacking it in Homebrew distribution

@RobinD42
Copy link
Member

RobinD42 commented Dec 2, 2020

Please give it another try with 06d0874, or tonight's snapshot. I didn't add --disable-precomp-headers but I did change how the wxPython build gets the compilers and flags from wxWidgets. The builds work fine for me with both gcc and clang.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants