[Mapserver-users] Compiling stops: cannto find -lPDF

Benjamin Thelen benjamin.thelen at ccgis.de
Wed Apr 30 07:18:37 EDT 2003


Hi Steve, hi Jim,

I have no /etc/ld.so.conf, but I have /usr/compat/linux/etc/ls.so.conf. This
is because of my FreeBSD-System and the Linux-compatibility thing, I
suppose. Not sure how to cope with this.

In my ls.so.conf you find the following:
-------------------------------
/usr/i486-linux-libc5/lib
/usr/X11R6/lib
-------------------------------

/usr/libexec/elf/ld is there and also /usr/bin/ld.


What is lPDF, I cannot find lPDF? Is it part of the pdflibs?


I've added my Makefile below for more Information. There are some sections,
where I think something should be changed before compiling?? At the
beginning, the section where you find "DNEED_STRCASECMP". PDFlib seems to be
all right. REGEX_OBJ= and REGEX_INC= have no values!?


Any ideas?
Benjamin



# Generated automatically from Makefile.in by configure.
# Run ./configure in the main MapServer directory to turn this Makefile.in
# into a proper Makefile

LIB_INSTALL=/usr/local/lib/
HEADER_INSTALL=/usr/local/include/mapserver-3.5/

#
# mpatrol runtime memory debugger
#
MPATROL=
MPATROL_INC=
MPATROL_LIB=

#
# If you want to ignore missing datafile errors uncomment the following
# line. This is especially useful with large tiled datasets that may not
# have complete data for each tile.
#
#IGNORE_MISSING_DATA=-DIGNORE_MISSING_DATA
IGNORE_MISSING_DATA = -DIGNORE_MISSING_DATA

#
# Apparently these aren't as commonplace as I'd hoped. Edit the
# following line to reflect the missing functions on your platform.
#
# STRINGS=-DNEED_STRCASECMP -DNEED_STRNCASECMP -DNEED_STRDUP
STRINGS=

# Proj.4 distribution (cartographic projection routines). Not required for
normal use. (EXPERIMENTAL)
PROJ_INC= -I/usr/local/include
PROJ_LIB= -L/usr/local/lib -lproj
PROJ=     -DUSE_PROJ -DUSE_PROJ_API_H

# GD distribution (graphics library GIF and/or PNG support). (REQUIRED)
#
#   - Versions 1.3 to 1.5 write non-LZW GIF (-DUSE_GD_1_3).
#   - Versions 1.6 and greater write PNG (-DUSE_GD_1_6). Add -lpng -lz to
GD_LIB line.
#
#
GDFONT_OBJ=gd-1.2/gdfontt.o gd-1.2/gdfonts.o gd-1.2/gdfontmb.o
gd-1.2/gdfontl.o gd-1.2/gdfontg.o
GD_INC=  -I/usr/local/include
GD_LIB=  -lgd -L/usr/local/lib -lgd -L/usr/local/lib -ljpeg -L/usr/local/lib
 -lfreetype -lz -L/usr/local/lib -lpng -lz
GD=       -DUSE_GD_GIF -DUSE_GD_PNG -DUSE_GD_JPEG -DUSE_GD_WBMP -DUSE_GD_FT 
-DGD_HAS_GDIMAGEGIFPTR
GD_STATIC =

# PDFlib distribution (PDF library w/ PDF support). (EXPERIMENTAL)
#
#
#
PDF_INC=  -I/usr/local/include
PDF_LIB=  -L/usr/local/lib -lPDF
PDF=      -DUSE_PDF
PDF_OBJ=

# TIFF distribution (raster support for TIFF and GEOTIFF imagery).
(RECOMMENDED)
TIFF_INC=
TIFF_LIB= -ltiff -L/usr/local/lib -ljpeg -L/usr/local/lib -lfreetype -lz -L/
usr/local/lib -lpng -lz
TIFF=     -DUSE_TIFF

# JPEG distribution (raster support for grayscale JPEG images, INPUT ONLY).
JPEG_INC= -I/usr/local/include
JPEG_LIB= -L/usr/local/lib -ljpeg
JPEG=     -DUSE_JPEG

# EPPL7 Support (this activates ERDAS as well) Included in the distribution.
Probably the best raster alternative if
# you've got EPPL7 laying around. See http://www.lmic.state.mn.us/ for more
information. (RECOMMENDED)
EPPL=     -DUSE_EPPL
EPPL_OBJ= epplib.o

# ESRI SDE Support. You MUST have the SDE Client libraries and include files
# on your system someplace. The actual SDE server you wish to connect to can
# be elsewhere.
SDE=
SDE_LIB=
SDE_INC=

# Optional OGR Support.  OGC Simple Feature inspired interface for vector
# formats.  See http://gdal.velocet.ca/projects/opengis/
OGR=	  -DUSE_OGR
OGR_LIB=  -L/usr/local/lib -lgdal.1.1
OGR_INC=  -I/usr/local/include
OGR_STATIC=

# Optional GDAL Support (provides read access to a variety of raster
formats)
# See http://www.remotesensing.org/gdal
GDAL=	  -DUSE_GDAL
GDAL_LIB=
GDAL_INC=  -I/usr/local/include

# Optional PostGIS Support.  See http://postgis.refractions.net/
POSTGIS=      -DUSE_POSTGIS
POSTGIS_LIB=  -L/usr/local/lib -lpq
POSTGIS_INC=  -I/usr/local/include

# Optional ORACLESPATIAL Support. Contact: cabral at cttmar.univali.br
ORACLESPATIAL=
ORACLESPATIAL_LIB=
ORACLESPATIAL_INC=

# w3c-libwww ... required for WMS Client Connections
WWW_INC= -I/usr/local/include -I/usr/local/include/w3c-libwww -DHAVE_CONFIG_
H
WWW_LIB= -L/usr/local/lib -lwwwxml -lxmltok -lxmlparse -lwwwzip -lwwwinit -l
wwwapp -lwwwhtml -lwwwtelnet -lwwwnews -lwwwhttp -lwwwmime -lwwwgopher -lwww
ftp -lwwwfile -lwwwdir -lwwwcache -lwwwstream -lwwwmux -lwwwtrans -lwwwcore 
-lwwwutils -lmd5 -lz

# OGC WMS Compatibility:  -DUSE_WMS (Requires PROJ4 support)
# OGC WMS Client Connections:  -DUSE_WMS_LYR (Requires PROJ4 and libwww)
WMS=	  -DUSE_WMS -DUSE_WMS_LYR

#
# UofMN GIS/Image Processing Extension (very experimental)
#
#EGIS=-DUSE_EGIS
#EGIS_INC=-I./egis/errLog -I./egis/imgSrc -I./egis
#EGIS_LIB=-L./egis/errLog -lerrLog -L./egis/imgSrc -limgGEN -L./egis -legis
#MAKE_EGIS=egis
#MAKE_EGIS_CLEAN=egis_clean

#
# IMPORTANT NOTE ABOUT REGEX FOR PHP_MAPSCRIPT USERS:
#
# In order to compile the PHP_MAPSCRIPT module, we have to make MapServer
# uses the same version of the REGEX library that PHP was compiled with:
#
REGEX_OBJ=
REGEX_INC=

#
# Multithreading support.
#
THREAD=
THREAD_LIB=

#
# Pick a compiler, etc. Flex and bison are only required if you need to
modify the mapserver lexer (maplexer.l) or expression parser (mapparser.y).
#
CXX=	c++
CC=     gcc
LD=	gcc
AR= ar rc
RANLIB= ranlib
LEX=    flex
YACC=   bison -y

XTRALIBS=  -lm
RUNPATHS=

CFLAGS= -O2  -Wall  \
        $(IGNORE_MISSING_DATA) $(STRINGS) $(EPPL) $(PROJ) $(WMS) \
	$(ORACLESPATIAL) $(TIFF) $(JPEG) $(GD) $(PDF) $(SDE) $(OGR) $(GDAL) \
	$(POSTGIS) $(MPATROL) $(THREAD) \
	$(GD_INC) $(PDF_INC) $(PROJ_INC) $(TIFF_INC) $(JPEG_INC) $(EGIS_INC)
$(SDE_INC) \
	$(REGEX_INC) $(MPATROL_INC) $(OGR_INC) $(GDAL_INC) $(POSTGIS_INC) \
	$(WWW_INC) $(ORACLESPATIAL_INC)

# Link flags and shared libs only
LDFLAGS=  $(RUNPATHS) -L. -lmap $(GD_LIB) $(PDF_LIB) $(TIFF_LIB) $(PROJ_LIB)
\
          $(JPEG_LIB) $(EGIS_LIB) $(SDE_LIB) $(OGR_LIB) $(GDAL_LIB) \
	  $(POSTGIS_LIB) $(WWW_LIB) $(ORACLESPATIAL_LIB) $(MPATROL_LIB) \
	  $(THREAD_LIB) $(XTRALIBS)

# STATIC_LIBS is full filename with path of libs that will be statically
linked
STATIC_LIBS= $(GD_STATIC) $(OGR_STATIC)

RM= /bin/rm -f

OBJS= maptemplate.o mapbits.o maphash.o mapshape.o mapxbase.o mapparser.o
maplexer.o maptree.o mapsearch.o mapstring.o mapsymbol.o mapfile.o
maplegend.o maputil.o mapscale.o mapquery.o maplabel.o maperror.o
mapprimitive.o mapproject.o mapraster.o mapsde.o mapogr.o mappostgis.o
maplayer.o mapresample.o mapwms.o mapwmslayer.o maporaclespatial.o mapgml.o
mapprojhack.o mapthread.o $(EPPL_OBJ) $(REGEX_OBJ) $(PDF_OBJ)

#
# --- You shouldn't have to edit anything else. ---
#
.c.o:
	$(CC) -c $(CFLAGS) $< -o $@

all: $(MAKE_GD) $(MAKE_EGIS) libmap.a shp2img shp2pdf legend \
	mapserv shptree shptreevis shptreetst scalebar sortshp perlvars \
	tile4ms php3_mapscript

egis::
	cd egis/errLog; make; cd ..
	cd egis/imgSrc; make; cd ..
	cd egis; make; cd ..

php3_mapscript:: libmap.a
	cd mapscript/php3; $(MAKE); cd ../..

maplexer.o: maplexer.c map.h mapfile.h

maplexer.c: maplexer.l
	$(LEX) -Pmsyy -i -omaplexer.c maplexer.l

mapparser.o: mapparser.c map.h

mapparser.c: mapparser.y
	$(YACC) -p msyy -d -omapparser.c mapparser.y

mapogr.o: mapogr.cpp
	$(CXX) -c $(CFLAGS) mapogr.cpp -o mapogr.o

lib: libmap.a
libmap: libmap.a
libmap.a: map.h $(OBJS) map.h
	$(AR) libmap.a $(OBJS)
	$(RANLIB) libmap.a

shp2pdf: libmap.a shp2pdf.o map.h
	$(LD) $(CFLAGS) shp2pdf.o $(LDFLAGS) $(STATIC_LIBS) -o shp2pdf

shp2img: libmap.a  shp2img.o map.h
	$(LD) $(CFLAGS) shp2img.o $(LDFLAGS) $(STATIC_LIBS) -o shp2img

sym2img: libmap.a   sym2img.o map.h
	$(LD) $(CFLAGS) sym2img.o $(LDFLAGS) $(STATIC_LIBS) -o sym2img

legend: libmap.a  legend.o map.h
	$(LD) $(CFLAGS) legend.o $(LDFLAGS) $(STATIC_LIBS) -o legend

scalebar: libmap.a  scalebar.o map.h
	$(LD) $(CFLAGS) scalebar.o $(LDFLAGS) $(STATIC_LIBS) -o scalebar

mapserv: mapserv.h libmap.a  mapserv.o cgiutil.o map.h
	$(LD) $(CFLAGS) mapserv.o cgiutil.o  $(LDFLAGS) $(STATIC_LIBS) -o mapserv

shpindex: libmap.a shpindex.o map.h
	$(LD) $(CFLAGS) shpindex.o $(LDFLAGS) $(STATIC_LIBS) -o shpindex

shptree: libmap.a shptree.o map.h
	$(LD) $(CFLAGS) shptree.o $(LDFLAGS) $(STATIC_LIBS) -o shptree

shptreevis: libmap.a shptreevis.o map.h
	$(LD) $(CFLAGS) shptreevis.o $(LDFLAGS) $(STATIC_LIBS) -o shptreevis

shptreetst: libmap.a shptreetst.o map.h
	$(LD) $(CFLAGS) shptreetst.o $(LDFLAGS) $(STATIC_LIBS) -o shptreetst

sortshp: sortshp.o
	$(LD) $(CFLAGS) sortshp.o $(LDFLAGS) $(STATIC_LIBS) -o sortshp

tile4ms: tile4ms.o
	$(LD) $(CFLAGS) tile4ms.o $(LDFLAGS) $(STATIC_LIBS) -o tile4ms

perlvars:
	touch perlvars
	pwd > perlvars
	echo $(IGNORE_MISSING_DATA) $(STRINGS) $(EPPL) $(PROJ) $(TTF) $(TIFF)
$(JPEG) $(GD) $(SDE) $(OGR) $(GDAL) >> perlvars
	echo -I. $(PROJ_INC) $(GD_INC) $(TTF_INC) $(TIFF_INC) $(JPEG_INC)
$(SDE_INC) $(OGR_INC) $(GDAL_INC) >> perlvars
	echo $(LDFLAGS) >> perlvars
	echo $(STATIC_LIBS) >> perlvars

egis_clean:
	cd egis/errLog; $(MAKE) clean; cd ..
	cd egis/imgSrc; $(MAKE) clean; cd ..
	cd egis; $(MAKE) clean; cd ..

php3_mapscript_clean::
	cd mapscript/php3; $(MAKE) clean; cd ../..

install: libmap.a
	cp -f libmap.a $(LIB_INSTALL)
	cp -f map.h $(HEADER_INSTALL)

clean:	$(MAKE_EGIS_CLEAN) php3_mapscript_clean
	rm -f libmap.a *.o shp2img shp2pdf mapserv legend shptree shptreevis
shptreetst scalebar sortshp perlvars

distclean:
	$(MAKE) clean
	rm config.*

sorta-clean:
	rm -f *.o






> -----Original Message-----
> From: mapserver-users-admin at lists.gis.umn.edu
> [mailto:mapserver-users-admin at lists.gis.umn.edu]On Behalf Of Steve Lime
> Sent: Wednesday, April 30, 2003 12:00 AM
> To: r000t at adelphia.net; benjamin.thelen at ccgis.de
> Cc: mapserver-users at lists.gis.umn.edu
> Subject: Re: [Mapserver-users] Compiling stops: cannto find -lPDF
>
>
> Is your shared library setup correct. Check out /etc/ld.so.conf and the
> command ldconfig.
>
> Steve
>
> >>> R00T <r000t at adelphia.net> 04/29/03 10:04AM >>>
> I seem to be having a problem with shp2img myself on RedHat 9.......
>
>
>
> -jim
>
>
>
> On Tue, 2003-04-29 at 10:48, Benjamin Thelen wrote:
> > Hi,
> >
> > after finally ./configure was successful, make stops. Please see
> below:
> >
> > root at qwertzuiop# make
> > gcc -O2  -Wall   -DIGNORE_MISSING_DATA  -DUSE_EPPL -DUSE_PROJ
> -DUSE_PROJ_API
> > _H -DUSE_WMS -DUSE_WMS_LYR   -DUSE_TIFF -DUSE_JPEG -DUSE_GD_GIF
> -DUSE_GD_PNG
> >  -DUSE_GD_JPEG -DUSE_GD_WBMP -DUSE_GD_FT -DGD_HAS_GDIMAGEGIFPTR
> -DUSE_PDF  -
> > DUSE_OGR -DUSE_GDAL  -DUSE_POSTGIS    -I/usr/local/include
> -I/usr/local/incl
> > ude -I/usr/local/include  -I/usr/local/include
> -I/usr/local/include -I/
> > usr/local/include -I/usr/local/include  -I/usr/local/include
> -I/usr/local/in
> > clude/w3c-libwww -DHAVE_CONFIG_H
> >
> > shp2img.o  -L. -lmap -lgd -L/usr/local/lib -lgd -L/usr/local/lib
> -ljpeg -L/u
> > sr/local/lib -lfreetype -lz -L/usr/local/lib -lpng -lz
> -L/usr/local/lib -lPD
> > F -ltiff -L/usr/local/lib -ljpeg -L/usr/local/lib -lfreetype -lz
> -L/usr/loca
> > l/lib -lpng -lz -L/usr/local/lib -lproj  -L/usr/local/lib -ljpeg
> -L/usr/lo
> > cal/lib -lgdal.1.1   -L/usr/local/lib -lpq -L/usr/local/lib -lwwwxml
> -lxmlto
> > k -lxmlparse -lwwwzip -lwwwinit -lwwwapp -lwwwhtml -lwwwtelnet
> -lwwwnews -lw
> > wwhttp -lwwwmime -lwwwgopher -lwwwftp -lwwwfile -lwwwdir -lwwwcache
> -lwwwstr
> > eam -lwwwmux -lwwwtrans -lwwwcore -lwwwutils -lmd5 -lz     -lm   -o
> shp2img
> > /usr/libexec/elf/ld: cannot find -lPDF
> > *** Error code 1
> >
> > Stop in /tmp/downloaded/mapserver-3.6.5.
> >
> >
> >
> > I don't understand, why make cannot find lPDF, because of this
> (excerpt from
> > configure-output):
> >
> > checking whether we should include PDF support...
> >         using libpdf from -L/usr/local/lib -lPDF.
> >
> >
> > This seems to be quite obvious no error. The complete
> configure-output is
> > below. I have installed libPDF 4.x and libPDF 5.0.0. Is it one to
> much?
> >
> >
> > Has anybody an idea?
> >
> >
> > Thanks,
> > Benjamin
> >
> >
> >
> >
> >
> > ./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... (cached) 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... (cached) yes
> > checking whether gcc accepts -g... (cached) yes
> > checking for c++... (cached) 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++... (cached) yes
> > checking whether c++ accepts -g... (cached) yes
> > checking for ranlib... (cached) ranlib
> > checking for flex... (cached) flex
> > checking for yywrap in -lfl... (cached) yes
> > checking for bison... (cached) bison -y
> > checking if compiler supports -R... (cached) yes
> > checking for exp in -lm... (cached) yes
> > checking how to run the C preprocessor... (cached) gcc -E
> > checking for ANSI C header files... (cached) yes
> > checking for strcasecmp... (cached) yes
> > checking for strncasecmp... (cached) yes
> > checking for strdup... (cached) 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... (cached)
> /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... (cached) /usr/local/bin/gdal-config
> > checking for OGRRegisterAll in -lgdal.1.1... (cached) yes
> >         using OGR from system libs.
> > checking if GDAL support requested... yes
> > checking if PostGIS support requested... yes
> > checking for pg_config... (cached) /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... (cached) /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... (cached) 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... no
> >         PHP/MapScript module configured.
> > updating cache ./config.cache
> > creating ./config.status
> > creating Makefile
> > creating mapscript/php3/Makefile
> >
> > _______________________________________________
> > 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
> _______________________________________________
> 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