[Mapserver-users] which ./configure options needed?

Benjamin Thelen benjamin.thelen at ccgis.de
Fri Apr 25 10:55:45 EDT 2003


Hi J.F.,

some libs could not be found at the beginning. But while I wrote this mail I
succeeded in having the configure-script (nearly) without errors.
So, this is how to configure map-server on FreeBSD 4.7. I suppose it is
similar on Linux?


The options I used at the beginning and the output:

root at qwertzuiop#
./configure --with-gd --with-gdal --with-ogr --with-proj --with-jpeg --with-
zlib --with-freetype --with-php=/usr/ports/www/mod_php4/work/php-4.3.1 --wit
h-wmsclient --with-postgis --enable-runpath
loading cache ./config.cache
checking for gcc... gcc
checking whether the C compiler (gcc  ) works... yes
checking whether the C compiler (gcc  ) is a cross-compiler... no
checking whether we are using GNU C... yes
checking whether gcc accepts -g... yes
checking for c++... c++
checking whether the C++ compiler (c++  ) works... yes
checking whether the C++ compiler (c++  ) is a cross-compiler... no
checking whether we are using GNU C++... yes
checking whether c++ accepts -g... yes
checking for ranlib... ranlib
checking for flex... flex
checking for yywrap in -lfl... yes
checking for bison... bison -y
checking if compiler supports -R... yes
checking for exp in -lm... yes
checking how to run the C preprocessor... gcc -E
checking for ANSI C header files... yes
checking for strcasecmp... yes
checking for strncasecmp... yes
checking for strdup... yes
checking whether we should include JPEG support...
checking for jpeg_read_header in -ljpeg... no
        libjpeg not found. JPEG support not included, possibly needed for
GD.



First I specified either /usr/local/include, because jpeglib.h (not sure
now) is to be found there or /usr/local/lib, because libjpeg.a/libjpeg.so
are to be found there. But I always got "Could not find jpeglib.h (not sure
now) or libjpeg.a/libjpeg.so. One path was of course always wrong.


checking which version of GD to use...
        using libgd from system libs.
checking where FreeType is installed...
checking for freetype-config... /usr/local/bin/freetype-config
        using libfreetype from -L/usr/local/lib -lfreetype -lz
checking for FT_Init_FreeType in -lfreetype... no
checking for TT_Init_FreeType in -lttf... no
        using libfreetype -L/usr/local/lib -lfreetype -lz from system libs.
checking where Zlib is installed...
checking for zlibVersion in -lz... yes
        using libz from system libs.
checking where PNG is installed...
checking for png_init_io in -lpng... no
        PNG (libpng) library cannot be found, possibly needed for GD

I simply forgot to specify --with-png.



checking for gdImageCreate in -lgd... yes
checking for gdImageGif in -lgd... yes
checking for gdImagePng in -lgd... yes
checking for gdImageJpeg in -lgd... yes
checking for gdImageWBMP in -lgd... yes
checking for gdImageStringFT in -lgd... yes
checking for gdImageString16 in -lgd... yes
checking for gdImageGifPtr in -lgd... yes
        using GD
( -DUSE_GD_GIF -DUSE_GD_PNG -DUSE_GD_JPEG -DUSE_GD_WBMP -DUSE_GD_FT -DGD_HAS
_GDIMAGEGIFPTR) from system libs.



I don't understand -DUSE_GD_GIF, because I thought GIF is no longer
supported by map-server/GD2.





checking whether we should include PDF support...
checking for PDF_setlinewidth in -lpdf... no
checking for PDF_setrgbcolor in -lpdf... no
checking for PDF_moveto in -lpdf... no
checking for PDF_curveto in -lpdf... no
checking for PDF_show_xy in -lpdf... no
        libpdf not found... PDF support not included.


pdflib.h and libpdf.a/libpdf.so have to be found. So it is the same problem
as with jpeg.



checking whether we should include TIFF support...
checking for TIFFOpen in -ltiff... yes
        using libtiff from system libs.
checking whether we should include EPPL7 support...
        including EPPL7 support.
checking whether we should include PROJ.4 support...
checking for pj_init in -lproj... no
checking for pj_transform in -lproj... no
checking for pj_latlong_from_proj in -lproj... no
configure: warning:         PROJ.4 not found in system libs...
use --with-proj=DIR.


projects.h and libproj.a/libproj.so are neccessary. So it is the same
problem.


checking whether we should include thread safe support...
        thread safe support disabled.
checking whether we should include ESRI SDE support...
        ESRI SDE support not requested.
checking whether we should compile in MPATROL support...
        MPATROL support not requested.
checking whether we should include OGR support...
checking for gdal-config... /usr/local/bin/gdal-config
checking for OGRRegisterAll in -lgdal.1.1... yes
        using OGR from system libs.
checking if GDAL support requested... yes
checking if PostGIS support requested... yes
checking for pg_config... /usr/local/bin/pg_config
yes, user supplied pg_config
checking if OracleSpatial support requested... no
checking whether we should include WMS support...
        OGC WMS Compatibility not enabled (PROJ.4 is required for WMS).
checking whether we should include WMS Client Connections support...
        OGC WMS Client Connections not enabled (PROJ.4 and libwww required).


After proj4 was found libwww was found, too.



Compiling with -DIGNORE_MISSING_DATA.
checking whether we should enable debug features...
checking for PHP/MapScript module options...
checking whether 'perl -V' works... yes
checking for location of config.h or php_config.h...
/usr/ports/www/mod_php4/work/php-4.3.1/main/php_config.h
checking whether we have PHP3 or PHP4... -DPHP4
checking whether we should use PHP's regex... yes
configure: error:
!!! The current version of PHP MapScript has some problems with       !!!
!!! PHP4's bundled regex.  Until we figure the solution to the        !!!
!!! problem, the workaround is to compile PHP4 with the system regex  !!!
!!! Please re-configure and re-compile PHP4 with --with-system-regex  !!!
!!! and then re-configure and re-compile MapServer.                   !!!


I am on the way to find out, how to build php in the ports-collection with
this option. At the very moment I have to wait for the answer from the
FreeBSD mailinglist.



The rest seems to work. Freetype, zlib, tiff, php, gdal (ogr) where all
installed from the ports-collection and are found without specfying the path
(only php need the path to its sources), as you can see.


Now only php has to be re-compiled, but the rest is ok :-)!! See here:


root at qwertzuiop#
./configure --with-gd --with-gdal --with-ogr --with-proj=/usr/local --with-j
peg=/usr/local --with-pdf=/usr/local --with-png=/usr/local --with-zlib --wit
h-freetype --with-php=/usr/ports/www/mod_php4/work/php-4.3.1 --with-wmsclien
t --with-postgis --enable-runpat
loading cache ./config.cache
checking for gcc... gcc
checking whether the C compiler (gcc  ) works... yes
checking whether the C compiler (gcc  ) is a cross-compiler... no
checking whether we are using GNU C... yes
checking whether gcc accepts -g... yes
checking for c++... c++
checking whether the C++ compiler (c++  ) works... yes
checking whether the C++ compiler (c++  ) is a cross-compiler... no
checking whether we are using GNU C++... yes
checking whether c++ accepts -g... yes
checking for ranlib... ranlib
checking for flex... flex
checking for yywrap in -lfl... yes
checking for bison... bison -y
checking if compiler supports -R... yes
checking for exp in -lm... yes
checking how to run the C preprocessor... gcc -E
checking for ANSI C header files... yes
checking for strcasecmp... yes
checking for strncasecmp... yes
checking for strdup... yes
checking whether we should include JPEG support...
        using libjpeg from system -L/usr/local/lib -ljpeg
checking which version of GD to use...
        using libgd from system libs.
checking where FreeType is installed...
checking for freetype-config... /usr/local/bin/freetype-config
        using libfreetype from -L/usr/local/lib -lfreetype -lz
checking for FT_Init_FreeType in -lfreetype... no
checking for TT_Init_FreeType in -lttf... no
        using libfreetype -L/usr/local/lib -lfreetype -lz from system libs.
checking where Zlib is installed...
checking for zlibVersion in -lz... yes
        using libz from system libs.
checking where PNG is installed...
        using libpng from -L/usr/local/lib -lpng
checking for gdImageCreate in -lgd... yes
checking for gdImageGif in -lgd... yes
checking for gdImagePng in -lgd... yes
checking for gdImageJpeg in -lgd... yes
checking for gdImageWBMP in -lgd... yes
checking for gdImageStringFT in -lgd... yes
checking for gdImageString16 in -lgd... yes
checking for gdImageGifPtr in -lgd... yes
        using GD
( -DUSE_GD_GIF -DUSE_GD_PNG -DUSE_GD_JPEG -DUSE_GD_WBMP -DUSE_GD_FT -DGD_HAS
_GDIMAGEGIFPTR) from system libs.
checking whether we should include PDF support...
        using libpdf from -L/usr/local/lib -lPDF.
checking whether we should include TIFF support...
checking for TIFFOpen in -ltiff... yes
        using libtiff from system libs.
checking whether we should include EPPL7 support...
        including EPPL7 support.
checking whether we should include PROJ.4 support...
checking for pj_transform in -lproj... yes
checking for pj_latlong_from_proj in -lproj... yes
        using PROJ.4 from /usr/local.
checking whether we should include thread safe support...
        thread safe support disabled.
checking whether we should include ESRI SDE support...
        ESRI SDE support not requested.
checking whether we should compile in MPATROL support...
        MPATROL support not requested.
checking whether we should include OGR support...
checking for gdal-config... /usr/local/bin/gdal-config
checking for OGRRegisterAll in -lgdal.1.1... yes
        using OGR from system libs.
checking if GDAL support requested... yes
checking if PostGIS support requested... yes
checking for pg_config... /usr/local/bin/pg_config
yes, user supplied pg_config
checking if OracleSpatial support requested... no
checking whether we should include WMS support...
        OGC WMS compatibility enabled (-DUSE_WMS).
checking whether we should include WMS Client Connections support...
checking for libwww-config... /usr/local/bin/libwww-config
        found libwww version 5.4.0
        OGC WMS Client Connections enabled (-DUSE_WMS_LYR).
checking for potential conflict between system regex and rxposix...
checking for regexec in -lrx... no
Compiling with -DIGNORE_MISSING_DATA.
checking whether we should enable debug features...
checking for PHP/MapScript module options...
checking whether 'perl -V' works... yes
checking for location of config.h or php_config.h...
/usr/ports/www/mod_php4/work/php-4.3.1/main/php_config.h
checking whether we have PHP3 or PHP4... -DPHP4
checking whether we should use PHP's regex... yes
configure: error:
!!! The current version of PHP MapScript has some problems with       !!!
!!! PHP4's bundled regex.  Until we figure the solution to the        !!!
!!! problem, the workaround is to compile PHP4 with the system regex  !!!
!!! Please re-configure and re-compile PHP4 with --with-system-regex  !!!
!!! and then re-configure and re-compile MapServer.                   !!!



Thanks for your help! I hope the rest will run smoothly. Finally the problem
wasn't actually a big one :-).

Benjamin




I was about to send you this mail, but meanwhile I got the answer for the
php problem. It is still a problem! :-(

I ought to add to the Makefile CONFIGURE_ARGS+=--with-system-regex.
BUT, I looked into the Makefile and, what a surprise, I found
"CONFIGURE_ARGS+=--with-regex=system"

Another strange thing is that under "CONFIGURE_ARGS+= the following is to be
found:
--without-gd \
--without-mysql
But I specified to install gd and mysql at the installation of php4 (the
installation starts with a menu, where I cold choose what I want to install
additionally. GD and mysql were definitely installed while the
php-installation. The map-server configure script finds gd. Somehow strange.


I then had a look at the help of the configure script and found the
following:
--with-regex=TYPE	regex library type: system, apache, php. Default: php
Warning: Do not use...you know :-)!

Well, at the moment I am stuck. But I will ask in the bsd mailing list again
and tell you the answer.


Have a nice weekend!

Ben






> -----Original Message-----
> From: mapserver-users-admin at lists.gis.umn.edu
> [mailto:mapserver-users-admin at lists.gis.umn.edu]On Behalf Of
> Jean-Francois.Doyon at CCRS.NRCan.gc.ca
> Sent: Tuesday, April 22, 2003 9:40 PM
> To: benjamin.thelen at ccgis.de; mapserver-users at lists.gis.umn.edu
> Subject: RE: [Mapserver-users] which ./configure options needed?
>
>
> Benjamin,
>
> Well, the configure does attempt to detect many libraries, namely GD,
> assuming you want to use the system's GD.
>
> The options you listed will give you a WMS Client capable MapServer, along
> with many other features (Reprojection, improved raster support, etc ...).
>
> If in doubt as to the path to the libraries, on linux, you would build the
> code, and install the libraries onto the system.  Normally, if you install
> the libraries (such as OGR/GDAL) onto the system a simple --with-ogr and
> --with-gdal will work, no need to feed it a path, configure will find what
> it needs.
>
> Basically, if you "make install" all the libs, you should be good
> to go with
> no paths to specify to mapserver. I haven't played with FreeBSD in years,
> but I suspect the same rules apply?
>
> This only gets more complicated if you DON'T want to install the libraries
> system wide, and then have to worry about include,lib, and ld
> paths ... But
> that's another story :)
>
> In your example, you've got it right ... you could actually NOT put any
> paths anywhere except for PHP maybe, and that should still work
> fine (looks
> like you did a system install of the software and libs).  Yes, normally
> libjpeg and zlib are detected automagically, as is libfreetype (though you
> may have to play with this depending on the version of freetype
> you have, or
> if you have both).
>
> Give that a try. If you have problems, post the output of the configure
> script and maybe we can help.
>
> J.F.
>
> -----Original Message-----
> From: Benjamin Thelen [mailto:benjamin.thelen at ccgis.de]
> Sent: Tuesday, April 22, 2003 3:14 PM
> To: mapserver-users at lists.gis.umn.edu
> Subject: [Mapserver-users] which ./configure options needed?
>
>
> Hello,
>
> I would like to use mapserver with postgis 0.4.7 on FreeBSD 4.7. I have
> installed the neccessary Software:
>
> GD2 (from FreeBSD Ports-Collection)
> PROJ4 (	"	)
> LibWWW (	"	)
> FreeType Version 2 (	"	)
> GDAL 1.1.8 (	"	)
> pgsql 7.3.2 (	"	)
>
> postgis 0.7.4 (from tar.gz)
>
> What I couldn't install seperately was OGR, but as I could read on
> http://gdal.velocet.ca/projects/opengis/ that OGR is part of the GDAL
> library, I think that's it.
>
>
> I would like to start compiling, but I am quite unsure what
> options for the
> configure-skript I have to take, because it is written in the mapserver
> documentation that "Some libraries will NEVER be detected by default, and
> HAVE to be specified via the configure script". That would mean
> to me that I
> only have to take those options
> --with-proj, --with-ogr, --with-gdal, --with-wmsclient (I don't
> need mpatrol
> and sde), which are never detected and the rest will be detected
> automatically. But somehow I think, I am wrong ;-)!
>
> If ogr is part of gdal, why do I have to specify ogr seperately? I don't
> know how to specify the correct path to the installed software because,
> there are so many libraries installed with the software. If I had
> a specific
> file I would have to specify, no problem, but application path...?
>
> Do I have to specify the following two?
>  --with-postgis	(automatically detected?)
>  --with-php		(automatically detected?)
>
>
> I would try the following:
>
> ./configure
>  --with-gd=/usr/local/share/locale/l10n	(not sure)
>  --with-proj=/usr/local/bin/			(quite sure)
>  --with-ogr= ?? 					(see above !!)
>  --with-gdal=/usr/local/bin/gdal-config 	(sure)
>  --with-php=/usr/local/bin/php		(sure)
>  --with-wmsclient					(sure)
>  --enable-runpath	(sure, but what about the additional options)
>  --with-postgis=/usr/local/bin/pg_config	(sure)
>
>
> I am definitely not sure, whether to specify the following:
>
>  --with-jpeg[=DIR]	(not neccessary because auf GD2?)
>  --with-zlib		(automatically detected?)
>  --with-freetype		(automatically detected?)
>
>
> Can anybody help?
>
> Thanks very much!
> Benjamin
>
>
>
>
>
>
>
>
>
> _______________________________________________
> Mapserver-users mailing list
> Mapserver-users at lists.gis.umn.edu
> http://lists.gis.umn.edu/mailman/listinfo/mapserver-users
> _______________________________________________
> Mapserver-users mailing list
> Mapserver-users at lists.gis.umn.edu
> http://lists.gis.umn.edu/mailman/listinfo/mapserver-users
>
>




More information about the mapserver-users mailing list