Bug#215076: xfonts-scalable: [xftcache] SEGV on Type1 directory. : libfreetype.so may be the culprit.
Package: xfonts-scalable
Version: 4.2.1-12.1
Severity: normal
Followup-For: Bug #215076
-- System Information:
Debian Release: testing/unstable
Architecture: i386
Kernel: Linux duron 2.4.22 #72 Thu Sep 18 01:08:58 JST 2003 i686
Locale: LANG=ja_JP.ujis, LC_CTYPE=ja_JP.ujis (ignored: LC_ALL set to ja_JP.ujis)
Versions of packages xfonts-scalable depends on:
ii xutils 4.2.1-6 X Window System utility programs
-- no debconf information
I dug up the cause of the bug, or one of the pontetial bugs.
It seems that libfreetype.so might be to blame.
By replacing the libfreetype.so with a one that
I compiled using the source files found in XFree 4.3.0 source
release from www.xfree86.org, the xftcache succeeded and
apt-get succeeded, too!
What I did:
I tried to find out WHERE on earth xftcache failed.
Then I learned that xftcache seemed to be
replaced with a new program fc-cache. (Font management
under Xfree86 is so complex to comprehend.)
Anyway, when I ran fc-cache, it complained that
duron:/usr/local/lib# fc-cache
fc-cache: relocation error: /usr/lib/libfontconfig.so.1: undefined symbol: FT_Get_BDF_Property
Something is definitely WRONG in the packages (but which ONE?) that
xfonts-scalable seems to need.
So I tried to find out what exactly is the problem with xftcache.
What I did:
(i) I downloaded the Xfree86 4.3.0 source files from (the mirror)
of www.xfree86.org.
(ii) Patched the source using 4.3.0-4.3.0.1 diff patch available
at the same site.
Looked for xftcache. It is nowhere to be found!
It seems that xftcache has been removed in 4.3.x.
It was in Xfree86 4.2.y.
Now why are way dependent on xftcache then?
So now turning my focus on the missing symbol of fc-cache.
(iii) Compiled the Xfree86 after modifying site.def only to
find that extras/freetype (which is the FreeType 2 library)
doesn't get compiled under the normal compilation procedure.
(iv) So compiled the extras/freetype alone.
cd extras/freetype
make <--- This runs configure and setup for the subsequent
compilation.
make <--- This compiles the libraries and stuff.
make install <--- this installs the library and header
files under /usr/local
(v) I now ran fc-cache this time by
making sure that fc-cache picks up the newly installed
libfreetype.so which I compiled in the above steps.
However, fc-cache still complains.
env | grep LD_
LD_LIBRARY_PATH=/u2/starsuite6.0/lib:/usr/local/lib:
duron:/usr/local/lib# ldd /usr/bin/fc-cache
libfontconfig.so.1 => /usr/lib/libfontconfig.so.1 (0x40022000)
libfreetype.so.6 => /usr/local/lib/libfreetype.so.6 (0x40049000)
libz.so.1 => /usr/lib/libz.so.1 (0x40098000)
libexpat.so.1 => /usr/lib/libexpat.so.1 (0x400a7000)
libc.so.6 => /lib/libc.so.6 (0x400c5000)
/lib/ld-linux.so.2 => /lib/ld-linux.so.2 (0x40000000)
duron:/usr/local/lib# fc-cache
fc-cache: relocation error: /usr/lib/libfontconfig.so.1: undefined symbol: FT_Get_BDF_Property
duron:/usr/local/lib#
(vi) So I turned my attention to xftcache again.
Now, using the new libfreetype.so, now
xftcache seems to work just fine!!!
duron:/usr/local/lib# export LD_LIBRARY_PATH=/u2/starsuite6.0/lib:/usr/local/lib:
duron:/usr/local/lib# ldd /usr/bin/X11/xftcache
libXft.so.1 => /usr/X11R6/lib/libXft.so.1 (0x40022000)
libXrender.so.1 => /usr/X11R6/lib/libXrender.so.1 (0x4004c000)
libXext.so.6 => /usr/X11R6/lib/libXext.so.6 (0x40051000)
libX11.so.6 => /usr/X11R6/lib/libX11.so.6 (0x4005f000)
Note-> libfreetype.so.6 => /usr/local/lib/libfreetype.so.6 (0x40127000)
libc.so.6 => /lib/libc.so.6 (0x40176000)
libdl.so.2 => /lib/libdl.so.2 (0x402a4000)
/lib/ld-linux.so.2 => /lib/ld-linux.so.2 (0x40000000)
duron:/usr/local/lib# xftcache /usr/X11R6/lib/X11/fonts/Type1/
(Aha no error above!!!)
So I ran apt-get -u upgrade, which had failed previously because
xftcache error, now succeeded!
duron:/usr/local/lib# apt-get -u upgrade
Reading Package Lists... Done
Building Dependency Tree... Done
The following packages have been kept back
apt apt-utils aptitude bind9-host debconf dia dia-common dialog dnsutils dump
e2fsprogs gnupg graphviz icewm icewm-common lesstif1 libcupsys2
libhtml-parser-perl libldap2 libmime-base64-perl man-db netpbm perl perl-base
perl-doc po-debconf python2.3 qpopper quota samba samba-common squid sysvinit
w3m wenglish xbase-clients xdm xscreensaver-gl xutils
0 packages upgraded, 0 newly installed, 0 to remove and 39 not upgraded.
1 packages not fully installed or removed.
Need to get 0B of archives. After unpacking 0B will be used.
Do you want to continue? [Y/n]
xfonts-scalable (4.2.1-12.1) .... being setup (IN JAPANESE)....
Running update-fonts-scale in Speedo font directory...done.
Running update-fonts-dir in Speedo font directory...done.
Running xftcache in Speedo font directory...done.
Running update-fonts-scale in Type1 font directory...done.
Running update-fonts-dir in Type1 font directory...done.
Running xftcache in Type1 font directory...done.
Wow, success finally!?
duron:/usr/local/lib# env | grep LD_
LD_LIBRARY_PATH=/u2/starsuite6.0/lib:/usr/local/lib:
duron:/usr/local/lib# ls -l /usr/local/lib/libf*
-rw-r--r-- 1 root root 4724 2003-06-02 07:17 /usr/local/lib/libfl.a
-rw-r--r-- 1 root root 1973416 2003-10-19 01:41 /usr/local/lib/libfreetype.a
-rwxr-xr-x 1 root root 733 2003-10-19 01:41 /usr/local/lib/libfreetype.la
lrwxrwxrwx 1 root root 20 2003-10-19 01:41 /usr/local/lib/libfreetype.so -> libfreetype.so.6.3.1
lrwxrwxrwx 1 root root 20 2003-10-19 01:41 /usr/local/lib/libfreetype.so.6 -> libfreetype.so.6.3.1
-rwxr-xr-x 1 root root 1215751 2003-10-19 01:41 /usr/local/lib/libfreetype.so.6.3.1
duron:/usr/local/lib# ldd /usr/bin/X11/xftcache
libXft.so.1 => /usr/X11R6/lib/libXft.so.1 (0x40022000)
libXrender.so.1 => /usr/X11R6/lib/libXrender.so.1 (0x4004c000)
libXext.so.6 => /usr/X11R6/lib/libXext.so.6 (0x40051000)
libX11.so.6 => /usr/X11R6/lib/libX11.so.6 (0x4005f000)
libfreetype.so.6 => /usr/local/lib/libfreetype.so.6 (0x40127000)
libc.so.6 => /lib/libc.so.6 (0x40176000)
libdl.so.2 => /lib/libdl.so.2 (0x402a4000)
/lib/ld-linux.so.2 => /lib/ld-linux.so.2 (0x40000000)
duron:/usr/local/lib# ls -l /usr/lib/libfree*
-rw-r--r-- 1 root root 510372 2003-09-21 02:37 /usr/lib/libfreetype.a
-rw-r--r-- 1 root root 732 2003-09-21 02:36 /usr/lib/libfreetype.la
lrwxrwxrwx 1 root root 20 2003-10-18 21:58 /usr/lib/libfreetype.so -> libfreetype.so.6.3.4
lrwxrwxrwx 1 root root 20 2003-10-11 23:52 /usr/lib/libfreetype.so.6 -> libfreetype.so.6.3.4
-rw-r--r-- 1 root root 434204 2003-09-21 02:37 /usr/lib/libfreetype.so.6.3.4
duron:/usr/local/lib# ls -l /usr/local/lib/libfree*
-rw-r--r-- 1 root root 1973416 2003-10-19 01:41 /usr/local/lib/libfreetype.a
-rwxr-xr-x 1 root root 733 2003-10-19 01:41 /usr/local/lib/libfreetype.la
lrwxrwxrwx 1 root root 20 2003-10-19 01:41 /usr/local/lib/libfreetype.so -> libfreetype.so.6.3.1
lrwxrwxrwx 1 root root 20 2003-10-19 01:41 /usr/local/lib/libfreetype.so.6 -> libfreetype.so.6.3.1
-rwxr-xr-x 1 root root 1215751 2003-10-19 01:41 /usr/local/lib/libfreetype.so.6.3.1
duron:/usr/local/lib#
Hope this helps.
Something, somewhere is screwed up in XFree-relatedd release.
Reply to: