Opened 13 years ago

Last modified 13 years ago

#3769 closed defect

Compilation error with OpenGL support on mapserver 6.0.0 beta2 — at Version 1

Reported by: nhermann Owned by: dmorissette
Priority: normal Milestone: 6.0 release
Component: Build Problems Version: unspecified
Severity: normal Keywords:
Cc: tbonfort

Description (last modified by dmorissette)

Environment: Debian Squeeze (stable) mapserver-6.0.0-beta2

If I am adding the option --with-opengl=/usr --with-ftgl to the following configure statement

./configure --with-wfsclient --with-wfs --with-wmsclient --without-tiff --with-jpeg=/usr --with-ogr=/usr/local/bin/gdal-config --with-freetype=/usr --with-png=/usr --with-proj=/usr --enable-debug --with-gd=/usr/local --with-gdal=/usr/local/bin/gdal-config --with-postgis=/usr/local/pgsql/bin/pg_config --with-curl-config=/usr/bin/curl-config --with-threads --with-httpd=/usr/local/apache2_ssl/bin/httpd --with-php=/usr/local/php5 --with-agg=/usr/local --with-geos=/usr/local/bin/geos-config --with-opengl=/usr --with-ftg

I get the following error message while building mapserver:

g++ -g  -fPIC -Wall     -DHAVE_VSNPRINTF -DNEED_STRLCPY -DNEED_STRLCAT -DNEED_STRRSTR           
-DUSE_WMS_LYR -DUSE_WFS_LYR  -DUSE_LIBXML2 -DUSE_CURL -DUSE_CURLOPT_PROXYAUTH   
-DUSE_WFS_SVR -DUSE_WMS_SVR  -DUSE_POSTGIS -DPOSTGIS_HAS_SERVER_VERSION 
-DUSE_GDAL -DUSE_OGR -DUSE_GEOS  -DUSE_THREAD -DUSE_PROJ -DUSE_AGG_SVG_SYMBOLS -DUSE_OGL -DUSE_FTGL   
-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 -DGD_HAS_GET_TRUE_COLOR_PIXEL -DUSE_ICONV 
-DUSE_GIF -DUSE_PNG -DUSE_ZLIB -DUSE_FREETYPE  -DDISABLE_CVSID 
-I/usr/include  -I/usr/include -I/usr/local/include -Irenderers/agg/include  
-I/usr/include -I/usr/include/FTGL/ -I/usr/include   -I/usr/local/include -I/usr/local/pgsql-844/include   
-I/usr/local/include    -I/usr/include/libxml2     
-c -o renderers/agg/src/agg_font_freetype.o renderers/agg/src/agg_font_freetype.cpp
In file included from renderers/agg/src/../include/agg_font_freetype.h:23,
                 from renderers/agg/src/agg_font_freetype.cpp:18:
/usr/include/ft2build.h:56:38: error: freetype/config/ftheader.h: Datei oder Verzeichnis nicht gefunden
In file included from renderers/agg/src/agg_font_freetype.cpp:18:
renderers/agg/src/../include/agg_font_freetype.h:24:10: error: #include expects "FILENAME" or <FILENAME>
In file included from renderers/agg/src/agg_font_freetype.cpp:18:
renderers/agg/src/../include/agg_font_freetype.h:61: error: ‘FT_Encoding’ has not been declared
renderers/agg/src/../include/agg_font_freetype.h:81: error: ‘FT_Encoding’ does not name a type

Datei oder Verzeichnis nicht gefunden = File not found

The ftheader.h file IS available at:

-rw-r--r-- 1 root root 24761 18. Nov 21:58 /usr/include/freetype2/freetype/config/ftheader.h

Do I have to add additional information to the configure statement or is something broken?

If i am removing the opengl option from the configure statement mapserver compiles fine.

Thanks for any hint.

Change History (1)

comment:1 by dmorissette, 13 years ago

Cc: tbonfort added
Component: MapServer C LibraryBuild Problems
Description: modified (diff)
Milestone: 6.0 release
Owner: changed from sdlime to dmorissette

Unfortunately I'm not setup to test this with opengl at the moment, but I had another look at the configure.in script and the only explanation I can find would be the following block of code in the --with-opengl block (around line 943 of configure.in):

  if test -n "$FTGL_LIB" ; then
     FT_INC=`$FTGL_LIB --cflags`
  else
     AC_MSG_ERROR([FTGL required for opengl support - please configure --with-ftgl.])
  fi

The assignment of FT_INC seems like a typo, and anyway, $FTGL_LIB is not a pointer to a binary at this point (it should be a set of -L linker args), so this assignment makes no sense and probably just happens to overwrite the FT_INC value and cause the side-effect on the Freetype include path that you noticed.

Can you try to replace the block above around line 943 of configure.in with the following, then rerun autoconf and see if that solves the build issue?

  if test -z "$FTGL_LIB" ; then
     AC_MSG_ERROR([FTGL required for opengl support - please configure --with-ftgl.])
  fi
Note: See TracTickets for help on using tickets.