I’m currently setting up my dev-env after reinstalling macOS. On installing Erlang via ASDF I get the following warnings:
[asdf-erlang] ⚠️ Warning: fop is optional and not installed. Please install it using 'brew install fop'.
[asdf-erlang] ⚠️ Warning: unixodbc is optional and not installed. Please install it using 'brew install unixodbc'.
[asdf-erlang] ⚠️ Warning: openjdk is optional and not installed. Please install it using 'brew install openjdk'.
[asdf-erlang] ⚠️ Warning: wxmac is optional and not installed. You can install it using 'brew install --build-from-source wxmac'.
It says they’re optional and has installed successfully but I don’t seem to recall the same warning last time I installed Erlang so curious what others think.
Here’s the rest of the output:
$ asdf install erlang 28.1.1
[asdf-erlang] ⚠️ Note: wxmac is required for building Erlang/OTP with a working :observer
[asdf-erlang] 🛟 Added unixodbc to KERL_CONFIGURE_OPTIONS: --with-odbc=/opt/homebrew/opt/unixodbc
[asdf-erlang] 🛟 No CC found. Setting CC to: /usr/bin/clang -I/opt/homebrew/opt/unixodbc/include
[asdf-erlang] 🛟 No LDFLAGS found. Setting LDFLAGS to: -L/opt/homebrew/opt/unixodbc/lib
[asdf-erlang] 🛟 Added openssl to KERL_CONFIGURE_OPTIONS: --with-ssl=/opt/homebrew/opt/openssl@3
[asdf-erlang] 🛟 OpenJDK has been added to PATH for this terminal session: /opt/homebrew/opt/openjdk/bin
[asdf-erlang] Please ensure this is included in your shell's dot files (.zshrc, .bashrc, etc.)
[asdf-erlang] 📦 Building with KERL_CONFIGURE_OPTIONS= --with-odbc=/opt/homebrew/opt/unixodbc --with-ssl=/opt/homebrew/opt/openssl@3
[asdf-erlang] ❄️ No kerl installation to cleanup for asdf_28.1.1
[asdf-erlang] ❄️ No kerl build to cleanup for asdf_28.1.1
Downloading (from GitHub) Erlang/OTP 28.1.1 to /Users/Aston/.asdf/downloads/erlang/28.1.1...
Extracting source code for normal build...
Building (normal) Erlang/OTP 28.1.1 (asdf_28.1.1); please wait...
Initializing (build) log file at /Users/Aston/.asdf/plugins/erlang/kerl-home/builds/asdf_28.1.1/otp_build_28.1.1.log.
APPLICATIONS DISABLED (See: /Users/Aston/.asdf/plugins/erlang/kerl-home/builds/asdf_28.1.1/otp_build_28.1.1.log)
* jinterface : No Java compiler found
* odbc : ODBC library - header check failed
APPLICATIONS INFORMATION (See: /Users/Aston/.asdf/plugins/erlang/kerl-home/builds/asdf_28.1.1/otp_build_28.1.1.log)
* wx : wxWidgets was not compiled with --enable-webview or wxWebView developer package is not installed, wxWebView will NOT be available
* wxWidgets must be installed on your system.
* Please check that wx-config is in path, the directory
* where wxWidgets libraries are installed (returned by
* 'wx-config --libs' or 'wx-config --static --libs' command)
* is in LD_LIBRARY_PATH or equivalent variable and
* wxWidgets version is 3.0.2 or above.
Erlang/OTP 28.1.1 (asdf_28.1.1) has been successfully built.
👷🏼 kerl install asdf_28.1.1 /Users/Aston/.asdf/installs/erlang/28.1.1
🧹 Cleanup kerl build asdf_28.1.1
Cleaning up compilation products for 'asdf_28.1.1' under:
- /Users/Aston/.asdf/plugins/erlang/kerl-home/builds...
- /Users/Aston/.asdf/downloads/erlang/28.1.1...
... done.
🔗 Linking app executables /Users/Aston/.asdf/installs/erlang/28.1.1
👍 Installed erlang 28.1.1
I used to install fop for the documentation, but since I don’t rely on it anymore (except the online one) I don’t, so don’t care about that warning
Similar goes to unixodbc: I used to install it to have it locally for a bit of testing, but these days don’t rely on it, so don’t care about that warning (if you want ODBC “support”, though, you’ll probably need to install it, or something equivalent)
wxmac (not sure if that’s the name I remember) is useful for GUI stuff like the Observer and Debugger, so that I keep installing locally (but I use wxwidgets — Homebrew Formulae, so not sure if it’s related to the same thing or not)
… looked at my ~/.kerlrc as a refresher and apparently I still set CFLAGS=“$CFLAGS -I/usr/local/odbc/include” and LDFLAGS=“$LDFLAGS -L/usr/local/odbc/lib” so it’s possible it works even if I don’t use it.
The other flags I use are:
--enable-debug
--disable-dynamic-ssl-lib
--enable-darwin-64bit
--with-ssl=/opt/homebrew (by default I think the “best” version is picked for your system / Erlang version)
All in all, looking at your entire output I’d say it’s working as expected (and the comments can be ignored), though some support might be only partial. e.g. if you run observer:start(). from an Erlang shell and Observer pops up you should be good to go.
I tried updating my asdf emacs from 27.1.2 to 28.1.1 but then wx-widgets failed to work. It couldn’t fund wxe_server. Removing 28.1.1 and reinstalling 27.1.2 didn’t help.
What I had to do was to revert to using brew erlang instead. It also complained about wx but after reinstalling wxwidgets it worked and I could also upgrade to 28.1.2.
I have no idea what is going on but it seems to work now.
Glad it’s working now but have you considered doing a clean macOS install? I do these periodically around every second release of each new macOS (if I am upgrading to it). Sometimes I’ll leave it a few years.
I find reinstalls from scratch (so not importing via their migration tool) gives you a fresh clean system and can sometimes breathe life into an older machine
I guess you maybe really want to build from source, but you can also get pre-built binaries which install in seconds (I prefer to install these with Mise instead of asdf)
Unfortunately I can’t do a clean macos install, I have way too much on my disc. With the second one do I need to wipe what I have in brew? For some reason I was getting problems with asdf not being able to find brew wxwidgets. I will just leave it as it is, as it seems to work.
If you want to carry out a safe experiment leaving your main Mac’s drive intact you could either use a spare SSD (or buy a new one - just make sure it’s as big as your Mac’s drive) and install macOS on it, then boot up from it and then basically ‘reinstall’ all your apps, files, dev-env on that. That way if it doesn’t work out you can just unplug it and boot up from your original drive which will still have everything as you left it.
If you do a clean install, then yes, everything in your dev environment (including home-brew and whatever it has set up) will be deleted - you’ll essentially be starting afresh. However if you start by doing this on a bootable external drive (as above) then that would be a safe way to experiment and make sure you’ve got it right before doing the same on your Mac’s drive.
If you decide to do it but want someone to double check what you’re doing just let me know