asdf-erlang: Erlang 24.0 installation error message: wxWidgets was not compiled with --enable-webview or wxWebView developer package is not installed

Installing Erlang 24.0 on Ubuntu 20.04 based on the current asdf advised package prerequisites results in the following error message:

wxWidgets was not compiled with --enable-webview or wxWebView developer package is not installed

One of the new features of Erlang 24.0 is the addition of support for wxWebView.

https://www.erlang.org/downloads/24.0

wx
The application has been completely rewritten in order
to use wxWidgets version 3 as its base.
Added support for wxWebView.

The asdf Erlang installation instructions for Ubuntu 20.04 mention only the prerequisite package libwxgtk3.0-gtk3-dev. If only this package is installed, the following error message is displayed upon installing Erlang 24.0 using asdf:

asdf install erlang 24.0

Building Erlang/OTP 24.0 (asdf_24.0), please wait...
APPLICATIONS INFORMATION (See: ~/.asdf/plugins/erlang/kerl-home/builds/asdf_24.0/otp_build_24.0.log)
 * wx             : wxWidgets was not compiled with --enable-webview or wxWebView developer package is not installed, wxWebView will NOT be available

After installing the libwxgtk-webview3.0-gtk3-dev package, this error no longer occurs.

I would propose changing the asdf Erlang installation instructions for Ubuntu 20.04 from

If you want to install all the above: apt-get -y install build-essential autoconf m4 libncurses5-dev libwxgtk3.0-gtk3-dev libgl1-mesa-dev libglu1-mesa-dev libpng-dev libssh-dev unixodbc-dev xsltproc fop libxml2-utils libncurses-dev openjdk-11-jdk

to

If you want to install all the above: apt-get -y install build-essential autoconf m4 libncurses5-dev libwxgtk3.0-gtk3-dev libwxgtk-webview3.0-gtk3-dev libgl1-mesa-dev libglu1-mesa-dev libpng-dev libssh-dev unixodbc-dev xsltproc fop libxml2-utils libncurses-dev openjdk-11-jdk

Note the addition of the libwxgtk-webview3.0-gtk3-dev package.

About this issue

  • Original URL
  • State: open
  • Created 3 years ago
  • Reactions: 36
  • Comments: 16 (3 by maintainers)

Commits related to this issue

Most upvoted comments

I was able to get things working by building wxWidegts from the source using the following:

git clone git@github.com:wxWidgets/wxWidgets.git
cd wxWidgets
git submodule update --init src/png
git submodule update --init src/jpeg
./configure --with-cocoa --prefix=/usr/local --enable-webview --enable-compat28 --with-macosx-version-min=11.3
make
sudo make install

Note: I’m installing on macOS here. Thus, please update the configure options for your OS.

After getting wxWidgets properly installed, I was able to successfully get Erlang 24.0.1 installed with asdf by doing the following:

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-wx-config=/usr/local/bin/wx-config \
                               --without-javac \
                               --without-jinterface \
                               --without-odbc"

Note: I recommend adding environment variables to your .zshrc or another file that gets initialized when starting your terminal. Please don’t forget to update these options as necessary for the following:

–with-ssl=<needs base install directory> –with-wx-config=<needs absolute path to executable>

Finally, update package registry and install Erlang 24.0.1

asdf plugin-update --all
asdf install erlang 24.0.1

I use Manjaro linux and had the same problem. I solved with: pamac build wxgtk2-dev

Related: I updated the wiki to include instructions for Arch Linux users. It’s essentially the same strategy proposed here but with the AUR and Arch packages.

For what it’s worth, I got this working by following the original suggestion. I am using WSL2 on Windows with the Ubuntu distribution (20.04.3 LTS). I already had Erlang installed with asdf and thus got the error reported in the original issue. So, I ran the following:

sudo apt install libwxgtk-webview3.0-gtk3-dev
asdf uninstall erlang 24.2
asdf install erlang 24.2

Everything worked fine during the installation. I am even able to run :observer.start() in iex and the GUI opens up from WSL2 in Windows!

Great, on Linux (using Archlinux) I believe the above should be fine, but I didn’t do the export part and it worked fine.

I also removed any reference to darwin/mac and it worked great. 🚀

basically this:

git clone git@github.com:wxWidgets/wxWidgets.git
cd wxWidgets
git submodule update --init src/png
git submodule update --init src/jpeg
git submodule update --init 3rdparty/catch
./configure --prefix=/usr --enable-webview --enable-compat28 # double check your distro, this works son arch
make # you might want to do `make -j4` where 4 is the number of cores
sudo make install

I ended up having to install libwebkit2gtk-4.0-dev per here, recompiling wxwidgets w/ the webview flags after installing that, copying the wx-config to /usr/local/bin/, and running the asdf compile with the following flags (again Ubuntu 20.04)

KERL_USE_AUTOCONF=0 KERL_CONFIGURE_OPTIONS="--enable-wx --with-wx --enable-webview --with-wx-config=/usr/local/bin/wx-config" asdf install erlang

I’m no longer getting the error

For MacOS Big Sur 11.6 run brew install wxwidgets

Cool. Thanks a lot!

I needed to add:

git submodule update --init 3rdparty/catch

to what you wrote.

My server is running 16.04 and libwxgtk-webview3.0-gtk3-dev doesn’t seem to have been available, but installing libwxgtk-webview3.0-dev seems to have fixed this for me.

Precision on @fabramosdev comment

I use Manjaro linux and had the same problem. I solved with: pamac build wxgtk2-dev

If you have installed wxgtk3 you’ll need wxgtk3-dev but solution works

I ended up having to install libwebkit2gtk-4.0-dev per here, recompiling wxwidgets w/ the webview flags after installing that, copying the wx-config to /usr/local/bin/, and running the asdf compile with the following flags (again Ubuntu 20.04)

KERL_USE_AUTOCONF=0 KERL_CONFIGURE_OPTIONS="--enable-wx --with-wx --enable-webview --with-wx-config=/usr/local/bin/wx-config" asdf install erlang

I’m no longer getting the error

Just did the same workaround as pointed by @BobbyMcWho on Pop!_OS 21.04 and finally got it to work after many tries!

Unfortunately, installing libwxgtk-webview3.0-gtk3-dev doesn’t seem to be sufficient in Ubuntu 18.04. I should probably update to Ubuntu 20.04 anyway!