Opened 19 years ago
Closed 18 years ago
#1209 closed defect (fixed)
"include/linux" in mapscript/java Makefile.in
Reported by: | Owned by: | ||
---|---|---|---|
Priority: | high | Milestone: | 4.6 release |
Component: | MapScript-SWIG | Version: | 4.5 |
Severity: | normal | Keywords: | |
Cc: |
Description
Problem compiling java mapscript from 20040203 CVS. The mapscript/java/Makefile.in contains the line: JAVA_INCLUDE=-I${JAVA_HOME}/include -I${JAVA_HOME}/include/linux My OpSys is SunOS 5.7 (solaris). My SWIG installation contains an include/solaris directory (and not include/linux).
Attachments (3)
Change History (19)
comment:2 by , 19 years ago
Status: | new → assigned |
---|
Not having solaris at my disposal, I won't be able to conclusively test ... but I will try to implement some platform detection. Should be able to do it in the same way as done in the main mapserver/Makefile.in.
comment:5 by , 18 years ago
I hacked configure.in and added a --with-os-name parameter (give the 'solaris' value) to configure so that a different include patch can be used. This is far from ideal (We should be using the AC_CANONICAL_SYSTEM macro instead, but that requires install-sh so I went for a home-made solution). Please try the attached patch and report if it works. The output of uname -a and uname -s on solaris would be handy too.
by , 18 years ago
Attachment: | 1209-solaris.patch added |
---|
Add os-name parameter to search a different path for includes
comment:6 by , 18 years ago
I have tried the patch. My first problem was that my "patch" did not like the file (too long lines?): patch output: ********************************************************************* Hmm... Looks like a unified diff to me... The text leading up to this was: -------------------------- |Index: configure |=================================================================== |RCS file: /data2/cvsroot/mapserver/configure,v |retrieving revision 1.135 |diff -u -r1.135 configure |--- configure 27 Feb 2006 20:22:06 -0000 1.135 |+++ configure 28 Feb 2006 16:14:59 -0000 -------------------------- Patching file configure using Plan A... patch: **** malformed patch at line 13: Y_CONFIG MYGIS_ENABLED MYGIS_INC MYGIS_LIB ORACLESPATIAL_ENABLED ORACLESPATIAL_INC ORACLESPATIAL_LIB MING_ENABLED MING_INC MING_LIB WMS_SVR_ENABLED WFS_SVR_ENABLED WCS_SVR_ENABLED LIBCURL_CONFIG WMS_LYR_ENABLED WFS_LYR_ENABLED CURL_INC CURL_LIB FASTCGI_ENABLED FASTCGI_INC FASTCGI_LIB HTTPD MS_INC MS_LIB IGNORE_MISSING_DATA USE_POINT_Z_M DEBUG_FLAGS LD_SHARED SO_EXT PHP_VERSION_FLAG PHP_SRC_DIR PHP_CC PHP_LD PHP_REGEX_INC PHP_REGEX_OBJ USE_PHP_REGEX MAKE_PHPMS MAKE_PHPMS_CLEAN APACHE_INC ALL_ENABLED ALL_INC ALL_LIB ALL_STATIC_LIB RPATHS LIBOBJS LTLIBOBJS' ********************************************************************* I did the change to ac_subst_vars (inserted "OS_INCLUDE_DIR") manually and removed the diff from the patch. The rest of the patch was OK. Problem encountered: The section: **************************************************** OUR_OSNAME=`uname -s` case "${OUR_OSNAME}" in Llinux) OS_INCLUDE_DIR="linux" ;; sSolaris*) OS_INCLUDE_DIR="solaris" ;; Wwin*) OS_INCLUDE_DIR="win32" ;; *) OS_INCLUDE_DIR="linux" ;; **************************************************** fails to discover my Solaris 2.7, since uname -s reports "SunOS" You also asked for the output of uname -a: Solaris 2.7: "SunOS hostname 5.7 Generic_106541-34 sun4u sparc SUNW,Ultra-4" Solaris 2.5: "SunOS hostname 5.5.1 Generic_103640-40 sun4u sparc SUNW,Ultra-1" by running configure without "--with-os-name", configure reported: "checking if --with-os-name specified... no, but it seems to be linux" using --with-os-name=solaris, configure reports: "checking if --with-os-name specified... yes (solaris)" (as expected) In the last case, the mapscript/java/Makefile was updated correctly, and compilation went better. But the compilation failed due to some problems with m and z in mapscript_wrap.c (i did configure with --enable-point-z-m): ***************************************************************** mapscript_wrap.c: In function `pointObj_setXY': mapscript_wrap.c:2498: error: structure has no member named `z' mapscript_wrap.c:2499: error: structure has no member named `m' mapscript_wrap.c: In function `pointObj_setXYZ': mapscript_wrap.c:2506: error: structure has no member named `z' mapscript_wrap.c:2507: error: structure has no member named `m' mapscript_wrap.c: In function `pointObj_setXYZM': mapscript_wrap.c:2513: error: structure has no member named `z' mapscript_wrap.c:2514: error: structure has no member named `m' mapscript_wrap.c: In function `pointObj_toString': mapscript_wrap.c:2521: error: structure has no member named `m' mapscript_wrap.c: In function `new_pointObj__SWIG_0': mapscript_wrap.c:2535: error: structure has no member named `z' mapscript_wrap.c:2536: error: structure has no member named `m' mapscript_wrap.c: In function `new_pointObj__SWIG_1': mapscript_wrap.c:2545: error: structure has no member named `z' mapscript_wrap.c:2546: error: structure has no member named `m' mapscript_wrap.c: In function `Java_edu_umn_gis_mapscript_mapscriptJNI_set_1pointObj_1z': mapscript_wrap.c:22422: error: structure has no member named `z' mapscript_wrap.c: In function `Java_edu_umn_gis_mapscript_mapscriptJNI_get_1pointObj_1z': mapscript_wrap.c:22435: error: structure has no member named `z' mapscript_wrap.c: In function `Java_edu_umn_gis_mapscript_mapscriptJNI_set_1pointObj_1m': mapscript_wrap.c:22450: error: structure has no member named `m' mapscript_wrap.c: In function `Java_edu_umn_gis_mapscript_mapscriptJNI_get_1pointObj_1m': mapscript_wrap.c:22463: error: structure has no member named `m' make: *** [mapscript_so] Error 1 *****************************************************************
comment:7 by , 18 years ago
In fact the patch has a rather long line. What patch are you using (gnu or sun)? As for the os detection code shortly after I have attached the patch I found in a web site a sample uname -s output. I already have updated the patch and will provide a new one shortly. With regard to --enable-point-z-m I recall that this has always been an issue with Java mapscript, try to disable it or if you absolutely need it open a new bug.
comment:8 by , 18 years ago
I used Solaris patch version 2.1 Regarding the z-m issue. What I meant to say was that I did *not* configure with --enable-point-z-m. Sorry!
comment:9 by , 18 years ago
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 not used in the Makefile. I included "$(USE_POINT_Z_M)" among the other options in CCFLAGS in the Makefile, and this made the compilation run fine (in the mean time, I had also configured and compiled Mapserver with --enable-point-z-m). Compilation still fails if the --enable-point-z-m is not used in configure (the use of z and m is not "protected" by ifdefs in mapscript_wrap.c).
by , 18 years ago
Attachment: | 1209-solaris.2.patch added |
---|
OS detection code for configure and Java mapscript
comment:10 by , 18 years ago
attachments.isobsolete: | 0 → 1 |
---|
comment:12 by , 18 years ago
The last patch does not update configure with the "SunOS" stuff, only configure.in. I ran autoconf on configure.in, and configure is still not able to detect SunOS. It seems as if the pattern: "sSunOS*" does not produce a hit. I changed the pattern to "SunOS*", and that worked. According to man sh, "[sS]unOS*" should also work.
by , 18 years ago
Attachment: | 1209-solaris.3.patch added |
---|
OS detection code for configure and Java mapscript
comment:13 by , 18 years ago
attachments.isobsolete: | 0 → 1 |
---|
comment:14 by , 18 years ago
The patch is OK here now. In order to make mapscript/java, the Makefile.in must be modified to include $(USE_POINT_Z_M) in CCFLAGS. I have created a bug (id=1695) for the USE_POINT_Z_M issues with Java mapscript.
comment:15 by , 18 years ago
Keep in mind that there are actually very few use cases for Z and M in MapServer. The MapServer program itself can not use these values. And they also cause a 10-15% performance loss (check Bugzilla for details). I do not recommend enabling them by default.
comment:16 by , 18 years ago
Resolution: | → fixed |
---|---|
Status: | assigned → closed |
The proposed patch has been applied to cvs HEAD
Note:
See TracTickets
for help on using tickets.