[erlang-questions] How to get wxerlang working in in Ubuntu 14.04.4 LTS

Boris Mühmer boris.muehmer@REDACTED
Mon Apr 11 10:00:22 CEST 2016


Hello Stefan,

You need to install *libwxbase3.0-dev* and *libwxgtk3.0-dev*.

I also believe You should install *libglu1-mesa-dev*. I have it in my
erlang setup dependency list, but I can not remember why this was needed.
It is possible that the gl demo did not work without it.

But "my dependency list" started with 12.04, and some things were manuall
changed/configured with 14.04. Maybe some things are automatically resolved
now (like libwxgtk3.0-dev automatically includes libwxbase3.0-dev and
libglu1-mesa-dev).


Regards,
Boris

2016-04-11 9:22 GMT+02:00 Stefan Houtzager <stefan.houtzager@REDACTED>:

> Hi,
>
> I would appreciate an installscript for a recent erlang version on Ubuntu
> 14.04.4 LTS with wxerlang working.
>   I am a starting elixir developer (and for that need erlang). I would
> like to get wxerlang working and created a dockerimage to make my
> installation easy portable. I use otp_src_18.3.tar.gz and install several
> wx packages and others, I'm not sure if I miss some or install some that
> are not needed. Anyway, after the install the output of which wx-config
> && wx-config --version-full is
>
> /usr/bin/wx-config
> 2.8.12.1
>
> But wx:demo(). results in an error:
>
> Eshell V7.3  (abort with ^G)
> 1> wx:demo().
> Error: Unable to initialize gtk, is DISPLAY set properly?
> ok
> 2>
>
> The most important installs in the dockerfile (just linux commands after
> the RUN statements, phusion/baseimage:0.9.18 is Ubuntu 14.04.4 LTS reworked
> for docker)  I copied below, the full dockerfile and the logging of the
> output I arttached.
>
>
> FROM phusion/baseimage:0.9.18
> MAINTAINER Stefan Houtzager <stefan.houtzager@REDACTED>
>
> # Important!  Update this no-op ENV variable when this Dockerfile
> # is updated with the current date. It will force refresh of all
> # of the base images and things like `apt-get update` won't be using
> # old cached versions when the Dockerfile is built.
> ENV REFRESHED_AT 05-04-2016
>
> # Set correct environment variables.
>
> # Setting ENV HOME does not seem to work currently. HOME is unset in
> Docker container.
> # See bug : https://github.com/phusion/baseimage-docker/issues/119
> #ENV HOME /root
> # Workaround:
> RUN echo /root > /etc/container_environment/HOME
>
> # Regenerate SSH host keys. baseimage-docker does not contain any, so you
> # have to do that yourself. You may also comment out this instruction; the
> # init system will auto-generate one during boot.
> RUN /etc/my_init.d/00_regen_ssh_host_keys.sh
>
> # Use baseimage-docker's init system.
> CMD ["/sbin/my_init"]
>
> # ...put your own build instructions here...
>
> # Set the locale
> RUN locale-gen en_US.UTF-8
> ENV LANG en_US.UTF-8
> ENV LANGUAGE en_US:en
> ENV LC_ALL en_US.UTF-8
>
> WORKDIR /tmp
>
> # See : https://github.com/phusion/baseimage-docker/issues/58
> RUN echo 'debconf debconf/frontend select Noninteractive' |
> debconf-set-selections
>
> # update and install some software requirements
> RUN apt-get update && apt-get upgrade -y && apt-get install -y curl wget
> git unzip autoconf make g++ gcc fop libxml2-utils xsltproc
>
> WORKDIR /
>
> RUN add-apt-repository ppa:openjdk-r/ppa
> RUN apt-get update && apt-get install openjdk-8-jdk -y
>
> WORKDIR /
>
> # install nano (and pico)
> RUN apt-get update && apt-get install nano -y
>
> # Needed for terminal handling (libc-dev libncurses5 libtinfo-dev
> libtinfo5 ncurses-bin)
> RUN apt-get -y install libncurses5-dev openssl libssl-dev m4
> libncurses-dev libgmp3-dev libglu-dev
>
> # For building with wxWidgets
> RUN apt-get -y install freeglut3-dev wx2.8-headers wx-common libwxbase2.8
> libwxgtk2.8-dev libqt4-opengl-dev libgtk2.0-dev libgl1-mesa-dev
> libglu1-mesa-dev libpng3
>
> # For building ssl (libssh-4 libssl-dev zlib1g-dev)
> RUN apt-get -y install libssh-dev
>
> # ODBC support (libltdl3-dev odbcinst1debian2 unixodbc)
> RUN apt-get -y install unixodbc-dev
> RUN apt-get -y install ncurses-dev
> RUN wget http://www.erlang.org/download/otp_src_18.3.tar.gz
> RUN tar -xvzf otp_src_18.3.tar.gz
> RUN chmod -R 777 otp_src_18.3
> WORKDIR otp_src_18.3
> RUN ./configure
> RUN make
> RUN make install
> RUN cd .. && rm -R otp_src_18.3/
>
> RUN echo "ERLANG_HOME=/usr/local/lib/erlang" >> ~/.bashrc
> RUN echo "export PATH=$PATH:$ERLANG_HOME/bin" >> ~/.bashrc
> RUN echo "export DISPLAY=:100.0" >> ~/.bashrc
>
> RUN apt-get purge --auto-remove openjdk-8-jdk -y
> RUN rm -R /usr/lib/jvm
>
>
> --
> Kind regards,
>
> Stefan Houtzager
>
> Houtzager ICT consultancy & development
>
> www.linkedin.com/in/stefanhoutzager
>
> _______________________________________________
> erlang-questions mailing list
> erlang-questions@REDACTED
> http://erlang.org/mailman/listinfo/erlang-questions
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20160411/9b848d67/attachment.htm>


More information about the erlang-questions mailing list