[GRASS5] GRASS 6.0.2 and freetype failures

roger at spinn.net roger at spinn.net
Wed Mar 15 10:47:40 EST 2006


Folks, 

Perhaps someone could walk me through the process of getting freetype
to work on GRASS 6.0.2. 

I am running a stock SUSE 10.0 installation on an AMD64 box. 

I downloaded freetype-2.1.10.tar.gz, edited the configuration header
according to instruction in the TRUETYPE file in the
distribution to allow use of true type fonts, compiled the package
and installed it under /usr/local (default location). 

I download GRASS 6.0.2 and configured it with 

> configure \
>  --prefix=/opt \
>  --with-postgres-includes=/usr/include/pgsql \
>  --with-freetype-includes=/usr/local/include/freetype2 \
>  --enable-64-bit  \
>  --with-odbc \
>  --with-freetype

Grass compiled and installed, no errors were reported in error.log.
Warnings were generated in compiling d.font.freetype and
d.text.freetype.  I included the entire make output at the end of this
letter. 

I then ran
> d.mon start=x0
> d.font.freetype font=/usr/X11R6/lib/X11/fonts/truetype/FreeSans.ttf
> g.version|d.text

At that point the monitor died and I receive this message:
> *** glibc detected *** double free or corruption (out):
0x0000000000542040 ***
> ERROR eof from graphics driver.

According to the freetype documentation, freetype will handle a number
of different font types, so I tried (e.g.) Type1 fonts: 

> d.mon start=x0
> d.font.freetype font=/usr/X11R6/lib/X11/fonts/Type1/courb.pfa
> g.version|d.text

and received this message:
> *** glibc detected *** double free or corruption (out):
0x000000000055d5e0 ***
> ERROR eof from graphics driver.

I get similar results from other fonts. 

Anything you might suggest to get this working would be helpful. 


Roger Miller
Lee Wilson and Associates 


Make output: 

make[2]: Entering directory
`/home/grass/grass-6.0.2/display/d.text.freetype' gcc
 -I/home/grass/grass-6.0.2/include
 -I/home/grass/grass-6.0.2/dist.x86_64-unknown-linux-gnu/include/grass
 -g -O2  -Wall -Wconversion -Wno-implicit-int
 -I/usr/local/include/freetype2    -DPACKAGE=\""grassmods"\"
 -I/home/grass/grass-6.0.2/include
 -I/home/grass/grass-6.0.2/dist.x86_64-unknown-linux-gnu/include/grass \
       -o OBJ.x86_64-unknown-linux-gnu/main.o -c main.c main.c: In
function ‘main’:
main.c:333: warning: passing argument 2 of ‘FT_Set_Char_Size’ with
different width due to prototype
main.c:333: warning: passing argument 3 of ‘FT_Set_Char_Size’ with
different width due to prototype
main.c:345: warning: passing argument 3 of ‘get_coordinates’ with
different width due to prototype
main.c:345: warning: passing argument 4 of ‘get_coordinates’ with
different width due to prototype
main.c:401: warning: passing argument 3 of ‘get_coordinates’ with
different width due to prototype
main.c:401: warning: passing argument 4 of ‘get_coordinates’ with
different width due to prototype
main.c:414: warning: passing argument 3 of ‘__builtin_strncpy’ with
different width due to prototype
main.c:474: warning: passing argument 2 of ‘FT_Set_Char_Size’ with
different width due to prototype
main.c:474: warning: passing argument 3 of ‘FT_Set_Char_Size’ with
different width due to prototype
main.c:489: warning: passing argument 2 of ‘FT_Set_Char_Size’ with
different width due to prototype
main.c:489: warning: passing argument 3 of ‘FT_Set_Char_Size’ with
different width due to prototype
main.c:496: warning: passing argument 3 of ‘__builtin_strncpy’ with
different width due to prototype
main.c: In function ‘read_capfile’:
main.c:685: warning: passing argument 2 of ‘fgets’ with different width
due to prototype
main.c:702: warning: passing argument 2 of ‘G_realloc’ with different
width due to prototype
main.c: In function ‘convert_text’:
main.c:787: warning: dereferencing type-punned pointer will break
strict-aliasing rules
main.c:787: warning: passing argument 2 of ‘iconv’ from incompatible
pointer type
main.c:787: warning: passing argument 3 of ‘iconv’ from incompatible
pointer type
main.c:787: warning: passing argument 5 of ‘iconv’ from incompatible
pointer type
main.c: In function ‘get_color’:
main.c:870: warning: passing argument 1 of ‘R_reset_color’ with
different width due to prototype
main.c:870: warning: passing argument 2 of ‘R_reset_color’ with
different width due to prototype
main.c:870: warning: passing argument 3 of ‘R_reset_color’ with
different width due to prototype
main.c:878: warning: passing argument 1 of ‘R_reset_color’ with
different width due to prototype
main.c:878: warning: passing argument 2 of ‘R_reset_color’ with
different width due to prototype
main.c:878: warning: passing argument 3 of ‘R_reset_color’ with
different width due to prototype
main.c: In function ‘set_font’:
main.c:899: warning: passing argument 3 of ‘FT_New_Face’ with different
width due to prototype
main.c: In function ‘get_dimension’:
main.c:912: warning: passing argument 2 of ‘set_matrix’ as floating
rather than integer due to prototype
main.c:923: warning: passing argument 2 of ‘FT_Get_Char_Index’ with
different width due to prototype
main.c:925: warning: passing argument 2 of ‘FT_Load_Glyph’ as unsigned
due to prototype
main.c: In function ‘draw_character’:
main.c:1030: warning: passing argument 2 of ‘FT_Get_Char_Index’ with
different width due to prototype
main.c:1032: warning: passing argument 2 of ‘FT_Load_Glyph’ as unsigned
due to prototype
main.c:1050: warning: passing argument 3 of ‘memset’ with different
width due to prototype
main.c:1101: warning: pointer targets in passing argument 4 of
‘R_raster_char’ differ in signedness
main.c: In function ‘get_ll_coordinates’:
main.c:908: warning: ‘maxy’ may be used uninitialized in this function
main.c:908: warning: ‘minx’ may be used uninitialized in this function
main.c:908: warning: ‘maxx’ may be used uninitialized in this function
main.c:908: warning: ‘miny’ may be used uninitialized in this function
gcc -Wl,--export-dynamic
 -L/home/grass/grass-6.0.2/dist.x86_64-unknown-linux-gnu/lib
 -I/usr/local/include/freetype2    -DPACKAGE=\""grassmods"\"
 -o /home/grass/grass-6.0.2/dist.x86_64-unknown-linux-gnu/bin/d.text.freetype 
OBJ.x86_64-unknown-linux-gnu/main.o -lgrass_display -lgrass_raster 
 -lgrass_gis -lgrass_datetime -lz    -lfreetype   -lm  -lz
GISRC=/home/grass/grass-6.0.2/dist.x86_64-unknown-linux-gnu/demolocation/.gr 
assrc60 GISBASE=/home/grass/grass-6.0.2/dist.x86_64-unknown-linux-gnu 
PATH=/home/grass/grass-6.0.2/dist.x86_64-unknown-linux-gnu/bin:$PATH 
LD_LIBRARY_PATH="/home/grass/grass-6.0.2/dist.x86_64-unknown-linux-gnu/lib:/ 
opt/grass-6.0.1/lib:/opt/grass-6.0.1/lib" 
/home/grass/grass-6.0.2/dist.x86_64-unknown-linux-gnu/bin/d.text.freetype 
 --html-description | grep -v '</body>' > d.text.freetype.tmp.html ; true
WARNING:
        
/home/grass/grass-6.0.2/dist.x86_64-unknown-linux-gnu/etc/freetypecap:
        No FreeType definition file
echo "<HR>" >> d.text.freetype.tmp.html
echo "<P><a href=index.html>Help Index</a>" >> d.text.freetype.tmp.html
echo "</body></html>" >> d.text.freetype.tmp.html
mkdir -p /home/grass/grass-6.0.2/dist.x86_64-unknown-linux-gnu/docs/html
mv -f
d.text.freetype.tmp.html 
/home/grass/grass-6.0.2/dist.x86_64-unknown-linux-gnu/docs/html/d.text.freet 
ype.html
/usr/bin/install -c  *.png
*.jpg /home/grass/grass-6.0.2/dist.x86_64-unknown-linux-gnu/docs/html
2> /dev/null ; true
/usr/bin/install -c  -m 644
freetypecap 
/home/grass/grass-6.0.2/dist.x86_64-unknown-linux-gnu/etc/freetypecap
make[2]: Leaving directory
`/home/grass/grass-6.0.2/display/d.text.freetype'
d.font.freetype
make[2]: Entering directory
`/home/grass/grass-6.0.2/display/d.font.freetype'
gcc -I/home/grass/grass-6.0.2/include
 -I/home/grass/grass-6.0.2/dist.x86_64-unknown-linux-gnu/include/grass
 -g -O2  -Wall -Wconversion -Wno-implicit-int
 -I/usr/local/include/freetype2    -DPACKAGE=\""grassmods"\"
 -I/home/grass/grass-6.0.2/include
 -I/home/grass/grass-6.0.2/dist.x86_64-unknown-linux-gnu/include/grass \
       -o OBJ.x86_64-unknown-linux-gnu/main.o -c main.c
main.c: In function ‘isTrueTypeFont’:
main.c:151: warning: passing argument 3 of ‘FT_New_Face’ with different
width due to prototype
main.c: In function ‘read_capfile’:
main.c:211: warning: passing argument 2 of ‘fgets’ with different width
due to prototype
main.c:228: warning: passing argument 2 of ‘G_realloc’ with different
width due to prototype
gcc -Wl,--export-dynamic
 -L/home/grass/grass-6.0.2/dist.x86_64-unknown-linux-gnu/lib
 -I/usr/local/include/freetype2   -DPACKAGE=\""grassmods"\"
 -o /home/grass/grass-6.0.2/dist.x86_64-unknown-linux-gnu/bin/d.font.freetype 
OBJ.x86_64-unknown-linux-gnu/main.o -lgrass_display -lgrass_raster 
 -lgrass_gis -lgrass_datetime -lz    -lfreetype   -lm  -lz
GISRC=/home/grass/grass-6.0.2/dist.x86_64-unknown-linux-gnu/demolocation/.gr 
assrc60 GISBASE=/home/grass/grass-6.0.2/dist.x86_64-unknown-linux-gnu 
PATH=/home/grass/grass-6.0.2/dist.x86_64-unknown-linux-gnu/bin:$PATH 
LD_LIBRARY_PATH="/home/grass/grass-6.0.2/dist.x86_64-unknown-linux-gnu/lib:/ 
opt/grass-6.0.1/lib:/opt/grass-6.0.1/lib" 
/home/grass/grass-6.0.2/dist.x86_64-unknown-linux-gnu/bin/d.font.freetype 
 --html-description | grep -v '</body>' > d.font.freetype.tmp.html ; true
echo "<HR>" >> d.font.freetype.tmp.html
echo "<P><a href=index.html>Help Index</a>" >> d.font.freetype.tmp.html
echo "</body></html>" >> d.font.freetype.tmp.html
mkdir -p /home/grass/grass-6.0.2/dist.x86_64-unknown-linux-gnu/docs/html
mv -f
d.font.freetype.tmp.html 
/home/grass/grass-6.0.2/dist.x86_64-unknown-linux-gnu/docs/html/d.font.freet 
ype.html
/usr/bin/install -c  *.png
*.jpg /home/grass/grass-6.0.2/dist.x86_64-unknown-linux-gnu/docs/html
2> /dev/null ; true
make[2]: Leaving directory
`/home/grass/grass-6.0.2/display/d.font.freetype' 





More information about the grass-dev mailing list