kerl build of erlang, problem with wx on mac

I am trying to build Erlang with kerl on mac, using latest wxwidgets installed with homebrew. I have tried both R23 and R25 builds but always get the following:

$ KERL_BUILD_DOCS=yes KERL_DOC_TARGETS=chunks kerl build 25.2.3 25.2.3
Extracting source code
Building Erlang/OTP 25.2.3 (25.2.3), please wait...
20.6.0
APPLICATIONS INFORMATION (See: /Users/geib/.kerl/builds/25.2.3/otp_build_25.2.3.log)
 * wx             : wxWidgets was not compiled with --enable-webview or wxWebView developer package is not installed, wxWebView will NOT be available
 * wxWidgets was not compiled with --enable-compat30, wx will NOT be useable
 * wxWidgets don't have gl support, wx will NOT be useable
 * Can not link wx program are all developer packages installed?

When I try an R23 build the message changes slightly to "wxWidgets was not compiled with --enable-compat28, wx will NOT be useable.

Can you tell us a bit more?

Specifically can you confirm that you’re using wxwigets 3.2.2.1 ?

Also, is this intel or apple silicon?

I have not had trouble with any builds in regard to wxwidgets myself, I’m on 3.2.2.1 installed via homebrew on a mac m2.

Edit: For reference, there was one issue in OTP 24 but that was in 2021, so if you’re on the latest patch version of 24, you shouldn’t run into this : Building with wxwidgets 3.1.6 is not detecting compat30 · Issue #5883 · erlang/otp · GitHub

Edit: Sorry for the noise. One thing just occured to me, make sure you’re using the latest version of kerl.iirc, when that issue cropped up in OTP Lukas send up a lot of PRs to kerl.

More info:

kerl is version 2.5.1, installed with homebrew
wxwidgets is version 3.2.2.1, again installed with homebrew
intel mac, 2014 macbook pro

and trying to build R25 via “$KERL_BUILD_DOCS=yes KERL_DOC_TARGETS=chunks kerl build 25.2.3 25.2.3”

Thanks,
Mark.

Interesting, I’m on an older version of kerl right now (2.1.1) and it still works. Nothing special in my env, nor do I have anything in .kerlrc. :face_with_monocle:

So I tried downgrading kerl to 2.1.1, but same result. Also verified ~/.kerlrc is empty…

I also tried installing wxwidgets@3.0 with homebrew, and adding wx-config location in build.

KERL_CONFIGURE_OPTIONS=“–without-javac --with-ssl=/usr/local/opt/openssl@1.1 --with-wx-config=/usr/local/Cellar/wxwidgets@3.0/3.0.5.1_1/bin/wx-config-3.0” KERL_BUILD_DOCS=yes KERL_DOC_TARGETS=chunks kerl build 23.3.4.18 23.3.4.18

same result, no wx.

Extracting source code
Building Erlang/OTP 23.3.4.18 (23.3.4.18), please wait…
APPLICATIONS INFORMATION (See: /Users/geib/.kerl/builds/23.3.4.18/otp_build_23.3.4.18.log)

  • wx : wxWidgets was not compiled with --enable-compat28, wx will NOT be useable
  • wxWidgets don’t have gl support, wx will NOT be useable
  • wxWidgets don’t have wxStyledTextControl (stc.h), wx will NOT be useable
  • Can not link the wx driver, wx will NOT be useable

Thanks,
Mark.

Ok, I replicated your issue if I build OTP 23. Any reason you’re building OTP 23 and not 24 or 25?

OTP 23 requires an wxwidgets version <3.0

Team policy more than anything. We are starting to talk regarding moving to R25, but we have seen that rebar3 must be updated when moving to R25, and we have a number of rebar3 plugins internally, and need to verify they work with the new rebar3, etc…

Thanks for reply,
Mark.

Gotcha. I suppose you could open an issue with Erlang/OTP, but I do think the message is saying what you should do and what @LostKobrakai pointed out. That is wxwidgets <3.0 or compile wxwidgets with compat for 2.x.

I have all the same versions and hardware down to an intel chip / installed with homebrew. i couldn’t replicate the error but now you know what it isn’t. Sorry, mate.

Here’s the updated solution for OTP-27.x and OTP-28.x on macOS Sonoma (using homebrew and kerl 4.4.0):

brew install wxwidgets@3.2

WX_CONFIG=/opt/homebrew/Cellar/wxwidgets@3.2/3.2.8.1/bin/wx-config-3.2

KERL_CONFIGURE_OPTIONS="--with-wx-config=$WX_CONFIG" kerl build 27.3.4.2
KERL_CONFIGURE_OPTIONS="--with-wx-config=$WX_CONFIG" kerl build 28.0.2

I had to come back for this; Here’s an update to cope with wxwidgets version changes and OTP-28.5 (from git):

WX_VERSION=$(brew info wxwidgets@3.2 --json | jq -r '.[].installed[].version')
WX_CONFIG=$(brew --prefix)/Cellar/wxwidgets@3.2/${WX_VERSION}/bin/wx-config-3.2

KERL_CONFIGURE_OPTIONS="--with-wx-config=$WX_CONFIG" \
    kerl build git https://github.com/erlang/otp.git OTP-28.5 OTP-28.5