How to get Erlang to show UI components "debugger" and "observer" on Linux?
Asked Answered
H

4

6

I'm running Kubuntu 15.04 64-bit and trying to get Erlang's 18.1 'debugger' or 'observer' to run (EDIT: from within the shell):

observer:start().
debugger:start().

I get the following error:

{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,96}]},
     {wx_object,init_it,6,[{file,"wx_object.erl"},{line,337}]},
     {proc_lib,init_p_do_apply,3,
               [{file,"proc_lib.erl"},{line,240}]}]}}

ERROR REPORT==== 4-Oct-2015::15:34:01 ===
ERROR: Could not find 'wxe_driver.so' in: /home/howler/erlang/18.1/lib/wx-1.5/priv

I've tried various forums and have followed the prescribed advice concerning wxWidgets but I still can't get it to work?

Does anyone know of a definitive way to solve this problem?

Huehuebner answered 4/10, 2015 at 14:37 Comment(3)
How is Erlang installed? From source or via packages?Sparkie
I've tried from both kerl and by source. From source - nothing more clever than ./configure, ./make, and then ./make installHuehuebner
I use erlang solutions repository and it works ok. I believe you should prefer repository version if you are not sure why don't want it.Bartender
P
3

Easy Way

Adding repository For Erlang Solutions repository using following commands:

wget http://packages.erlang-solutions.com/erlang-solutions_1.0_all.deb
sudo dpkg -i erlang-solutions_1.0_all.deb

Install Erlang:

sudo apt-get update
sudo apt-get install erlang

Test run run erl and call wx:demo()

λ VIDIA ~ → erl
Erlang/OTP 18 [erts-7.1] [source] [64-bit] [smp:8:8] [async-threads:10] [hipe] [kernel-poll:false]

local .erlang loaded
Eshell V7.1  (abort with ^G)
1> wx:demo().
ok
<0.35.0> Closing window 
2> 

Build From Source

apt-get update

Install the build tools (dpkg-dev g++ gcc libc6-dev make)

apt-get -y install build-essential

automatic configure script builder (debianutils m4 perl)

apt-get -y install autoconf

Needed for HiPE (native code) support, but already installed by autoconf

apt-get -y install m4

Needed for terminal handling (libc-dev libncurses5 libtinfo-dev libtinfo5 ncurses-bin)

apt-get -y install libncurses5-dev

For building with wxWidgets

apt-get -y install libwxgtk2.8-dev libgl1-mesa-dev libglu1-mesa-dev libpng3

For building ssl (libssh-4 libssl-dev zlib1g-dev)

apt-get -y install libssh-dev

ODBC support (libltdl3-dev odbcinst1debian2 unixodbc)

apt-get -y install unixodbc-dev

Get Erlang/OTP source files

mkdir -p ~/code/erlang
cd ~/code/erlang
wget http://www.erlang.org/download/otp_src_18.0.tar.gz
tar -xvzf otp_src_18.0.tar.gz
chmod -R 777 otp_src_18.0
cd otp_src_18.0
./configure
make
make install
exit 0

Steps From Bryan Hunter shell script gist

Pandora answered 4/10, 2015 at 22:12 Comment(3)
Works like a charm. It turns out I didn't have some of the dependencies properly installed. I can also now use kerl so I don't have to build from source. Many thanks!Huehuebner
How can I do it with kerl? E.g. this part is not clear for meSplendor
@OlegTarasenko can you try the steps here docs.basho.com/riak/ts/1.3.1/installing/source/erlangPandora
C
2

If someone struggling with this issue in "asdf" version manager in ubuntu then you need to install following packages

sudo apt-get -y install libwxgtk3.0-dev libgl1-mesa-dev libglu1-mesa-dev libpng3

Chladek answered 2/4, 2017 at 5:4 Comment(0)
U
1

Arch Linux users should replace erlang-nox (headless) with the full erlang version. pacman prompts you to do so if you run pacman -S erlang

Undertint answered 13/12, 2018 at 18:46 Comment(0)
S
0

Ubuntu 20.04

Assuming Erlang was installed from the source.

  1. Download wxWidgets.
git clone [email protected]:wxWidgets/wxWidgets.git
cd wxWidgets/
git submodule update --init src/png
git submodule update --init src/jpeg
./configure --prefix=/usr/local enable-webview --with-gtk=3
# git submodule update --init {other_missed_submodules}

which wx-config && wx-config --version-full
# if installation succeeds:
# /usr/bin/wx-config
# 3.0.4.0
  1. Install

sudo apt-get -y install libwxgtk-webview3.0-gtk3-dev

or

sudo 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

  1. Recompile Erlang.
sudu su -
cd {erlang_dir}
./configure && make && make install
Starry answered 9/10, 2023 at 18:21 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.