Question

I'm trying to compile linphone on mountain lion. I have downloaded the sources and followed all the instructions in the README.macos file. The first time, when I got to '$ port install ige-mac-integration' an error occurred. It said gtk2 had to be installed with x11, however, the instructions said to install it with quartz and no_x11. I tried installing gtk2 again, this time with x11, but when I get to the compiling process it tells me quartz is needed. I can't install both, because the gtk2 installation will complain about it, and it seems I need both to complete the entire process of installing and compiling linphone.

I have tried these steps with the downloadable sources, as well as the git sources, both gave me the same problems. Linphone does not have a forum, so I couldn't ask it on their site.

I just need to get the sources and start using them, so any recommendations on how to open the linphone source, edit it, and compile/run it would be very welcome. The ideal situation would be where I can just open an xcode project file.

This is the readme file:

**********************************
* Compiling linphone on macos X  *
**********************************

You need:
 - Xcode (download from apple or using appstore application)
 - Macports: http://www.macports.org/
   Download and install macports using its user friendly installer.

- Install build time dependencies
 $ port install automake autoconf libtool intltool

- Install some linphone dependencies with macports
 $ port install speex
 $ port install libosip2 # WARNING: currently outdated in macport
 $ port install libeXosip2 #WARNING: currently outdated in macport
 $ port install ffmpeg-devel
 $ port install libvpx

- Install srtp (optional) for call encryption
 $ port install srtp
 If that fails, get from source:
 $ git clone git://git.linphone.org/srtp.git
 $ cd srtp && autoconf && ./configure --prefix=/opt/local && make libsrtp.a
 $ sudo make install

- Install zrtpcpp (optional), for unbreakable call encryption
 $ port install cmake
 $ git clone git://git.linphone.org/zrtpcpp.git
 $ cd zrtpcpp && cmake -Denable_ccrtp=false . && make
 $ sudo make install

- Install gtk. It is recommended to use the quartz backend for better integration.
 $ port install gtk2 +quartz +no_x11
 $ port install hicolor-icon-theme

- Compile and install the tunnelsu

If you got the source code from git, run ./autogen.sh first

Then or otherwise, do:

 $ ./configure --prefix=/opt/local && make && sudo make install


- Compile linphone

If you got the source code from git, run ./autogen.sh first.

Then or otherwise, do:

 $ ./configure --prefix=/opt/local --with-readline=/opt/local --disable-strict --disable-x11 --with-srtp=/opt/local --with-gsm=/opt/local --enable-zrtp && make

Install to /opt/local

 $ sudo make install 

Done.

If you want to generate a portable bundle, then install gtk-mac-bundler.
Use git:
 $ git clone https://github.com/jralls/gtk-mac-bundler.git 
 $ cd gtk-mac-bundler && make install
 $ export PATH=$PATH:~/.local/bin
 #make this dummy charset.alias file for the bundler to be happy:
 $ sudo touch touch /opt/local/lib/charset.alias

Then run, inside linphone source tree:
 1. Run configure as told before but with "--enable-relativeprefix" appended.

 $ make
 $ make bundle

The resulting bundle is located in linphone build directory, together with a zipped version.

For a better appearance, you can install the gtk-quartz-engine (a gtk theme) that make gtk application more similar to other mac applications (but not perfect).

 $ git clone https://github.com/jralls/gtk-quartz-engine.git
 $ cd gtk-quartz-engine
 $ autoreconf -i 
 $ ./configure --prefix=/opt/local && make 
 $ sudo make install

Generate a new bundle to have it included.
Was it helpful?

Solution

Below is the details to configure the dependencies and build linphone.

==============================================================

Step: 1:- Dependency configuration:

I just followed the instruction which is available in "README.macos" upto sqlite3 configuration. I had some problem with dependancies configuration.

  1. Because of macport version, srtp configuration is failed. So I have downloaded "MacPorts-2.1.3-10.8-MountainLion.pkg" and installed manually.

  2. Because of GTK version, libsoup is failed. So I have downloaded "GTK_2.18.5-X11.pkg" and installed manually.

After the manual installation, I have followed "README.macos" again for reconfiguration.

NOTE: Sometime terminal won't recognize "wget". 
  --> Solution: just execute below command.
    echo 'alias wget="curl -O"' >> ~/.bash_profile

Step: 2:- Compile and Install:

I got some problem related to intltool while compiling.
Solution: just I set the path by executing below commands

 export PATH=$PATH:/opt/local/bin
    export MANPATH=$MANPATH:/opt/local/share/man
    export INFOPATH=$INFOPATH:/opt/local/share/info

Now it is successfully compiled and installed.

Step: 3:- Creating bundle to run the app:

Just I followed below commands to make the build.


If you want to generate a portable bundle, then install gtk-mac-bundler.
Use git:
 $ git clone https://github.com/jralls/gtk-mac-bundler.git 
 $ cd gtk-mac-bundler && make install
 $ export PATH=$PATH:~/.local/bin
 #make this dummy charset.alias file for the bundler to be happy:
 $ sudo touch touch /opt/local/lib/charset.alias

Then run, inside linphone source tree:
 1. Run configure as told before but with "--enable-relativeprefix" appended.

 $ make
 $ make bundle

It will create "linphone.app" file in current linphone directory. It will support only for "Mountain Lion".

Step: 4:- Support for lower version: (e.g.: Lion, Snow Leopard...)

We have to configure "libiconv hack" to supporting for lower version

I think it will help you.

OTHER TIPS

I wrote an answer here. It's a bit long but I sincerely hope it is clear enough and will help you. It contains the build settings and other libs you need to include. Cool stuff I didn't need to run the make :)

Best,

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top