2019-07-08 07:00 PM

Build and install the linphone desktop packages for Ubuntu18.04. Although Belledonne Communications offers also the Fratpak packages of Linphone, but here build linphone desktop latest version from source codes. Avoiding the errors related to the dependence of the other packages, adopted the docker container for linphone-sdk.

Source Codes





Build and Install Environment

Linux 4.15.0-55-generic/Ubuntu18.04


You need to prepare the following package.

Docker CE(linphone-sdk)

Please refer to the following.


Build and Install process

  1. Making the project folder
  2. Make the docker container image for linphone-sdk and run the container of it
  3. Download source codes(git clone)
  4. Making cmake scripts by prepare.py
  5. Build by make command
  6. Install deb packages
  7. Setting the path for binary and library
  8. Start Linphone and check to work correctry

1.Making the project folder

Make the working directry and move to it

$ mkdir ~/build_project
$ cd build_project

2.Make the docker container image for linphone-sdk and run the container of it

Download the docker image and run the container of linphone-sdk, then move into the container shell.

$ docker run --name linphone_desktop -v $PWD:/home/bc -it gitlab.linphone.org:4567/bc/public/linphone-sdk/bc-dev-ubuntu:18.04


Please refer to the docker file for each, the following.


You can check the running containers on another terminal.

$ docker container ls

CONTAINER ID        IMAGE                                                                 COMMAND             CREATED             STATUS                      PORTS               NAMES
xxxxxxxxxxx        gitlab.linphone.org:4567/bc/public/linphone-sdk/bc-dev-ubuntu:18.04   "/bin/sh -c bash"   15 hours ago        Exited (0) 5 hours ago                          linphone-desktop

Following the process of No.3,4 and 5 are implemented in the container.

3.Download source codes(git clone)

Implement the following command in the container

$ cd /home/your_user_name/build_project

$ git clone https://gitlab.linphone.org/BC/public/linphone-desktop.git

$ cd linphone-desktop

4.Making cmake scripts by prepare.py

Making cmake scripts by prepare.py

$ ./prepare.py desktop-rpm -DENABLE_DOC=OFF

Made desktop-rpm folder in linphone-desktop/WORK

But errors will occur if as it is to make.


"%cmake error"


Download the following package, and copy the files in it to docker:/usr/lib/rpm directory. Implement these from another terminal(not implement in the container) .



$ docker cp cmake.prov container_name:/usr/lib/rpm/cmake.prov
$ docker cp cmake.req container_name:/usr/lib/rpm/cmake.req
$ docker cp cmake.attr container_name:/usr/lib/rpm/fileattrs/cmake.attr
$ docker cp macros.cmake container_name:/usr/lib/rpm/macros.d/macros.cmake


"empty error: linphone-minizip-2.2.7/debugfiles.list"

Add the line into the all shell files related to the rpm build in cmake folder



List all files need to modify


Add to the following line

--define '_enable_debug_packages %{nil}' --define 'debug_package %{nil}' \


rpmbuild -ta --clean --rmsource --define "_topdir $RPM_TOPDIR" \
	--define='_localstatedir /var/opt/belledonne-communications' \
        --define '_mandir %{_prefix}' --nodeps --define 'dist .deb' --define '_lib lib' --define '_libdir %{_prefix}/%{_lib}' --define '_buildshell /bin/bash' \
        --define '_enable_debug_packages %{nil}' --define 'debug_package %{nil}' \
	--rmspec /home/bc/WORK/desktop-rpm/Build/bctoolbox/*.tar.gz \

5.Build by make command

Implement make command in the container

$ make

6.Install deb packages

Exit from the container and install deb packages.

$ exit

Made the deb packages in linphone-desktop/WORK/desktop-rpm/rpmbuild/DEBS folder.

In DEBS folder, install the packages.

$ cd WORK/desktop-rpm/rpmbuild/DEBS
$ sudo dpkg -i linphone-*.deb

7.Setting the path for binary and library

Binary Path: /opt/com.belledonne-communications/linphone/bin

Library Path: /opt/com.belledonne-communications/linphone/lib

Export binary path

Add the following line at the tail in .bashrc under home folder.

export PATH=$PATH:/opt/com.belledonne-communications/linphone/bin

Export library path

$ sudo nano /etc/ld.so.conf.d/linphone.conf


Activate library path

$ sudo ldconfig


$ export PATH=$PATH:/opt/com.belledonne-communications/linphone/bin
$ export LD_LIBRARY_PATH=/opt/com.belledonne-communications/linphone/lib

8.Start Linphone and check to work correctry

Run Linphone

$ linphone

Check the functions in the terminal window.

Linphone Main View

Setting Menu(select ALSA)

Next, build and install SIP server flexisip.