DEV Community

Gary Kramlich
Gary Kramlich

Posted on • Originally published at patreon.com

Building and Running Pidgin and Finch 3

This article was originally posted on Patreon and has been brought over here to get all of the Pidgin Development/History posts into one single place.

People keep asking me for instructions on how to build and run Pidgin 3 and I've been hesitant to say the least to do so. So that's where this blog post kind of comes in. This post is going to run you through building and running, but it's not going to explicitly cover stuff like dependencies.

Dependencies

We are constantly tweaking the dependencies and the versions which we depend on. If we create a list, all we're going to end up doing is creating a broken list of dependencies that's going to lead to more support requests. However, you can use our Ansible roles to help you get the bulk of them. Keep in mind that this list is not exhaustive as some of the dependencies are installed via other roles.

And before I provide the link, note that we are NOT currently targeting any long term support distributions. If you're running Debian, you'll need at least testing. When it comes to Fedora, you will need to run the most recent release. These are the systems the developers are using and we are often requiring the versions of dependencies from these distributions.

With all of that out of the way, you can find the list of dependencies here in Ansible format as this is what we use to update our build agents.

Development Environments

Historically when you're building software you need to install it before you can run it. A while back Meson added support for development environments (aka devenv's). These allow us to run pidgin3 and finch3 from the build directory without installing, which saves a TON of development time!

The rest of this section gets a bit technical on how everything actually works, so if you're not concerned with that and just want to know how to build and run pidgin3 or finch3 you can skip the rest of this section.

Devenvs can either create an interactive shell or run a program with all sorts of information about the project. For example, the parent directory of every executable in the project will end up in your PATH environment variable. Which means you can launch anything from the devenv without specifying the path to it.

The same will be done with LD_LIBRARY_PATH, DYLIB_LIBRARY_PATH, and DLL_PATH, on the respective systems so you don't need to worry about that at all either.

As devenvs update environment variables, we added support GPlugin to be able to add plugin search paths via environment variables. Pidgin, Finch, and libpurple all have their own specific environment variables they use to tell GPlugin to look at. With that step out of the way, every plugin in our build now updates the appropriate environment variable so that when you run from the devenv, everything is just found.

Getting the Source Code

As Pidgin3 and Finch3 are still in development, there are no release files to download. At some point we plan to have development builds available, but we don't have those yet. So in the mean time you're going to need to get the development code and build it yourself.

There are two ways you can do this. The first is to download a snapshot of the repository and the second is to clone the repository. If you are just looking and not really considering contributing, you can download a tarball from here.

If you're considering contributing or are going to be checking back in often, it'd be much easier to clone the repository. We use Mercurial for our version control, so you'll need to have that installed, but then you can use the following command to clone the repository.

hg clone https://keep.imfreedom.org/pidgin/pidgin
Enter fullscreen mode Exit fullscreen mode

You can find more information about using Mercurial in our Contributing Guide.

Setup

Similar to autotools and CMake, Meson needs to find all of the dependencies to generate the build system. It does this via the meson setup command. But Meson also requires you to use a separate build directory. So to run a default setup and create a build directory named build, you would run the following command from the top level of the source directory.

meson setup build
Enter fullscreen mode Exit fullscreen mode

If you have all the dependencies you're good to go, but if you're missing something, Meson will tell you now as it will fail to generate the build directory.

Like most build systems, Meson also supports parameters to the build. One in particular you may be interested in is building the documentation. We turn this off by default as it's rather time consuming to build and generally speaking we don't have to modify the documentation often. But if you want to turn it on, you can either do it as part of your initial meson setup command if you don't have a build directory or in an existing directory with the following commands respectfully.

meson setup build -Ddoc=true

meson configure -Ddoc=true
Enter fullscreen mode Exit fullscreen mode

Now that you have your build system all generated you can go ahead and build everything. By default Meson will use Ninja as the build tool. Ninja is similar to Make but much much faster. You can also generate additional build systems but that's outside of the scope of this post.

From the build directory, you just need to type ninja to run the build. If everything built fine, you should see something similar to the output below.

[921/921] Generating doc/reference/libpurple/libpurple-doc with a custom command
Enter fullscreen mode Exit fullscreen mode

If you see an error, sorry about that, we try to keep the code compiling, but we are human after all and do make mistakes some times, so feel free to contact us via Contact Methods and let us know!

If everything looks fine, you're ready to move on to running!!

Running

Pidgin3 and Finch3 are generally in some sort of disarray at any point in time. Likewise, we generally do NOT want bug reports for these things. Usually we're aware of them haven't fixed them yet for any myriad of reasons, but the most typical one is that we had to break something to fix something else and we just haven't gotten back to fixing it yet. With that out of the way, let's get to running!!

The easiest way to run either pidgin3 or finch3 is to use the aforementioned devenv. To do that you can use either of the following commands from your build directory.

meson devenv pidgin3

meson devenv finch3
Enter fullscreen mode Exit fullscreen mode

And that's it! We highly recommend running pidgin3 and finch3 this way as everything shuold just work this way! It also keeps your systems nice and clean and avoids a whole lot of time copying files around when installing!

I hope you're enjoying these posts! Remember they go live for patrons at 9AM CST on Mondays and go public at 12AM CST on Thursdays! If there's something specific you'd like to see me cover here, please comment below!

Top comments (0)