Skip to content

Build failure against wxWidgets 3.1.6 on macOS, blocking Homebrew update #5893

Closed

Description

@nohal

Describe the bug

clang++ -c -g -Wall -fPIC -g -O2 -mmacosx-version-min=12 -Wno-deprecated-declarations -fno-strict-aliasing  -D_MACOSX -D_THREAD_SAFE -D_REENTRANT -O1 -I/usr/local/lib/wx/include/osx_cocoa-unicode-3.1 -I/usr/local/include/wx-3.1 -D_FILE_OFFSET_BITS=64 -DWXUSINGDLL -D__WXMAC__ -D__WXOSX__ -D__WXOSX_COCOA__   -DPACKAGE_NAME=\"\" -DPACKAGE_TARNAME=\"\" -DPACKAGE_VERSION=\"\" -DPACKAGE_STRING=\"\" -DPACKAGE_BUGREPORT=\"\" -DPACKAGE_URL=\"\" -DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1 -DSIZEOF_VOID_P=8 -DHAVE_OPENGL_GL_H=1 -DHAVE_OPENGL_GLU_H=1 -DWXE_WEBVIEW=1 -DHAVE_GL_SUPPORT=1 -DHAVE_GLINTPTR=1 -DHAVE_GLINTPTRARB=1 -DHAVE_GLCHAR=1 -DHAVE_GLCHARARB=1 -DHAVE_GLHALFARB=1 -DHAVE_GLINT64EXT=1 -DHAVE_WX_STC_STC_H=1 -I/private/tmp/erlang-20220414-68498-1dkkpkl/otp_src_24.3.3/erts/emulator/beam -I/private/tmp/erlang-20220414-68498-1dkkpkl/otp_src_24.3.3/erts/include -I/private/tmp/erlang-20220414-68498-1dkkpkl/otp_src_24.3.3/erts/include/x86_64-apple-darwin21.4.0 -I/private/tmp/erlang-20220414-68498-1dkkpkl/otp_src_24.3.3/erts/include/internal -I/private/tmp/erlang-20220414-68498-1dkkpkl/otp_src_24.3.3/erts/include/internal/x86_64-apple-darwin21.4.0 -I/private/tmp/erlang-20220414-68498-1dkkpkl/otp_src_24.3.3/erts/emulator/sys/unix -I/private/tmp/erlang-20220414-68498-1dkkpkl/otp_src_24.3.3/erts/emulator/sys/common  gen/wxe_wrapper_8.cpp -o x86_64-apple-darwin21.4.0/wxe_wrapper_8.o
gen/wxe_wrapper_5.cpp:2165:29: error: taking the address of a temporary object of type 'wxBitmap' [-Waddress-of-temporary]
  const wxBitmap * Result = &This->GetBitmap();
                            ^~~~~~~~~~~~~~~~~~
1 error generated.
make[3]: *** [x86_64-apple-darwin21.4.0/wxe_wrapper_5.o] Error 1
make[3]: *** Waiting for unfinished jobs....
make[2]: *** [opt] Error 2
make[1]: *** [opt] Error 2
make: *** [libs] Error 2

To Reproduce

Using homebrew tree with changes from https://github.com/Homebrew/homebrew-core/pull/99206/files (The only change actually required to reproduce the issue is Homebrew/homebrew-core@65fc10a)

brew install --build-from-source wxwidgets
brew install --build-from-source erlang

What it actually runs internally to build erlang is

./configure --disable-debug --disable-silent-rules --enable-dynamic-ssl-lib --enable-hipe --enable-shared-zlib --enable-smp-support --enable-threads --enable-wx --with-ssl=/opt/homebrew/opt/openssl@1.1 --without-javac --enable-darwin-64bit --enable-kernel-poll --with-dynamic-trace=dtrace --disable-option-checking --cache-file=/dev/null
make

against wxWidgets configured with --enable-clipboard --enable-controls --enable-dataviewctrl --enable-display --enable-dnd --enable-graphics_ctx --enable-std_string --enable-svg --enable-unicode --enable-webviewwebkit --with-expat --with-libjpeg --with-libpng --with-libtiff --with-opengl --with-zlib --disable-precomp-headers --disable-monolithic --with-osx_cocoa --with-libicon

Expected behavior

No build errors

Affected versions

OTP-24

Additional context

This effectively blocks wxWidgets update in Homebrew

Activity

  1. added
    bugIssue is reported as a bug
    on Apr 14, 2022
  2. MaartenBent commented on Apr 14, 2022

    @MaartenBent

    Hi, as a wxWidgets contributor I suspect this is caused by the changed return type of wxMenuItem::GetBitmap() form const wxBitmap& to wxBitmap in this commit. (Note that the interface file has not been updated yet).

    Since you use your own clone of wxWidgets, it probably has to be updated to 3.1.6 first. Or 3.1.7 planned for beginning of May, which should also include a fix of the return type in the interface file. But since you modify this function already in your branch, you might not need to wait for that.

  3. dgud commented on Apr 15, 2022

    @dgud
    Contributor

    @MaartenBent We need to be able compile with both wxWidgets-3.0 and wxWidgets-3.1.6 and everything between.

    So I don't know how to handle this in erlang, I thought --enable-compat-3.0 should handle this, it have always worked before.

  4. added a commit that references this issue on Apr 25, 2022
  5. nohal commented on Apr 26, 2022

    @nohal
    Author

    c2eb692 is now being applied in the OTP-24 erlang formula and everything seems to work as expected.

    Many thanks for your prompt support!

  6. added a commit that references this issue on May 3, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

bugIssue is reported as a bugteam:PSAssigned to OTP team PS

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions