Opened 18 years ago

Closed 18 years ago

Last modified 18 years ago

#1695 closed defect (invalid)

Java Mapscript and pointObj z and m (mapscript_wrap.c + Makefile)

Reported by: havard.tveite@… Owned by: sdlime
Priority: high Milestone:
Component: MapScript-Java Version: 4.8
Severity: normal Keywords:
Cc:

Description

Umberto asked me to submit this bug.

In the mapscript/java/Makefile, USE_POINT_Z_M is defined
by configure according to the presence of --enable-point-z-m
in the configure parameters, but it is not used in the
Makefile.

This causes compilation of mapscript/java/mapscript_wrap.c
to fail because it uses z and m variables of pointObj, and
these variables are protected by #ifdef USE_POINT_Z_M in
mapprimitive.h.

By including "$(USE_POINT_Z_M)" among the other options in
CCFLAGS in mapscript/java/Makefile.in, compilation runs
fine (if "--enable-point-z-m" is specified during configure).

Compilation still fails if "--enable-point-z-m" is not specified
in configure. The problem seems to be that the use of the z and m
variables of pointObj is not "protected" by "#ifdef USE_POINT_Z_M"
in mapscript/java/mapscript_wrap.c).

Change History (4)

comment:1 by havard.tveite@…, 18 years ago

The reason why compilation of mapscript/java/mapscript_wrap.c fails is
that it is a pregenerated file.  The javaextend.i file seems to use
USE_POINT_Z_M correctly, so if the mapscript_wrap.c is regenerated, it
will probably work OK (?).
Does this mean that mapscript_wrap.c will have to be generated during
installation in order to allow the use of --enable-point-z-m /
--disable-point-z-m during configure?

comment:2 by unicoletti, 18 years ago

My suggestion is to ALWAYS regenerate the wrapper by running make interface as
in the Using Java mapscript documentation on mapserver.gis.umn.edu.

comment:3 by unicoletti, 18 years ago

Resolution: invalid
Status: newclosed
The following sequence of commands gives a working Java mapscript. The only
requisite is to regenerate the wrapper file by using make interface.

./configure --enable-point-z-m --without-gdal
make
cd mapscript/java/
make interface
make
make test (optional)

Closing the bug.
I have updated the README to include the interface generation step.

comment:4 by sdlime, 18 years ago

Component: MapScriptMapScript-Java
Note: See TracTickets for help on using tickets.