Tk Source Code

View Ticket
Login
Ticket UUID: 1592667
Title: tkUnixRFont.c fails to compile on Solaris
Type: Bug Version: obsolete: 8.5a5
Submitter: lvirden Created on: 2006-11-08 14:36:52
Subsystem: 46. Unix Fonts Assigned To: hobbs
Priority: 5 Medium Severity:
Status: Closed Last Modified: 2026-10-22 17:22:34
Resolution: Fixed Closed By: serhiy.storchaka
    Closed on: 2026-09-24 20:31:04
Description:
platform sparc solaris 9, sun c compiler, tk cvs head
(downloaded from activestate ftp site). 
configured with
with options \"'--prefix=/volws/lwv27/ldatae'
'--enable-shared' '--enable-symbols' '--enable-stubs'
'--enable-langinfo' 'CC=cc'\"



cc -c -g   -KPIC -I/vol/tclsrcsol/tcl85/tk/unix/../unix
-I/vol/tclsrcsol/tcl85/tk/u
nix/../generic
-I/vol/tclsrcsol/tcl85/tk/unix/../bitmaps
-I/vol/tclsrcsol/tcl85/tcl
/generic -I/vol/tclsrcsol/tcl85/tcl/unix
-I/usr/openwin/include -DPACKAGE_NAME=\"tk
\" -DPACKAGE_TARNAME=\"tk\" -DPACKAGE_VERSION=\"8.5\"
-DPACKAGE_STRING=\"tk\ 8.5\" 
-DPACKAGE_BUGREPORT=\"\" -DSTDC_HEADERS=1
-DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 
-DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1
-DHAVE_STRINGS_H=1 -DHAVE_INT
TYPES_H=1 -DHAVE_UNISTD_H=1 -DHAVE_LIMITS_H=1
-DUSE_THREAD_ALLOC=1 -D_REENTRANT=1 -
D_POSIX_PTHREAD_SEMANTICS=1 -D_THREAD_SAFE=1
-DHAVE_PTHREAD_ATTR_SETSTACKSIZE=1 -DT
CL_THREADS=1 -D_REENTRANT=1
-D_POSIX_PTHREAD_SEMANTICS=1 -DTCL_SHLIB_EXT=\".so\" -D
TCL_CFG_DEBUG=1 -DTCL_WIDE_INT_TYPE=long\ long
-DHAVE_STRUCT_DIRENT64=1 -DHAVE_STRU
CT_STAT64=1 -DHAVE_OPEN64=1 -DHAVE_LSEEK64=1
-DHAVE_TYPE_OFF64_T=1 -DWORDS_BIGENDIA
N=1 -DHAVE_SYS_TIME_H=1 -DTIME_WITH_SYS_TIME=1
-Dstrtod=fixstrtod -DHAVE_PW_GECOS=1
 -DHAVE_XSS=1 -DHAVE_XFT=1      -DTCL_NO_DEPRECATED 
-DUSE_TCL_STUBS  -I/usr/openwi
n/include  
/vol/tclsrcsol/tcl85/tk/unix/../unix/tkUnixRFont.c
"/usr/openwin/include/X11/Xft/Xft.h", line 35: cannot
find include file: <ft2build.
h>
"/usr/openwin/include/X11/Xft/Xft.h", line 36: bad file
specification
"/usr/openwin/include/X11/Xft/Xft.h", line 53: syntax
error before or at: _XftFTlib
rary
"/usr/openwin/include/X11/Xft/Xft.h", line 53: warning:
old-style declaration or in
correct type for: _XftFTlibrary
"/usr/openwin/include/X11/Xft/Xft.h", line 87: syntax
error before or at: FT_UInt
"/usr/openwin/include/X11/Xft/Xft.h", line 87: cannot
recover from previous errors
cc: acomp failed for
/vol/tclsrcsol/tcl85/tk/unix/../unix/tkUnixRFont.c
gmake: *** [tkUnixRFont.o] Error 2
User Comments: serhiy.storchaka added on 2026-09-24 20:31:04:

Fixed in 8.5a6 by [aa33d6e2b3]: configure disables Xft if Xft.h does not compile (e.g. without the freetype headers). The link check that later broke --as-needed builds was replaced by a check for XftFontOpen ([4d50f30ce5]). Closing.


jenglish added on 2011-03-08 21:32:45:
rmax notes on the chat (2011-03-08):

rmaxopenSUSE 11.4 will ship with a Tk build that doesn't have freetype support compiled in. :(
dkfwhy?
rmaxdkf: a chain of unfortunate events starting with bug #1592667.
rmaxA sanity check that went in to prevent building against broken Xft builds now breaks perfectly working ones.
rmaxIt got triggered by openSUSE's global adding of the --as-needed linker flag.
rmaxThe test expects to be able to resolve symbols from libfreetype after linking against libXft, which is not the case when linking with --as-needed and no direct dependency on one of the symbols in libXft.
rmaxThe build itself would work perfectly well, only the config test fails and hence xft support gets disable.d
rmaxI'd remove those tests anyways. People with present but broken xft libraries should be forced to use --disable-xft rather than disabling it silently.
rmax... or leave the test in, but make it a fatal error for configure asking the user to fix his setup or use --disable.
rmaxSo, would it be OK with you if I just removed the AC_CHECK_LIB(Xft, FT_New_Face, ...) and the if block around it?
kbkOr... The Right Thing, I suppose, would be to AC_CHECK_LIB for freetype, FT_New_Face (with spelling corrected as neeeded)
rmaxMy guess was that the test was there to check for freetype being statically linked into Xft.
rmaxBut reading the bug again shows that it was simply missing from the installation.

lvirden added on 2006-11-09 01:55:21:
Logged In: YES 
user_id=15949

 $ uname -a
SunOS srv29 5.9 Generic_118558-11 sun4u sparc SUNW,Sun-Fire-V440
 $ xft-config --cflags
ksh: xft-config:  not found
 $ pkg-config --cflags xft
-I/usr/openwin/include  
$ pkg-config --libs xft  
-R/usr/openwin/lib -L/usr/openwin/lib -lXft -lfontconfig

jenglish added on 2006-11-09 01:51:29:
Logged In: YES 
user_id=68433

lvirden -- could you run the following at the shell prompt
and report what they produce?

xft-config --cflags
xft-config --libs
pkg-config --cflags xft
pkg-config --libs xft

kennykb added on 2006-11-09 01:48:16:
Logged In: YES 
user_id=99768

This is symptomatic of a badly misconfigured Xft -
apparently Xft is present but freetype is not.
Added a few sanity checks in the configurator
to turn off Xft if programs using it will fail
to compile and/or link.