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

sergio
In Ruby, I can go: User.find_by(email: "foobar@email.com").update(email: "hello@email.com") How can I do something similar in Elixir? ...
New
skosch
To my knowledge, put_in, Map.update etc. all have the one limitation of not automatically creating intermediate keys when needed (for exa...
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
Fl4m3Ph03n1x
About me? ( if you have nothing better to do than reading about some random guy in the internet :stuck_out_tongue: ) Hello all, this is ...
New
nobody
How to bind a phoenix app to a specific ip address? could not find anything about that, nowhere, unfortunately, but for me this is quite...
New
Lily
In templates/appointment/index.html.eex: <%= for appointment <- @appointments do %> <tr> <td><%= appoi...
New
pmjoe
I have a relationship of love and hate with Elixir. Lots of things are just absolutely right, but there are some things that are kind of ...
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
Qqwy
Original source of discussion: This topic on the Pragmatic Programmers’ Functional Web Development with Elixir, OTP, and Phoenix forum. ...
New
ashish173
I am using Ecto timestamps with postgres, I can see the timestamps() use the :naive_dateime but for my use case I wanted to store the ti...
New

Other popular topics Top

Darmani72
If I have a post route which an argument: post /my_post_route/:my_param1, MyController.my_post_handler How would get the post params ...
New
senggen
Erlang/OTP 25 [erts-13.2.2] [source] [64-bit] [smp:8:8] [ds:8:8:10] [async-threads:1] 15:22:35.803 [error] gen_event {lager_file_backend...
New
gshaw
What is the idiomatic way of matching for not nil in Elixir? E.g., First way: defp halt_if_not_signed_in(conn, signed_in_account) when...
New
vegabook
I’m brand new to Phoenix and I have stripped one of the demo applications to the bone. I just want to get an svg up on the screen. Here i...
New
freewebwithme
Using vs code and installed ElixirLS: support and debugger. And I got an error popped up on start up says Failed to run ‘elixir’ comma...
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
bsollish-terakeet
Credo is smart enough to check for (something like) this: assert length(the_list) == 0 with this response: Checking if an enum is empt...
New
hariharasudhan94
I would like to know what is the best IDE for elixir development?
New
marick
I had some trouble figuring out how to make many-to-many associations work. Once I got it working, I wrote a blog post. Because I’m a nov...
New
jononomo
For some reason my phoenix channels are working for me in my local dev environment, but as soon as I deploy via Docker, I get a 403 error...
New

We're in Beta

About us Mission Statement