Alo Sarv
lead developer

Donate via
MoneyBookers

Latest Builds

version 0.3
tar.gz tar.bz2
Boost 1.33.1 Headers
MLDonkey Downloads Import Module Development
Payment completed
Development in progress.
Developer's Diary
irc.hydranode.com/#hydranode

Friday, May 06, 2005

Another 2 days spent on build system stuff

Yeap, you read it correctly. Two full days fighting with auto-tools. One of the goals was to be able to use Boost libraries found on system instead of built-in - the built-in-boost support was originally neccesery, since at the time, Boost wasn't available widely yet (or I simply wasn't aware it was). Anyway, I know at least FC3, Debian and Gentoo have Boost libraries available, so ...

Getting autoconf/automake to do what I needed wasn't trivial at all, entire yesterday went to fighting with it on the topic, and I finally managed to resolve it early today morning ("morning" as relative term, e.g. when I woke up). After several more hours of tuning, configure now properly detects boost libraries installed on system, their version, and links against them. There are some limitations tho.

Namely, boost libraries usually come in 4 different configurations - single-thread and multi-thread debug/release variants. Now, the library names are mangled accordingly, e.g. libboost_thread-gcc-mt-d-1-32.so stands for multi-thread debug version 1.32. However, only distro I'v seen so far that get's it right and has properly manged names is Debian. FC3 doesn't use any mangling, and Gentoo is hopeless - they have Boost 1.31 in portage (insufficient for hydranode), and masked 1.32 lacks boost_thread library completely. And it doesn't use mangled names either.

The bottom line is, I can't request the version of boost of my choosing, which can introduce problems, namely, if some distro decides to ship single-thread lib... or when I want to build against debug versions ... but since there's nothing we can do about it, I'm simply linking with -lboost_filesystem, and hope for the best...

It is also now possible to use built-in zlib files if zlib is not found on system (helps for mingw for example).

Madcat.

PS: Thanks for the patch & link on last blog post ;) Useful stuff to know.



Comments:
mldonkey has a solution to those that dont have or want to install ocmal, it downloads and installs ocmal in the source directory and creates a static binary, this may be a solution that allows you to control results if boost isnt present ( instead of bundling boost when users too much ), this might be a hack but it works ( another reason why static is worth is )
 
Already done.
 
boost in gentoo does have the thread library: you need to have 'threads' in your useflags.
 
Yeah you simply add something like:
~dev-libs/boost-1.32.0 ~arch
in your /etc/portage/package.keywords and use "threads" useflag (global in make.conf or dev-libs/boost threads in your /etc/portage/package.use)
 
Post a Comment



<< Home

This page is powered by Blogger. Isn't yours?