Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 505924

Summary: dev-perl/perl-tk-804.31.0-r1 with media-libs/freetype-2.5.3-r1 - defective TrueType font rendering
Product: Gentoo Linux Reporter: Andreas Proteus <proteuss>
Component: [OLD] DevelopmentAssignee: Gentoo Perl team <perl>
Status: RESOLVED FIXED    
Severity: normal CC: halcon
Priority: Normal    
Version: unspecified   
Hardware: x86   
OS: Linux   
See Also: https://bugs.gentoo.org/show_bug.cgi?id=513688
Whiteboard:
Package list:
Runtime testing required: ---
Bug Depends on:    
Bug Blocks: 493570    
Attachments: The build.log
My emerge.info

Description Andreas Proteus 2014-03-27 03:57:40 UTC
Created attachment 373616 [details]
The build.log

After rebuilding perl-tk I noticed that the true type fonts rendering has gone
completely wrong. 
Example: http://imageshack.com/a/img513/4758/1wju.png
Whereas it should be like this: 
http://imageshack.com/a/img829/1224/pzlw.png 

The package compiles without errors but upon inspecting the build log I find:
                                             
---------------------------------------------------------------
Using -L/usr/lib/../lib to find /usr/lib/../lib/libX11.so.6.3.0
Cannot find X include files via /include
Using -I/usr/include to find /usr/include/X11/Xlib.h
Cannot find freetype.h include file
Writing Tk/Config.pm
Writing pTk/tkConfig.h
Checking if your kit is complete...
Warning: the following files are missing in your kit:
	build
Please inform the author.
'X11ROOT' is not a known MakeMaker parameter name.
'XFT' is not a known MakeMaker parameter name.        
---------------------------------------------------------------

It appears that it cannot find freetype.h and that the parameter XFT=1 is not
valid any longer. 

My temporary work around this problem:

emerge =media-libs/freetype-2.5.0.1
emerge perl-tk
Finally emerge the latest version.
emerge freetype.

As long as I do not rebuild perl-tk the fonts show fine.
Comment 1 Andreas Proteus 2014-03-27 03:58:25 UTC
Created attachment 373618 [details]
My emerge.info
Comment 2 Rafał Mużyło 2014-03-27 22:33:01 UTC
From the build log:
> Cannot find freetype.h include file

So, what are the chances that it's a variation of the type, that bug 504332 is ?
Comment 3 Andreas Proteus 2014-03-28 02:28:18 UTC
(In reply to Rafał Mużyło from comment #2)

> So, what are the chances that it's a variation of the type, that bug 504332
> is ?

The link freetype -> freetype2 does nothing in this case.
Comment 4 Rafał Mużyło 2014-03-28 09:07:37 UTC
(In reply to Andreas Proteus from comment #3)
> (In reply to Rafał Mużyło from comment #2)
> 
> > So, what are the chances that it's a variation of the type, that bug 504332
> > is ?
> 
> The link freetype -> freetype2 does nothing in this case.

I've meant something like my first comment there.
Comment 5 Andreas Proteus 2014-03-28 10:00:37 UTC
(In reply to Rafał Mużyło from comment #4)
> I've meant something like my first comment there.

Can you tell me where these includes are suposed to be in this case?
Comment 6 Rafał Mużyło 2014-03-28 11:22:17 UTC
(In reply to Andreas Proteus from comment #5)
> (In reply to Rafał Mużyło from comment #4)
> > I've meant something like my first comment there.
> 
> Can you tell me where these includes are supposed to be in this case?

That was actually meant as homework for you, but :sigh:

For what little I know about perl, it seems the problem lies in myConfig and is not as much an header as a pure path problem. But it *seems* that check is somewhat redundant as only Xft seems to be used directly (that's by casual grep, so it's just a guess).
Comment 7 Andreas Proteus 2014-03-28 21:28:21 UTC
(In reply to Rafał Mużyło from comment #6)
myConfig, after locating the various header files, test compiles and runs
config/xft.c (see source directory). If this is successful it enables XFT
support, otherwise it proceeds to build perl-tk without it.

If I edit line 146 of myConfig I can make  the message "Cannot find freetype.h" 
go away by changing line 146 to force it find freetype.h.
However it still fails to compile xft.c because it cannot locate some of its includes.

Bellow are the includes from xft.c:

----------------------------------------- 
#ifdef NEED_FT2BUILD_H
#include <ft2build.h>
#endif
#include <X11/Xlib.h>
#include <X11/Xft/Xft.h>
----------------------------------------- 
and the error message is:
/usr/include/X11/Xft/Xft.h:39:22: fatal error: ft2build.h: No such file or directory
i.e. Xft.h (part of libXft) cannot locate the freetype2 headers.

Any ideas?
Comment 8 Andreas Proteus 2014-06-18 13:13:38 UTC
Same problem with dev-perl/perl-tk-804.32.0
I filed a separate bug for this. See bug #513688
Comment 9 Pacho Ramos gentoo-dev 2014-07-05 18:10:06 UTC
*** Bug 513688 has been marked as a duplicate of this bug. ***
Comment 10 Alexey Mishustin 2014-09-28 15:57:36 UTC
> My temporary work around this problem:
> 
> emerge =media-libs/freetype-2.5.0.1
> emerge perl-tk
> Finally emerge the latest version.
> emerge freetype.

Thank you very much for this! It worked for me too. It wasn't easy now because freetype-2.5.0.1 has already gone away from the tree, but I have succeeded in installing it according to the instructions in [1].

My problem was that Perl-tk applications started to see non-antialiased fonts only (I listed all the contents of $mw->fontFamilies() ). And your workaround solved it. 

Interesting: this problem happened on my x86 machine only. On another machine, with all the same versions of perl, perl-tk, freetype - everything is OK.

CCed to this bug.

[1] http://superuser.com/questions/144907/how-to-install-a-old-ebuild-while-its-no-longer-in-the-portage-tree-for-exampl
Comment 11 Alexey Mishustin 2014-09-28 15:58:52 UTC
> Interesting: this problem happened on my x86 machine only. On another
> machine, with all the same versions of perl, perl-tk, freetype - everything
> is OK.

On another machine, amd64, ...
Comment 12 Andreas Proteus 2014-10-22 20:55:58 UTC
Problem fixed in version 804.32.0-r1