Problems to compile Subsurface under Ubuntu 10.04 LTS

Mekong Leonidas molon.labe.ch at gmail.com
Mon Jun 25 05:37:45 PDT 2012


Hi everyone.

Just a couple words about myself.
I started to dive when I was 11
I started to work with computers when I was 12
I've been using C for more than 15 years in my life....about 15 years ago
I'm using Linux (unless customer says "no way")

Now...the technical part.

I have the following problems

I'm currently using Ubuntu 10.04 LTS on my main computer

I downloaded libdivecomputer and torvalds-subsurface-058b84c

I managed to resolve all the dependencies, and managed to compile
libdivecomputer without any errors

Here's what I got

sheitan at sheitan-TSH:/usr/local/lib$ ls -las
total 1432
 4 drwxr-xr-x  4 root root    4096 2012-05-13 11:51 .
 4 drwxr-xr-x 10 root root    4096 2012-04-26 09:38 ..
872 -rw-r--r--  1 root root  892588 2012-05-13 11:51 libdivecomputer.a
 4 -rwxr-xr-x  1 root root     999 2012-05-13 11:51 libdivecomputer.la
 0 lrwxrwxrwx  1 root root      24 2012-05-13 11:51
libdivecomputer.so -> libdivecomputer.so.0.0.0
 0 lrwxrwxrwx  1 root root      24 2012-05-13 11:51
libdivecomputer.so.0 -> libdivecomputer.so.0.0.0
540 -rwxr-xr-x  1 root root  552324 2012-05-13 11:51 libdivecomputer.so.0.0.0
 4 drwxr-xr-x  2 root root    4096 2012-05-13 11:51 pkgconfig
 4 drwxrwsr-x  4 root staff   4096 2010-08-16 11:35 python2.6

So, it seems that libdivecomputer is OK

I tried to compile subsurface....ooppss

First, I had to fix the dependencies...OK

But when I launch the "make" command, here's the result

sheitan at sheitan-TSH:~/Documents/Diving/torvalds-subsurface-058b84c$ make
gcc -Wall -Wno-pointer-sign -g -I/usr/include/libxml2 -pthread
-D_REENTRANT -I/usr/include/gtk-2.0 -I/usr/lib/gtk-2.0/include
-I/usr/include/atk-1.0 -I/usr/include/cairo -I/usr/include/pango-1.0
-I/usr/include/gio-unix-2.0/ -I/usr/include/glib-2.0
-I/usr/lib/glib-2.0/include -I/usr/include/pixman-1
-I/usr/include/freetype2 -I/usr/include/directfb
-I/usr/include/libpng12   -I/usr/include/glib-2.0
-I/usr/lib/glib-2.0/include   -I/usr/include/libxml2 -c profile.c
In file included from profile.c:12:
display.h:25: error: expected declaration specifiers or ‘...’ before
‘cairo_rectangle_int_t’
profile.c:1349: error: expected declaration specifiers or ‘...’ before
‘cairo_rectangle_int_t’
profile.c: In function ‘plot’:
profile.c:1370: error: ‘drawing_area’ undeclared (first use in this function)
profile.c:1370: error: (Each undeclared identifier is reported only once
profile.c:1370: error: for each function it appears in.)
make: *** [profile.o] Error 1

In case you wonder, "sudo make" gives the same results...

It seems that the problem is about the function

extern void plot(struct graphics_context *gc, cairo_rectangle_int_t
*drawing_area, struct dive *dive);

AFAIK, I can only see this function in

display.h:extern void plot(struct graphics_context *gc,
cairo_rectangle_int_t *drawing_area, struct dive *dive);

and in

sheitan at sheitan-TSH:~/Documents/Diving/torvalds-subsurface-058b84c$
grep 'plot(' *.c
gtk-gui.c:              plot(&gc, &drawing_area, dive);
print.c:        plot(&gc, &drawing_area, dive);
profile.c:void plot(struct graphics_context *gc, cairo_rectangle_int_t
*drawing_area, struct dive *dive)

I'm puzzled, besides updating to the latest LTS version of Ubuntu (not
really practical at this time), is it a problem on my side, or
something else ?

Thanks in advance, and best regards

Henri


More information about the subsurface mailing list