kesc

kesc

"Can not link wx program" error when installing erlang

I want to use the observer program for my elixir apps.
Off late I am shown this warning when I try to install erlang using asdf

APPLICATIONS INFORMATION (See: /Users/keshav/.asdf/plugins/erlang/kerl-home/builds/asdf_25.3.2.7/otp_build_25.3.2.7.log)
 * wx             : Can not link wx program are all developer packages installed?

Erlang/OTP 25.3.2.7 (asdf_25.3.2.7) has been successfully built
Cleaning up compilation products for 25.3.2.7
Cleaned up compilation products for 25.3.2.7 under /Users/keshav/.asdf/plugins/erlang/kerl-home/builds

And on trying to run observer, I get the error

10:46:25.196 [error] ERROR: Could not find 'wxe_driver.so' in: /Users/keshav/.asdf/installs/erlang/25.3.2.7/lib/wx-2.2.2/priv

{:error,
 {{:load_driver, 'No driver found'},
  [
    {:wxe_server, :start, 1, [file: 'wxe_server.erl', line: 65]},
    {:wx, :new, 1, [file: 'wx.erl', line: 115]},
    {:observer_wx, :init, 1, [file: 'observer_wx.erl', line: 109]},
    {:wx_object, :init_it, 6, [file: 'wx_object.erl', line: 404]},
    {:proc_lib, :init_p_do_apply, 3, [file: 'proc_lib.erl', line: 240]}
  ]}}

Here is the part of logs that I think are wx related

=== Running configure in /Users/keshav/.asdf/plugins/erlang/kerl-home/builds/asdf_25.3.2.7/otp_src_25.3.2.7/lib/wx ===
./configure 'CC=clang' '--enable-darwin-64bit' '--with-ssl=/opt/homebrew/opt/openssl@1.1' --disable-option-checking --cache-file=/dev/null --srcdir="/Users/keshav/.asdf/plugins/erlang/kerl-home/builds/asdf_25.3.2.7/otp_src_25.3.2.7/lib/wx"
checking build system type... aarch64-apple-darwin22.6.0
checking host system type... aarch64-apple-darwin22.6.0
checking target system type... aarch64-apple-darwin22.6.0
checking for gcc... clang
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables... 
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether the compiler supports GNU C... yes
checking whether clang accepts -g... yes
checking for clang option to enable C11 features... none needed
checking for g++... g++
checking whether the compiler supports GNU C++... yes
checking whether g++ accepts -g... yes
checking for g++ option to enable C++11 features... none needed
checking for ranlib... ranlib
checking how to run the C preprocessor... clang -E
configure: Building for darwin22.6.0
checking for mixed mingw-gcc and native VC++ environment... no
checking for mixed cygwin and native MinGW environment... no
checking if we mix cygwin with any native compiler... no
checking if we mix msys with another native compiler... no
checking if we mix WSL with another native compiler... no
checking for stdio.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for strings.h... yes
checking for sys/stat.h... yes
checking for sys/types.h... yes
checking for unistd.h... yes
checking size of void *... 8
checking Checking wxWidgets for min version:... -mmacosx-version-min=14
checking if compiler accepts -ObjC... yes
checking if we can add -fno-move-loop-invariants to CXXNOOPT (via CFLAGS)... no
checking if we can add -fno-var-tracking-assignments to CXXNOOPT (via CFLAGS)... no
checking for GL/gl.h... no
checking for OpenGL/gl.h... yes
checking for GL/glu.h... no
checking for OpenGL/glu.h... yes
checking for wx-config... /opt/homebrew/bin/wx-config
checking for wxWidgets version >= 3.0.2 (--unicode)... yes (version 3.2.3)
checking for wxWidgets static library... no
checking for wxwidgets webview... yes
checking for wx-config... (cached) /opt/homebrew/bin/wx-config
checking for wxWidgets version >= 3.0.2 (--unicode --debug=yes)... yes (version 3.2.3)
checking for wxWidgets static library... no
checking for debug build of wxWidgets... yes
checking for wx-config... (cached) /opt/homebrew/bin/wx-config
checking for wxWidgets version >= 3.0.2 (--unicode --debug=no)... yes (version 3.2.3)
checking for wxWidgets static library... no
checking for standard build of wxWidgets... yes
checking for wxwidgets 3.0 compatibility ... yes
checking for wxwidgets opengl support... yes
checking for GLintptr... yes
checking for GLintptrARB... yes
checking for GLchar... yes
checking for GLcharARB... yes
checking for GLhalfARB... yes
checking for GLint64EXT... yes
checking GLU Callbacks uses Tiger Style... no
checking if we can link wxwidgets programs... no
checking if we can add -Werror=return-type to CFLAGS (via CFLAGS)... yes
checking if we can add -Werror=return-type to CXXFLAGS (via CFLAGS)... yes
configure: creating aarch64-apple-darwin22.6.0/config.status
config.status: creating config.mk
config.status: creating c_src/Makefile
configure: WARNING: Can not link wx program are all developer packages installed?

I have wxwidgets installed from brew

❯ wx-config --list                                                                                                                                                                 

    Default config is osx_cocoa-unicode-3.2

  Default config will be used for output

❯ wx-config --libs                                                                                                                                                                 
-L/opt/homebrew/lib   -framework IOKit -framework Carbon -framework Cocoa -framework QuartzCore -framework AudioToolbox -framework System -framework OpenGL -lwx_osx_cocoau_xrc-3.2 -lwx_osx_cocoau_html-3.2 -lwx_osx_cocoau_qa-3.2 -lwx_osx_cocoau_core-3.2 -lwx_baseu_xml-3.2 -lwx_baseu_net-3.2 -lwx_baseu-3.2

Please help me figure this out.

Marked As Solved

bjorng

bjorng

Erlang Core Team

This problem has been fixed in OTP 26.1.1. We plan to include a backport of the fix in the next emergency patch for OTP 25.

Also Liked

kesc

kesc

:slight_smile: if you see that issue I’d raised a question there way back regarding installation on linux.

In any case, from reading the logs I don’t think the error has to do with the install script not being able to find the wx-config. It has something to do with linking or shared libraries but I don’t have the knowledge to solve that. ie I just tried with the flags --enable-wx and --with-wx-config.

I have tried reinstalling wxwidgets (brew reinstall wxwidgets) but I still get the same error.

jmnda

jmnda

That’s strange. I am a Linux user though, hopefully Mac users here can suggest solutions to your problem.

kesc

kesc

Oh so it is xcode related? I thought this was because of the new Macos and rolled back without any success. Thanks for this effort @bjorng :pray:

Where Next?

Popular in Questions Top

baxterw3b
Hi guys, i’m new in the Elixir world, and i have to say, that i love it! i’m having some problem to understand anonymous functions with ...
New
hariharasudhan94
lets say i have a sample like a = 20; b = 10; if (a > b) do {:ok, "a"} end if (a < b) do {:ok, b} end if (a == b) do {:ok, "equa...
New
lessless
I believe there are people here who are dealing with CSV files import on the daily basis, and since Excel is a really popular tool there ...
New
sergio_101
I am VERY much an elixir newbie. I have taken one elixir course and one phoenix course on Udemy. During that course, I saw the instructor...
New
siddhant3030
Hi, I have to write a raw query for one of my project. But till now I have used ecto queries and don’t have much experience writing raw ...
New
vrod
I am using the Starship cross-shell prompt – it seems pretty nice, but I get some errors: [WARN] - (starship::utils): Executing command ...
New
jason.o
In the code below, if the create action is not set to accept “extra_key” as an input, it errors out with a message shown above. Is there ...
New

Other popular topics Top

Qqwy
Original source of discussion: This topic on the Pragmatic Programmers’ Functional Web Development with Elixir, OTP, and Phoenix forum. ...
New
Brian
What is the proper way to load a module from a file in to IEX? In the python world, doing something like this pretty standard: from ....
New
dogweather
I wrote this comment on r/haskell, and it’s not popular there. :wink: But I think I’m on to something… Haskell reminds me of Java, and e...
New
axelson
This post is a wiki (feel free to hit the edit button near the bottom right of this post to add your own changes!) This post collects co...
239 49266 226
New
AngeloChecked
What learn first? Rust or Elixir Hi Elixir community! I’m here because i want learn a new language. I’m a junior developer and mainly i ...
New
TunkShif
This post is an instruction guide to help you setup your Neovim for Elixir development from scratch. It includes general information on h...
274 42716 114
New

We're in Beta

About us Mission Statement