Using the Ice-E 3.6.2 Debian Binary Distribution
deb http://emdebian.org/tools/debian/ jessie main
This page provides important information for users of the Ice-E Debian binary distribution.
On this page:
Overview of the Ice-E Debian binary distribution
The Ice-E binary distribution provides packages to develop applications for Debian 8 (jessie) armhf and amd64. The only supported development platform is Debian 8; applications targeting Debian 8 armhf can be cross-compiled using a Debian 8 amd64 system.
Ice-E has been extensively tested on the BeagleBone Black board (Rev C) with the default Debian 8 (jessie) distribution for this board.
DEB packages
ZeroC provides the following DEB packages for Debian 8 (jessie) amd64 and armhf:
Package | Co-installable | Description |
---|---|---|
zeroc-ice-all-dev | no | Meta package that installs the entire Ice dev-kit |
zeroc-ice-all-runtime | no | Meta package that installs the entire Ice run-time, including admin tools and utilities |
libzeroc-freeze3.6 | yes | Freeze for C++ run-time (shared libraries) |
libzeroc-ice-dev | yes | Ice for C++ dev-kit, including the dev-kit forservices such as Freeze, Glacier2 and IceStorm. This dev-kit consists of header files, static libraries and .so symbolic links. |
libzeroc-ice-python2.7 | no | Ice for Python run-time |
libzeroc-ice3.6 | yes | Ice for C++ run-time (shared libraries) |
libzeroc-icestorm3.6 | yes | IceStorm pub-sub service for IceBox C++ |
zeroc-glacier2 | no | Glacier2 firewall-traversal service |
zeroc-ice-compilers | no | Slice compilers: slice2cpp, slice2freeze, slice2py |
zeroc-ice-slice | no | Slice files |
zeroc-ice-utils | no | Ice utilities and admin tools |
zeroc-icebox | no | IceBox server for C++ |
A co-installable package is a package for which you can install several architectures (amd64, armhf...) at the same time.
Installing the Ice-E binary distribution
Installing Ice-E on Debian 8 amd64
Debian 8 amd64 can be used as development platform when targeting Debian 8 amd64 and Debian 8 armhf.
Follow the steps below to install Ice-E on Debian amd64.
1. Add the armhf architecture:
sudo dpkg --add-architecture armhf
2. Install ZeroC's GPG key (otherwise you will get warnings when installing ZeroC packages):
sudo apt-key adv --keyserver hkp://pgp.mit.edu:80 --recv-keys 5E6DA83306132997
3. Add the Ice repository for Debian 8 to your system:
sudo sh -c 'echo "deb [arch=amd64,armhf] http://zeroc.com/download/apt/debian8 stable main" > /etc/apt/sources.list.d/ice.list'
4. Update the package list:
sudo apt-get update
the apt-get update
command will show some warnings for repositories that do not support the newly-added architecture. To avoid these warnings you can edit your repository lists and set the architectures supported by each repository (see "Setting up apt sources" in the Multiarch HOWTO).
5. Install the amd64
packages:
sudo apt-get install zeroc-ice-all-runtime zeroc-ice-all-dev
6. Install the armhf
cross development packages:
sudo apt-get install libzeroc-ice-dev:armhf
Refer to the package summary if you would like to install fewer packages.
Installing Ice-E on Debian 8 armhf
Debian 8 armhf can be used as development platform when targeting Debian 8 armhf. It is however more common to cross-compile on Debian 8 amd64 and target Debian 8 armhf.
Follow the steps below to install Ice-E on Debian armhf.
1. Install ZeroC's GPG key (otherwise you will get warnings when installing ZeroC packages):
sudo apt-key adv --keyserver hkp://pgp.mit.edu:80 --recv-keys 5E6DA83306132997
2. Add the Ice repository for Debian 8 to your system:
sudo sh -c 'echo "deb http://zeroc.com/download/apt/debian8 stable main" > /etc/apt/sources.list.d/ice.list'
3. Update the package list:
sudo apt-get update
4. Install the armhf
run-time packages:
sudo apt-get install zeroc-ice-all-runtime
You can also include the full dev-kit on Debian armhf with:
sudo apt-get install zeroc-ice-all-dev
Refer to the package summary if you would like to install fewer packages.
Setting up your cross development environment to use Ice-E
This section shows how to setup your cross development environment on Debian 8 (Jessie) amd64 for developing applications targeting Debian 8 (Jessie) armhf. The required packages are not included in Jessie so you need to install them from the Debian Cross-toolchains repository.
1. Install Emdebian's key (otherwise you will get warnings when installing the packages):
sudo curl -o /etc/apt/trusted.gpg.d/emdebian-GPG-Key.gpg http://emdebian.org/tools/debian/emdebian-toolchain-archive.key
2. Add the Debian Cross toolchains repository:
sudo sh -c 'echo "deb http://emdebian.org/tools/debian/ jessie main" > /etc/apt/sources.list.d/crosstools.list'
3. Update the package list:
sudo apt-get update
When cross compiling Ice-E applications for Debian 8 armrhf you must use the arm-linux-gnueabihf-g++-4.9
compiler instead of g++
.
Sample compile command:
arm-linux-gnueabihf-g++-4.9 -pthread Hello.cpp
Ice-E applications can link with either the shared Ice libraries or with the static Ice library.
The static Ice library includes the symbols for Ice, IceUtil, IceSSL, IceDiscovery and IceLocatorDiscovery.
Use the following command to link your application with the shared Ice libraries:
arm-linux-gnueabihf-g++-4.9 -o client Hello.o Client.o -Wl,-Bdynamic -lIce -lIceUtil -pthread
Use the following command to link your application with the static Ice library (libIce.a
):
arm-linux-gnueabihf-g++-4.9 -o client Hello.o Client.o -Wl,-Bstatic -lIce -Wl,-Bdynamic -lcrypto -lssl -pthread -lbz2 -ldl -lrt
For applications compiled with --std=c++11
, add ++11
to all library names, for example -lIce++11 -lIceUtil++11
.
Using the Ice-E sample programs
Sample programs are available in a separate GitHub repository. Simply clone this repository and use its 3.6 branch:
git clone -b 3.6 https://github.com/zeroc-ice/ice-demos.git cd ice-demos
The Ice-E demos for C++ and Python are located in the cpp
and python
directories respectively. Review the build instructions for more information.