Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site













SourceForge.net Logo

U++ POSIX/X11 Tarball Installation

Standard POSIX/X11 distribution of U++ comes as a source tarball. If you want to run U++ graphical environment (theide) or run U++ command line builder (umk), you will first need to compile and install U++.


Table of contents

 

1. Build Requirements

2. Compile U++ source code

3. Advanced installation

4. Additional dependencies

   4.1 OpenGL

5. Troubleshooting

6. U++ spec file for rpm based distribution

 


1. Build Requirements

Before compiling U++ source code, you must install a few development packages. Many POSIX/X11 distributions provides development packages with the same names. Sometimes, development package names don't match. You will have to find the corresponding names for your distribution.

Build requires per distribution

Debian/apt-get based distributions

Build requirements are listed with corresponding apt-get command in the 'buildrequires.debian' file in the U++ tarball. You can install them using

sudo sh buildrequires.debian

 

Fedora/yum based distributions

Build requirements are listed with corresponding yum command in the 'buildrequires.fedora' file in the U++ tarball. You can install them using

sudo sh buildrequires.fedora

 

Other rpm based distributions

Redhat 7 build requires:  gtk3-devel pango-devel atk-devel cairo-devel libnotify-devel freetype-devel expat-devel bzip2-devel

OpenSuse build requires: gtk3-devel pango-devel atk-devel cairo-devel libnotify-devel xorg-x11-devel freetype2-devel libexpat-devel libbz2-devel

BSD based distributions

Build requires: bash gmake gtk3 freetype2 libnotify clang-devel (e.g. clang++)

How to install them:

if sudo is available and enabled on your distribution, copy/paste this in a terminal:

sudo pkg install bash gmake gtk2 freetype2 libnotify clang-devel

if sudo is not available:

su -m root -c 'pkg install bash gmake gtk2 freetype2 libnotify clang-devel'

 


2. Compile U++ source code

Standard U++ compilation

First, uncompress U++ source tarball and change dir to the new created directory.

Example (for upp-x11-src-10641.tar.gz):

version=10641

tar zxvf upp-x11-src-$version.tar.gz

cd upp-x11-src-$version

Use 'make' to compile U++ and generate theide (U++ integrated development environment) and umk (command line tool for building U++ projects) then run 'make install' to prepare standard U++ environment:

make

make install

Now you can start playing with U++ by invoking ~/theide.

You might want to put theide and umk elsewhere later, e.g. inside ~/bin/ for example

Note:. 'make install' copy theide and umk in your home directory but it also:

create ~/upp directory to store U++ library sources and copy the U++ sources inside

create ~/upp/MyApps to store your application sources

create ~/upp.out as output for intermediate files

set up a few variables in the '~/.upp' directory. Those variables are required by umk and theide

If you only want to build umk or theide, run make with the corresponding target:

make umk

# or

make theide

 


3. Advanced installation

You can install umk and theide like most other POSIX project do. If make detects that you has defined the prefix variable, it will switch to standard POSIX installation mode. Example:

make

make install prefix="/usr"

You can also use several other standard installation variables in this installation mode: 'DESTDIR', 'bindir', 'datadir', 'mandir', and 'docdir'.

 


4. Additional dependencies

4.1 OpenGL

To develop application that needs to use 3D graphics you should download following packages for your distribution:

libgtkglext1-dev # Debian like distribution

 


5. Troubleshooting

Compilation doesn't work, because I have old compiler version. What should I do?

If your POSIX/X11 distribution use an old gcc version (< 4.9), U++ compilation will fail because of missing gcc c++11 standard implementation. To solve this, you need to install and use clang++ compiler instead of g++.

Make search for g++ first and if gcc version is too old, it will automatically search for clang++ and then for any compiler named 'c++'. If you still need to force clang++ as default compiler or if clang++ is not in your path or if you want to use another compiler, you can run make with the CXX parameter. Example:

make CXX="/home/user/my-clang-install-dir/clang++"

make install

I use make on BSD operating like system and the compilation fail. What should I do?

On BSD based distributions, if you use make instead of gmake, U++ compilation will fail because BSD 'make' needs four dollars ('$$$$') to escape one. To solve this, you can install gmake or you can run make with an extra parameter if you use a recent U++ snapshot. Example (for bash shell):

make 'Dollar=$$$$'

make install

Those file names are already escaped for gmake. This is why they already use two dollars (Dollar = $$).

I compiled my app, but the debugger (GDB) doesn't start. How can I fix this?

You should install GDB package and make sure it is in your system path. You can check if it is install correctly by running following command in your terminal:

which gdb

It should returns valid GDB path like '/usr/bin/gdb'.

 


6. U++ spec file for rpm based distribution

There is an alternative way to build U++ on rpm based distributions. Indeed, U++ POSIX/X11 tarball contains a spec file for you to build a standard rpm binary and source file. To do that, first install U++ build requires and rpm-build then build U++:

Fedora based distributions

If sudo is available and enabled on your distribution, copy/paste this in a terminal (don't forget to modify the version number accordingly):

sudo yum install  gtk2-devel  pango-devel  atk-devel  cairo-devel  libnotify-devel  bzip2-devel xorg-x11-server-devel  freetype-devel  expat-devel

 

sudo yum install  rpm-build

version=10641

rpmbuild -ta upp-x11-src-$version.tar.gz

If sudo is not available:

su -c 'yum install  gtk2-devel  pango-devel  atk-devel  cairo-devel  libnotify-devel  bzip2-devel xorg-x11-server-devel  freetype-devel  expat-devel'

 

su -c 'yum install  rpm-build'

version=10641

rpmbuild -ta upp-x11-src-$version.tar.gz

 

Note: the rpm binary doesn't install U++ source in your home directory nor does it create needed configuration for U++ command line tool (umk) after installation. TheIDE will take care of all this on first start.

Do you want to contribute?