Opened 18 years ago

Closed 13 years ago

#1881 closed defect (fixed)

Mapserver compilation flags should be added to the SWIG command line

Reported by: szekerest Owned by: sdlime
Priority: high Milestone: 5.6 release
Component: MapScript-SWIG Version: 4.10
Severity: critical Keywords:
Cc: dmorissette

Description (last modified by hobu)

Currently most of the SWIG bindings does not add mapserver compilation flags to the 
SWIG command line and therefore the interface might not be generated properly.
For example missing -DUSE_POINT_Z_M will prevent from generating z amd m members
for pointObj.

For the Win32 builds $(MS_DEFS), for the others $(FLAGS) should be added.

Change History (13)

comment:1 by szekerest, 18 years ago

Fixed for the C# makefiles.

comment:2 by dmorissette, 18 years ago

Milestone: 4.10 release
Does something need to be done for this for the other wrappers? There used to be
a 'mapscriptvars' file with all the compile flags used by the Perl wrappers. Is
this not used by the other bindings?

comment:3 by szekerest, 18 years ago

Cc: dmorissette@… added
Daniel,

Are the other bindings use the mapscriptvars file to set the compilation flag
for SWIG during the interface generation?


comment:4 by dmorissette, 18 years ago

After writing comment #2, I read on the -dev list that a design decision was
made a while ago by Sean (then the MapScript maintainer) to not use the compile
flags in the generation of the SWIG interfaces, making usage of the
mapscriptvars for this purpose irrelevant. FYI PHP doesn't use mapscriptvars, it
uses the configure vars described in bug 1884 comment #1. 

That's all the information I have and I will leave it up to you and the other
MapScript devs (Steve and Umberto?) to decide what to do on that front.

comment:5 by hobu, 17 years ago

Description: modified (diff)
Milestone: 5.0 release5.2 release

We *need* to address this in 5.2 I got killed on #2205 because of it.

comment:6 by sdlime, 16 years ago

Status: newassigned

Does anyone have an outline of the necessary fix?

Steve

comment:7 by dmorissette, 16 years ago

FWIW, PHP MapScript's mapscript/php3/Makefile.in uses the following:

MS_DEFINE = @ALL_ENABLED@
MS_INC =    @MS_INC@ @ALL_INC@
MS_STATIC = @ALL_STATIC_LIB@
MS_LIBS =   $(RUNPATHS) @MS_LIB@ @ALL_LIB@ @XTRALIBS@ $(MS_STATIC)

The @ALL_ENABLED@, @ALL_INC@ and @ALL_LIB@ are compiled by the configure.in script and contain all the flags for all compiled options. @ALL_ENABLED@ contains all the -DUSE_* flags, @ALL_INC@ all the -I include paths, and @ALL_LIB@ all the libs to link with.

You could possibly do the same with the SWIG MapScript makefile... I see that the mapscript/csharp/Makefile.in chose to explicitly set each option instead (which means more maintenance as new options are added)... dunno about the other SWIG languages.

comment:8 by dmorissette, 16 years ago

Cc: dmorissette added

comment:9 by sdlime, 16 years ago

Each language owner will have to take a look at this. I'll do so for Perl. I know the Perl Makefile.PL leverages mapscriptvars. It could instead use 'mapserver-config' which has everything we'd need.

Does the C# makefile run the swig interface generator (e.g. swig -perl5 ...)?

Steve

comment:10 by dmorissette, 16 years ago

I had forgotten that we now have a mapserver-config ... sounds like the best way to go.

comment:11 by sdlime, 16 years ago

Milestone: 5.2 release5.4 release

I don't think changing build processes at this late date make sense though so moving this to 5.4...

Steve

comment:12 by hobu, 14 years ago

Python MapScript's building process now invokes mapserver-config on all platforms except MSVC, which uses the old (hand) build process. I don't think we should pollute the makefiles with this stuff, and individual MapScript's should invoke the mapserver-config as part of their build process. I propose we "won't fix" this bug, and new bugs be opened for MapScript's as needed to update them to use mapserver-config.

I would note that a successful mapserver-config invocation is also a reliable way to find out whether or not MapServer has been successfully built.

comment:13 by dmorissette, 13 years ago

Resolution: fixed
Status: assignedclosed

Closing: mapserver-config is the way to go.

Note: See TracTickets for help on using tickets.