Fatal error asdf install of erlang 24.2.1

I tried compiling wxWidgets from source per Erlang 24.0 installation error message: wxWidgets was not compiled with --enable-webview or wxWebView developer package is not installed · Issue #203 · asdf-vm/asdf-erlang · GitHub 2 but that caused a different error:

error: call to member function ‘AddTool’ is ambiguous

Same problem for me. I’m using OSX 12.2.1 (Apple M1 Pro). I can’t install Erlang 24, 23, or 22. Same error. I have the latest version of Xcode installed, and I installed the command line tools via:

$ xcode-select —install

I opened an issue here:

Hmm…I got erlang 24.3.4 installed, but I’m not sure why it worked on this attempt. The last thing I tried was deleting my manually installed wxWidgets:

~% ls
Computing	Downloads	Music		erlang_programs
Desktop		Library		Pictures	wxWidgets
Documents	Movies		Public

~% rm -rf ./wxWidgets

Then I manually reinstalled wxWidgets per conradwt’s instructions in issue #203. I did add one flag to ~/.zshrc:

--with-ssl-incl=/opt/local

based on josevalim’s post here. I highly doubt that was necessary. So, this is what I have for asdf in my ~/.zshrc file:

#For asdf:                                                                    
. $HOME/.asdf/asdf.sh                                                         
                                                                              
#For asdf erlang installs with wxWidgets:                                     
export KERL_BUILD_DOCS=yes                                                    
export KERL_INSTALL_MANPAGES=yes                                              
export wxUSE_MACOSX_VERSION_MIN=11.3                                          
export EGREP=egrep                                                            
export CC=clang                                                               
export CPP="clang -E"                                                         
export KERL_USE_AUTOCONF=0                                                    
                                                                              
export KERL_CONFIGURE_OPTIONS="--disable-debug \                              
                               --disable-hipe \                               
                               --disable-sctp \                               
                               --disable-silent-rules \                       
                               --enable-darwin-64bit \                        
                               --enable-dynamic-ssl-lib \                     
                               --enable-kernel-poll \                         
                               --enable-shared-zlib \                         
                               --enable-smp-support \                         
                               --enable-threads \                             
                               --enable-wx \                                  
                               --with-ssl=/opt/local \                        
                               --with-ssl-incl=/opt/local \                   
                               --with-wx-config=/usr/local/bin/wx-config \    
                               --without-javac \                              
                               --without-jinterface \                         
                               --without-odbc"

Maybe those .zshrc flags need to be setup up BEFORE installing wxWidgets? Don’t forget to start a new shell when you make any changes to ~/.zshrc!

I just realized that last night I was prompted to update macOS 12.2.1, and I stupidly said yes. So, now I have macOS 12.3.1. I think that is the most likely reason I was suddenly able to install erlang 24.3.4

I tested wxWidgets by launching observer in the shell:

~/erlang_programs% erl
Erlang/OTP 24 [erts-12.3.2] [source] [64-bit] [smp:8:8] [ds:8:8:10] [async-threads:1]

Eshell V12.3.2  (abort with ^G)
1> observer:start().
ok

And, the observer window opened, and everything seems to be working fine.