[Xastir-dev] Compile problem

Matt Pelmear mjpelmear at gmail.com
Sun Aug 28 01:18:58 EDT 2011


Hello everybody,

I started playing with Xastir for real during Hurricane Irene this 
weekend. Very cool tool. After playing with the package in Ubuntu I 
decided to compile from cvs so I can pitch-in where possible with the 
development process.

Unfortunately I've hit this problem:
make[3]: Entering directory `/home/matt/ham/xastir/xastir/src'
gcc -DHAVE_CONFIG_H -I. -I.. -I../src/shapelib -I/usr/local/include 
-I/usr/include/ImageMagick 
-DXASTIR_DATA_BASE=\"/usr/local/share/xastir\" -g -O2 -pipe -W -Wall 
-Wpointer-arith -Wstrict-prototypes -Wno-unused-parameter -pthread -MT 
alert.o -MD -MP -MF .deps/alert.Tpo -c -o alert.o alert.c
In file included from alert.c:313:
snprintf.h:39: error: expected declaration specifiers or ‘...’ before 
‘va_list’

This seems to be a problem in the autoconf config, based on a similar 
problem I see PHP had back a number of years ago. I'm not sure how to go 
about fixing it though, especially since the bug I was looking at didn't 
have an attached commit.

 From the source file:
/* Use the system libraries version of vsnprintf() if available. Otherwise
* use our own.
*/
#ifndef HAVE_VSNPRINTF
int xastir_vsnprintf(char *str, size_t count, const char *fmt, va_list 
ap); <<<<<< line 39
#else // HAVE_VSNPRINTF
# define xastir_vsnprintf vsnprintf
#endif // HAVE_VSNPRINTF

Swapping line 39 for the #define in the #else seems to work... after 
which I hit another problem later on:

make[3]: Entering directory `/home/matt/ham/xastir/xastir/src'
--- clip ----
gcc -DHAVE_CONFIG_H -I. -I.. -I../src/shapelib -I/usr/local/include 
-I/usr/include/ImageMagick 
-DXASTIR_DATA_BASE=\"/usr/local/share/xastir\" -g -O2 -pipe -W -Wall 
-Wpointer-arith -Wstrict-prototypes -Wno-unused-parameter -pthread -MT 
db.o -MD -MP -MF .deps/db.Tpo -c -o db.o db.c
--- clip ----
db.c: In function ‘process_directed_query’:
db.c:15312: error: ‘PACKAGE’ undeclared (first use in this function)
db.c:15312: error: (Each undeclared identifier is reported only once
db.c:15312: error: for each function it appears in.)
db.c:15312: error: expected ‘)’ before string constant

I know this second bit is in development and that function looks very 
incomplete, so I figured I'd ask before spending a lot of time looking 
into it.
Anyone have any ideas?

Thanks!
-Matt



More information about the Xastir-dev mailing list