Repository navigation
Description
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
MaartenBent commentedon Apr 14, 2022
Hi, as a wxWidgets contributor I suspect this is caused by the changed return type of
wxMenuItem::GetBitmap()formconst wxBitmap&towxBitmapin 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.dgud commentedon Apr 15, 2022
@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.
Merge branch 'dgud/wx/compile-wxWidgets-316/GH-5893/OTP-18064' into m…
nohal commentedon Apr 26, 2022
c2eb692 is now being applied in the OTP-24 erlang formula and everything seems to work as expected.
Many thanks for your prompt support!
Merge branch 'dgud/wx/compile-wxWidgets-316/GH-5893/OTP-18064' into m…