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

quazar
How to set Jason to encode all fields in ecto schema, I don’t care about security and implementing only is taking long list of attributes...
New
sacepums
Hey guys. I'm new to elixir and im really stocked about it. But I ran into a bit of problem - I need to convert a date sting, for examp...
New
chensan
I have a User schema with a :from_id field set to type :string: defmodule TweetBot.Repo.Migrations.CreateUsers do use Ecto.Migration ...
New
rms.mrcs
Hi, I need to transform a list of numbers into a map where the keys are the indexes and the values are the original values of the list....
New
gonzofish
I’m currently trying to understand how to join three tables using Ecto. All the examples I’ve seen use 2, so maybe I’m just missing somet...
New
vonH
When I run the Plug and I recompile I wind up having to use Ctrl C to quit iex and start again. Witht the help of rlwrap I can use the cu...
New
electic
Hi, I am new to Elixir. I am trying to use the DateTime component to insert a date into MySQL however the there seems to be no way to fo...
New
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
romenigld
I am trying to run a deploy with docker and I successfully runned with this command: docker build -t romenigld/blog-prod . but when I t...
New
joeerl
Hello again - after a longish gap I’ve decided I really must dig into Elixir and see what’s been happening here - so I have a few questio...
New

Other popular topics Top

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
albydarned
Hello all! I am typing this post from my new MacBook Pro with the M1 chip. I’m loving it so far, and will probably use it as my daily dr...
New
aalberti333
As the title describes, I’m trying to run Enum.map() over a list of key/value pairs, where the value is a map. My data looks like this: ...
New
sergio
I couldn’t find any guides that worked well with Phoenix 1.6.0 and esbuild. I hope this helps people test the waters and eases you into t...
New
chrismccord
This release brings a number of exciting features, including integration with the new Phoenix LiveDashboard and Phoenix LiveView. There h...
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
ovidiubadita
Hey all, I discovered Elixir and I love it. I always wanted to learn a functional programming and I intended to go for Haskell, but afte...
New
WestKeys
Currently suffering from paralysis by [HTTP client] analysis. This is rather unusual in Elixirland as there tends to be consensus on the ...
New
beno
I will often find my self writing things similar to: case some_value do nil -> something() "" -> something() _ -> someth...
New
9mm
I am constructing a JSON object (map) and I need to conditionally set a field. I’m trying to write proper elixir-way code… and I’m at a l...
New

We're in Beta

About us Mission Statement