Errror building libdivecomputer

Lubomir I. Ivanov neolit123 at
Mon Sep 10 04:03:07 PDT 2012

On 10 September 2012 13:18, Menno Bakker <mlabakker at> wrote:
> Hello,
> I am trying to build Subsurface according to the instructions on the
> website, so I started with trying to build libdivecomputer.
> Unfortunately, autoreconf -- install fails with:
> Can't exec "libtoolize": No such file or directory at
> /usr/bin/autoreconf2.50 line 196.
> Use of uninitialized value in pattern match (m//) at
> /usr/bin/autoreconf2.50 line 196.
> src/ Libtool library used but `LIBTOOL' is undefined
> src/   The usual way to define `LIBTOOL' is to add `LT_INIT'
> src/   to `' and run `aclocal' and `autoconf' again.
> src/   If `LT_INIT' is in `', make sure
> src/   its definition is in aclocal's search path.
> autoreconf2.50: automake failed with exit status: 1
> I run Kubuntu 12.04 64-bit, with autoconf and autoconf2.13 installed.
> With only autoconf installed I got the same error.
> I am not a developer or programmer, so I don know how to fix this.
> Can anyone help?
> Kind regards,
> Menno

i've encountered this when trying to build libdivecomputer /
subsurface on debian 6.0.x with libtool 2.2.6b-2
and can honestly say that building on windows was a "breeze" compared to that.

and while my rant against libtool, which is a prehistoric tool for SED
hackers with a subconscious fetishizm for obscure programming
patterns, compensating for the lack of feminine touch with plans of
reproduction, is of infinite length, i propose to you the following
horrible build script :-):

but first open "src/serial_posix.c"

add these 3 lines:

#define __USE_BSD
#define __USE_POSIX199309

#include <sys/ioctl.h>	// ioctl

/* < ---- here */

#include <sys/time.h>	// gettimeofday

don't even ask whats going on here...also mind that "gcc -D.." will
not work due to macro override.

then create a:

# ---------------------------------------------------
# ...file named "" placed in libdivecomputer's root
cd src
rm *.o
mv serial_win32.c serial_win32.c_
gcc *.c -c --std=c99 -I../include
rm ../lib/libdivecomputer.a
ar rcs ../lib/libdivecomputer.a *.o
mv serial_win32.c_ serial_win32.c
cd ..
# ---------------------------------------------------

call "./" from libdivecomputer's root.

if it fails again, please post the error log.


More information about the subsurface mailing list