Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Building a development environment for Linux [updated 07/06/14]
07-06-2014, 06:37 PM (This post was last modified: 04-17-2016 05:20 AM by micheus.)
Post: #1
Information Building a development environment for Linux [updated 07/06/14]
This document is under update process

I prepared this script based on the steps I needed to build my Linux environment using a "fresh" install of Ubuntu 13.10 32bits (in a VirtualBox). I'm about to prepare two real install for Ubuntu 14.04 32bits and 64bits. If I found anything new I'll update this thread.

Before start
  • we are building a 32bits environment, but we can use the proper libraries to build a 64bits version;
  • the files are download in the Downloads folder under home directory;
  • to install the build files we may need a root access. So, we need include the sudo word before the install command;
  • the sources codes we need will be put/unpacked under ~\src directory.

Let's start downloading and installing some programs/libraries...
  • First of all, if we still don't have a GitHub account, we will need to create one in order to make pushes to the main dev repository. * If we are only building Wings3d then this two initial items can be ignored;
  • After we've created our account, fork the dgud/wings project, don't forget to Generating SSH Keys (help in case of any issue about it) - we do that in the shell prompt (Terminal). It's necessary if we want push changes to our remote repository (on gitHub) as well pull requests to the main project;
  • Download, build and install the Erlang (OTP xx.x Source File). The full instructions to build Erlang can be found here: Building and Installing Erlang/OTP.
    Some packages that are a possible prerequisites in order to build Erlang (they were for me):
    • OpenGL support (Mesa) - I found two links that help me with this: How to Install Mesa (OpenGL) on Linux Mint and How to install OpenGL version 2.0.
    • Autotools
      $ sudo apt-get install build-essential
      $ sudo apt-get install autoconf
      $ sudo apt-get install automake
    • wxWidgets - download the sources and extract them to ~/src and build and install it:
      $ cd ~/src/wxWidgets-3.0.2
      $ ./configure --enable-unicode
      $ make
      $ sudo make install
    • Java-SDK (by now,the minimum requirements is version 1.6, see the building Erlang doc)
      $ sudo apt-get install openjdk-6-jre-headless

      Now we should be able to build and install Erlang
      $ cd ~/src/otp_src_18.3
      $ ./otp_build autoconf
      $ ./configure --enable-threads --disable-hipe --without-termcap
      $ make
      $ sudo make install

  • OpenCL - if the video card installed is a little old and doesn't have support to OpenCL then we'll need to install drivers based on CPU. For that you can check this thread: Making OpenCL features available.
    For video card with OpenCL support we can check these links in accord with its manufacturer:
    For this environment I needed to use it based on CPU, so I download, build and installed the AMD SDK (I build it from Downloads directory since I discarded it after install). We have instructions in the ReadMe.txt file:
    $ cd ~/Downloads/AMD-APP-SDK-v2.9-lnx32
    $ sudo ./
    Everything will be set and you will be informed about the lib location: 32-bit path is :/opt/AMDAPP/lib/x86 (we'll need that soon).
  • Makeself - Make self-extractable archives on Unix to create the installer [optional*]
    $ sudo apt-get install makeself
* These programs are necessary in case we intend to create an installer

Before continue, let's setup the environment variables, alias, etc...
So, we should edit the .bashrc file under home folder using root access:
$ sudo gedit ~/.bachrc
and we have to append the instruction above to the end of the file:
## The changes for Wings3d development environment starts here

alias cds="cd $ROOT_SRC/"
alias cdw="cd $ROOT_SRC/wings"
alias cdws="cd $ROOT_SRC/wings/src"
alias cdwp="cd $ROOT_SRC/plugin_src"
alias cls=clear    ##  For some shell it must be "clear screen"

## For start Wings3d from the shell during test/debug process
# Start and run wings with esdl
alias w1='exec erl -smp -pa ~/source/wings/ebin -run wings_start start_halt ${1+"$@"}'

export PAGER=less
export EDITOR=emacs

export PATH="$ROOT_SRC/rebar":$PATH
export PATH=/usr/local/lib/erlang/erts-7.3/bin/:$PATH

export WINGS_SRC_PATH="$ROOT_SRC/wings"

export OPENCL_DIR="/usr"
* These new parameters will be available after we restart the machine.

Now, we'll start download the sources code we need and build them...
  1. cloning and building rebar (needed to build cl module)
    $ cds
    $ git clone git:// rebar
    $ cd rebar
    $ make
  2. cloning and building cl
    $ cds
    $ git clone git://
    $ cd cl
    $ rebar compile
  3. cloning and building wings
    $ cds
    $ git clone git://
    $ cd wings
    $ make
* The git clone command will be used once (at the first time we "download" the sources codes)

If we want to see appended to the prompt the information about the current branch we are working when we are into a git repository we can add a new export line to the ~/.bashrc file. First of all we check the current string used by the system to build the prompt:
$ echo $PS1 [enter]
for my environment this was the result:
\[\e]0;\u@\h: \w\a\]${debian_chroot:+($debian_chroot)}\u@\h:\w\$
now we use the result to define the override instruction:
export PS1="\[\e]0;\u@\h: \w\a\]${debian_chroot:+($debian_chroot)}\u@\h:\w\$(__git_ps1 '(%s)')$ "
Quote:micheus@ubuntu-VirtualBox:~/src/wings(master)$ _
* More information about this subject: Bash prompt basics and Display git branch

Now we can test Wings3d just using the alias w1 in the prompt and hitting ENTER.

My Wings3D Collection at G+

Forum Jump:

User(s) browsing this thread: 1 Guest(s)