[Xastir] Can't compile Xastir
Tom Russo
russo at bogodyn.org
Wed Jan 23 17:58:19 EST 2008
On Wed, Jan 23, 2008 at 11:13:56PM +0100, we recorded a bogon-computron collision of the <s57lx at hamradio.si> flavor, containing:
> Hi!
>
> I think I had a very similar problem as I have today, because I can't
> compile the newest Xastir development.
>
> Ok so here's the error:
>
> # make
> make all-recursive
[...many lines of stuff that's not the error...]
> if gcc -DHAVE_CONFIG_H -I. -I. -I.. -I/usr/local/include
> -I/usr/include -DXASTIR_DATA_BASE=\"/usr/local/share/xastir\" -g -O2
> -pipe -W -Wall -Wpointer-arith -Wstrict-prototypes -Wno-unused-parameter
> -pthread -MT map_geo.o -MD -MP -MF ".deps/map_geo.Tpo" -c -o map_geo.o
> map_geo.c; \
> then mv -f ".deps/map_geo.Tpo" ".deps/map_geo.Po"; else rm -f
> ".deps/map_geo.Tpo"; exit 1; fi
> map_geo.c: In function ???draw_geo_image_map???:
> map_geo.c:1605: warning: value computed is not used
> map_geo.c:1937: warning: format ???%i??? expects type ???int???, but argument 3
> has type ???double???
> map_geo.c:1937: warning: format ???%i??? expects type ???int???, but argument 4
> has type ???double???
> map_geo.c:1937: warning: format ???%i??? expects type ???int???, but argument 5
> has type ???double???
> map_geo.c:1957: error: invalid operands to binary <<
> map_geo.c:1958: error: invalid operands to binary <<
> map_geo.c:1959: error: invalid operands to binary <<
> map_geo.c:2305: error: array subscript is not an integer
> map_geo.c:2309: error: array subscript is not an integer
> make[3]: *** [map_geo.o] Error 1
The error is clearly due to a problem with your Magick install, because some
variables in xastir that are defined using types from Magick are coming out
as doubles where they're assumed to be some sort of integer type.
The lines listed in your actual error messages (including the three
warning lines) all use that type of variable. For example, line 1937
is part of this block:
if (debug_level & 16)
fprintf(stderr,"Colormap color is %i %i %i \n",
temp_pack.red, temp_pack.green, temp_pack.blue);
and temp_pack which is a variable of type PixelPacket. PixelPacket is defined
in the magick/pixel.h file (of your Image/GraphicsMagick install) as a
struct containing four elements (red, green, blue and opacity) of type Quantum.
On my systems, Quantum is of one of the integer types (I think it's "long"),
and obviously Xastir's use of ImageMagick has assumed that it's always an
integer type of some kind. Which it isn't for you.
Apparently, there *IS* a way for a Quantum to be of type "float" if the
macro "UseHDRI" is defined.
Looking into it, HDRI is "High Dynamic Range Images"
(http://www.imagemagick.org/script/high-dynamic-range.php)
and if you've installed ImageMagick with that enabled, then it won't work with
Xastir unless Xastir's use of ImageMagick is rewritten not to assume that
Quantum is an integer type.
Perhaps you have enabled that in your Magick build? To see if it is,
find the file "magick/magick-config.h" (probably in /usr/include/magick) and
grep for UseHDRI. On my systems I find:
/* #undef UseHDRI */
I'm betting on yours you'll find it defined to 1.
--
Tom Russo KM5VY SAR502 DM64ux http://www.swcp.com/~russo/
Tijeras, NM QRPL#1592 K2#398 SOC#236 AHTB#1 http://kevan.org/brain.cgi?DDTNM
"And, isn't sanity really just a one-trick pony anyway? I mean all you get is
one trick, rational thinking, but when you're good and crazy, oooh, oooh,
oooh, the sky is the limit!" --- The Tick
More information about the Xastir
mailing list