asdf-vm / asdf-erlang

Erlang plugin for asdf version manager

Home Page:https://github.com/asdf-vm/asdf

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Unable to install Erlang following the wxwidgets 3.1.6 update

gcauchon opened this issue · comments

Steps

I just tried to install the latest version (ie 24.3.3) on my Macbook after doing Homebrew updates. I’ve been using my laptop for Elixir development for quite some time with many previous versions without problems, but I am unable to install new version anymore with the following error:

Extracting source code
Building Erlang/OTP 24.3.3 (asdf_24.3.3), please wait...
APPLICATIONS DISABLED (See: /Users/gcauchon/.asdf/plugins/erlang/kerl-home/builds/asdf_24.3.3/otp_build_24.3.3.log)

[…]

Build failed.
1 warning generated.
1 warning generated.
1 warning generated.
1 warning generated.
1 warning generated.
1 warning generated.
5 warnings generated.
make[2]: *** [opt] Error 2
make[1]: *** [opt] Error 2
make: *** [libs] Error 2

Please see /Users/gcauchon/.asdf/plugins/erlang/kerl-home/builds/asdf_24.3.3/otp_build_24.3.3.log for full details.

Here is what I found in the log:

<scratch space>:105:6: note: expanded from here
 GCC warning "wxSTC_INDIC0_MASK is deprecated. Style byte indicators are no longer used."
     ^
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 warning and 1 error generated.
make[3]: *** [aarch64-apple-darwin21.4.0/wxe_wrapper_5.o] Error 1
make[3]: *** Waiting for unfinished jobs....
1 warning generated.
1 warning generated.
1 warning generated.
1 warning generated.
1 warning generated.
1 warning generated.
1 warning generated.
1 warning generated.
5 warnings generated.
make[2]: *** [opt] Error 2
make[1]: *** [opt] Error 2
make: *** [libs] Error 2

Workaround

I found this related issue erlang/otp#5893 in the OTP repository, applied the fix locally and was able to install Erlang again!

Fix

From what I was able to understand from the install script, there isn’t a way for us to fix the plugin without it being merged to upstream in the OTP maint-24 branch with a new version being released?

Getting the same issue. I got it to build by uninstalling the wxmac brew package but would be good to have a proper fix.

I guess the easiest thing to do would be to wait for OTP to release a new 24.x version which includes this patch.

Confirmed that brew uninstall wxwidgets can be a temporary solution for now, but will trade off with observer or UI related feature.

OTP 24.3.4 has been released and everything now builds successfully with wxwidgets installed.

Erlang 24.3.4 was released with the mandatory fix!

❯ asdf install erlang 24.3.4
asdf_24.3.4 is not a kerl-managed Erlang/OTP installation
No build named asdf_24.3.4
Downloading 24.3.4 to /Users/gcauchon/.asdf/downloads/erlang/24.3.4...
[…]
Extracting source code
Building Erlang/OTP 24.3.4 (asdf_24.3.4), please wait...
[…]
Erlang/OTP 24.3.4 (asdf_24.3.4) has been successfully built
Cleaning up compilation products for
Cleaned up compilation products for  under /Users/foo/.asdf/plugins/erlang/kerl-home/builds