Menu

Build and install

Getting the library

The main source of the library is sourceforge, btw if it will be pushed to some distro (or somebody want to let me know about it) inform me to update this page.

From tarball

NOTE(1): As it possible libsxmp follows the stable API, but sometimes, due to the unexpected features there are might be some problems with protocol compatibility, btw I hope sync process solve this things (please report a bug if this stuff doesn't works for you).

NOTE(2): Version naming is a magic thing, but actually there are few rules for libsxmp:
Scheme: BIG_MAJOR.MAJOR.VERSION
BIG_MAJOR will be changed in case of API redesign
MAJOR will be changed in case of big impact of new features and protocol changes
VERSION changes on bugfixes, features, protocol addition doesn't impacts MAJOR versions

Here the last stable version badge:

After unpacking it I recommend to create a symlink:

ln -sf libsxmp-<version> libsxmp

From git

NOTE: Currently there are one mainstream master branch with a lot of unstable commits, it's not ready for production use. Master has a last commits (i'm using git tags (or will use) to mark down a stable version) with a new, usually untested code. Well you are warned.

Clone git tree:

git clone git://git.code.sf.net/p/libsxmp/code libsxmp-code

I recommend to create a symlink i.e.

ln -sf libsxmp-code libsxmp

Dependencies

This library using the external things such as:
1. Data structures
2. S-expression parsing

For this purposes you need to have installed the following libraries (links to sourceforge projects):
[libtdata:wiki:Home]
[libsexpr:wiki:Home]

I recommend use the latest stable versions if you decide to build last stable version, and last git cut in case of git (There projects also my own, and some new unstable features might require the new features from there libraries).

Also you will need:
* libc-devel (libc-dev)
* openssl-devel (openssl-dev) or better libressl-devel (libressl-dev)
* uuid-devel (libuuid-dev)
* pkgconfig

NOTE(ssl): I recommend to use libressl, because with libressl you will not face a memory leaks (no no , there mem leaks goes from openssl (libsxmp is multithreaded library, openssl don't cleaning up some internal stuff, btw you may find a lot ssl cleanup things (I found there stuff after reading openssl source code, but it doesn't help on some openssl versions)))

NOTE(linux distros): libsxmp well tested and seems to be fine on the following distros:
1. Void Linux
2. Debian 7.xx
3. Ubuntu 14.04
4. OpenSuSe (few versions)
5. Slackware

Build and install

Firstly just run:

./autogen.sh

Wait sometime, and now configure the project in your own way:

./configure
The options you may apply:
1. --prefix=<some path> (/usr or /usr/local by default recommend)
2. --enable-build-examples this will turn on examples build if you need this

Finally make:

make
And install it
sudo make install

Include to your own autotools project

If you want to add dependencies for libsxmp in your own project, and you're using autotools, add the following lines to configure.ac:

PKG_CHECK_MODULES(LIBTDATA, [libtdata >= 0.2.2])
PKG_CHECK_MODULES(LIBSEXPR, [libsexpr >= 1.3.1])
PKG_CHECK_MODULES(LIBSXMP, [libsxmp >= 0.4.1])

Sure, you will need to fix up version numbers. And yes, libsxmp uses pkgconfig.

And add the right flags and c flags where you need.

Man pages

Man pages will be installed by default within section number 3. This made to make development more easy.
For each function you will find a manual page.


Related

Wiki: Home