Skip to content

Instantly share code, notes, and snippets.

@bryanhuntesl
Created November 6, 2017 12:19
Show Gist options
  • Save bryanhuntesl/9e46d88cb9da88d43a0446ff3fc43ceb to your computer and use it in GitHub Desktop.
Save bryanhuntesl/9e46d88cb9da88d43a0446ff3fc43ceb to your computer and use it in GitHub Desktop.
Dockerfile to build erlang with wx on Ubuntu xenial
FROM ubuntu:xenial AS apt_builder
RUN apt-get update -y && apt-get install -y curl autoconf autoconf2.59 build-essential curl default-jdk devscripts flex git libncurses5-dev libwxbase3.0-dev libwxgtk3.0-dev unixodbc-dev wx-common xsltproc
ARG otp_github_url="https://github.com/erlang/otp"
ARG otp_tag="OTP-20.1.2"
ENV OTP_GITHUB_URL $otp_github_url
ENV OTP_TAG $otp_tag
WORKDIR /root/
RUN apt-get -y install libssl-dev libxml2-utils chrpath libsctp-dev
RUN echo "url: ${OTP_GITHUB_URL}/archive/${OTP_TAG}.tar.gz" && curl -L "${OTP_GITHUB_URL}/archive/${OTP_TAG}.tar.gz" -o ./${OTP_TAG}.tar.gz
RUN mkdir otp && tar zxvfp ./${OTP_TAG}.tar.gz -C otp --strip-components=1
WORKDIR /root/otp
RUN ./otp_build autoconf && ./otp_build configure && ./otp_build boot -a && ./otp_build release -a
@bryanhuntesl
Copy link
Author

bryanhuntesl commented Nov 6, 2017

Example of building it -

docker --debug build --build-arg otp_github_url="https://github.com/erlang/otp" --build-arg otp_tag="OTP-20.1" .

@nivertech
Copy link

nivertech commented Nov 6, 2017

I installed all the deps, but still getting wx will not be useable:

sudo apt-get install -y curl autoconf autoconf2.59 build-essential curl devscripts flex git libncurses5-dev libwxbase3.0-dev libwxgtk3.0-dev unixodbc-dev wx-common xsltproc
sudo apt-get -y install libssl-dev libxml2-utils chrpath libsctp-dev 
*********************************************************************
**********************  APPLICATIONS INFORMATION  *******************
*********************************************************************

wx             : Can not link the wx driver, wx will NOT be useable

*********************************************************************

And this is what I get when using latest Erlang Solutions binary:

$ erl
Erlang/OTP 20 [erts-9.1] [source] [64-bit] [smp:4:4] [ds:4:4:10] [async-threads:10] [hipe] [kernel-poll:false]

Eshell V9.1  (abort with ^G)
1> observer:start().
{error,{{load_driver,"symbol _ZThn704_N17wxGenericListCtrl31GetSizeAvailableForScrollTargetERK6wxSize, version WXU_3.0 not defined in file libwx_gtk2u_core-3.0.so.0 with link time reference"},
        [{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,98}]},
         {wx_object,init_it,6,[{file,"wx_object.erl"},{line,372}]},
         {proc_lib,init_p_do_apply,3,
                   [{file,"proc_lib.erl"},{line,247}]}]}}

=ERROR REPORT==== 6-Nov-2017::14:42:26 ===
WX Failed loading "wxe_driver"@"/usr/lib/erlang/lib/wx-1.8.2/priv" 
2> 

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment