Opened 17 years ago

Closed 17 years ago

#2278 closed defect (fixed)

compile problems for mapserver 5.0 beta6

Reported by: havatv Owned by: dmorissette
Priority: normal Milestone: 5.0 release
Component: Build Problems Version: 5.0
Severity: blocker Keywords:
Cc: zjames

Description

I compiled mapserver 5.0 beta 5 successfully, but for beta 6 compilation of shp2img (the first executable) fails with the following error message. (gcc 3.3.2, Solaris 2.7)

g++ -g -O2 -fPIC -Wall -DNEED_NONBLOCKING_STDERR -DHAVE_VSNPRINTF -DNEED_STRLCAT -DUSE_EPPL -DUSE_PROJ -DUSE_WMS_SVR -DUSE_WMS_LYR -DUSE_WFS_SVR -DUSE_WFS_LYR -DUSE_WCS_SVR -DUSE_GD_GIF -DUSE_GD_PNG -DUSE_GD_JPEG -DUSE_GD_WBMP -DUSE_GD_FT -DGD_HAS_FTEX_XSHOW -DGD_HAS_GDIMAGEGIFPTR -DGD_HAS_GETBITMAPFONTS -DUSE_AGG -DUSE_PDF -DUSE_SDE -DUSE_OGR -DUSE_GDAL -DUSE_ICONV -DUSE_POSTGIS -DUSE_ZLIB -I/usr/local/include -I/usr/local/include/agg2 -I/usr/local/include/freetype2 -I/usr/local/include -I/usr/local/include -I/usr/local/include -I/users/ikf/sde/sdeexe80/include -I/usr/local/include -I/usr/local/pgsql/815/include -I/usr/local/include -I/usr/local/include -I/usr/local/include shp2img.o -L. -lmapserver -L/usr/local/lib -lgd -ljpeg -lfreetype -L/usr/local/lib -lpng -L/usr/local/lib -lz -lXpm -lX11 -L/usr/local/lib -lagg -laggfontfreetype -L/usr/local/lib -lpdf -ljpeg -lfreetype -L/usr/local/lib -lpng -L/usr/local/lib -lz -lXpm -lX11 -L/usr/local/lib -lproj -ljpeg -L/users/ikf/sde/sdeexe80/lib -lsde80 -lpe80 -lsg80 -lpthread -lsocket -ldl -L/usr/local/lib -lgdal -L/usr/local/lib -lgeos -lgeos_c -L/usr/local/lib -lxerces-c -lnetcdf -lpq -L/usr/local/pgsql/815/lib -lpq -lm -lrt -ldl -L/usr/local/lib -lcurl -L/usr/local/lib -R/usr/local/lib -R/usr/lib -L/usr/lib -R/usr/openwin/lib -L/usr/openwin/lib -L/usr/local/ssl/lib -R/usr/local/ssl/lib -L/usr/local/ssl/lib -lz -lssl -lcrypto -ldl -lsocket -lnsl -L/usr/local/pgsql/815/lib -lpq -L/usr/local/lib -lcurl -L/usr/local/lib -R/usr/local/lib -R/usr/lib -L/usr/lib -R/usr/openwin/lib -L/usr/openwin/lib -L/usr/local/ssl/lib -R/usr/local/ssl/lib -L/usr/local/ssl/lib -lz -lssl -lcrypto -l dl -lsocket -lnsl -L/usr/local/lib -liconv -L/usr/local/lib -lz -lm -lstdc++ -o shp2img

Undefined first referenced

symbol in file

PDF_load_font ./libmapserver.a(mappdf.o)

ld: fatal: Symbol referencing errors. No output written to shp2img

collect2: ld returned 1 exit status

make: * [shp2img] Error 1

Change History (7)

comment:1 by zjames, 17 years ago

Owner: changed from mapserverbugs to zjames
Status: newassigned

What version of PDFLib do you bave installed?

comment:2 by havatv, 17 years ago

It seems to be pdflib-4.0.3. The shared library file is named libpdf.so.1.1.3.

My configure is:

./configure --prefix=/usr/local --enable-debug --with-freetype=/usr/local --with-zlib=/usr/local --with-png=/usr/local --with-libiconv=/usr/local --with-gd=/usr/local --with-pdf=/usr/local --with-proj=/usr/local --with-sde=/users/ikf/sde/sdeexe80 --with-sde-version=80 --with-ogr=/usr/local/bin/gdal-config --with-gdal=/usr/local/bin/gdal-config --without-tiff --with-postgis=/usr/local/pgsql/815/bin/pg_config --with-wfs --with-wcs --with-wmsclient --with-wfsclient --with-httpd=/usr/local/apache2/bin/httpd --with-php=/usr/local --without-jpeg --with-agg=/usr/local

comment:3 by zjames, 17 years ago

The PDF_load_font call was introduced to resolve ticket #2142 and unless there is some compelling reason to stick with PDFLib 4.x, I recommend updating to something more recent (4.x was released 5 years ago; the current release is 7.x). The old font discovery method was not retrieving the right font except under a very specific set of circumstances and it's not obvious to me how to fix it while maintaining compatibility with PDFLib 4.x.

comment:4 by dmorissette, 17 years ago

Owner: changed from zjames to dmorissette
Status: assignednew

I think the conclusion is that we need a more recent version of PDFLib. Do you know which version is required Zak?

We should add some AC_CHECK_LIB(...PDF_load_font...) checks in configure.in to report an error if pdflib is too old. I'll take care of that.

comment:5 by zjames, 17 years ago

Cc: zjames added

From what I can determine, PDFLib 5 introduced that function and deprecated PDF_find_font (subsequent versions removed it completely). PDFLib 5 is also the first version that supports unicode completely.

Thanks Daniel.

comment:6 by havatv, 17 years ago

It compiles OK with PDFlib Lite 7.0.2.

PDF documentation on <URL: http://mapserver.gis.umn.edu/docs/howto/pdf-output>, <URL: http://mapserver.gis.umn.edu/docs/howto/compiling_on_unix>, should be updated to reflect the new requirements.

comment:7 by dmorissette, 17 years ago

Resolution: fixed
Status: newclosed

Fixed.

I have added an AC_CHECK_LIB(...PDF_load_font...) in configure as mentioned above in r6761.

I did a quick web search and found refs to PDF_load_font in libpdf v5.x, so I have added a comment to the doc page listed above saying that v5 and up is required.

Note: See TracTickets for help on using tickets.