Unable to compile ROOT because of freetype2 error

I have the same issue on Ubuntu 14.04 with ROOT 5.34.18. Simply dropping the freetype directory from the include statement in graf2d/asimage/src/libAfterImage/asfont.c resolves the issue.

Changing line 67 from

to

Thanks ksmith, it worked also for me (Ubuntu 14.04 and Root 5.34.14)!

On Ubuntu 13.10 the same source used to compile flawlessy.

I also got a freetype include error compiling root 5-34-18 on Ubuntu 14.04, but rather than changing the root code, I just made a symbolic link in /usr/include:

user@host:/usr/include$ sudo ln -s freetype2 freetype

which fixed the compilation problem for me.

I am having a similar problem, under 14.04. I did the linking, as users above suggested, and now
my build hangs on the following line:

No idea what’s going on I too am using 5.34.18

UPDATE:
I control-C-ed the above process, and run make install. And all appears to work!

I got stuck to the same point, until pressing got me back to the prompt… and ROOT seemed to work. Until I tried to Draw() a TH1F, then it crashed.

I decided to go for the installation of the Ubuntu ROOT packages from the Software Center.

user@host:/usr/include$ sudo ln -s freetype2 freetype

worked for me :

ROOT 5.99/06 (heads/myconfigure@v5-99-06-869-gf517a9f, May 27 2014, 10:57:39 on linuxx8664gcc)
g+±4.9 (Debian 4.9.0-4) 4.9.0
x86_64 / Debian Sid / GNU Linux 3.14.4-1

Thanks…

Thanks ksmith, it worked for me as well in Ubuntu 14.04 and root 5.34.18 :slight_smile:

[quote=“blizar”]I have the same problem and I bypass it by making a link
ln -s /usr/include/freetype2 /usr/include/freetype
(yes you need to be root)
code tries to include “freetype/freetype.h”

I suppose configure doesn’t deal correctly these new freetype version.[/quote]

I also come across this problem but I use the above way and it is OK for me .

[quote=“ksmith”]I have the same issue on Ubuntu 14.04 with ROOT 5.34.18. Simply dropping the freetype directory from the include statement in graf2d/asimage/src/libAfterImage/asfont.c resolves the issue.

Changing line 67 from

to

I also just ran into this problem (same linux and root versions) and found ksmith’s solution to be most adequate. cheers.

In $ROOTSYS/graf2d/asimage/src/libAfterImage/config.h,
I have commented out the following line :
/* Define if libFreeType has freetype.h in freetype/ */
// #define HAVE_FREETYPE_FREETYPE

Doing so, ROOT installation is successful, and I’ve opened some old root files where Trees and histograms are there; I’ve checked those histogram plots and also from ROOT-tree, they are coming well.

But I’ve no idea whether this deactivation of the line in config.h file will affect somewhere else or not.

I was facing the same problem as reported by aregjan and davide84 while compiling ROOT-5.34.18 under Ubuntu 14.04. I finally solved it by installing all Linux packages listed as most common optional packages at http://root.cern.ch/drupal/content/build-prerequisites. It seems that the bug occurs due to a missing package…

[quote=“jtm”]I also got a freetype include error compiling root 5-34-18 on Ubuntu 14.04, but rather than changing the root code, I just made a symbolic link in /usr/include:

user@host:/usr/include$ sudo ln -s freetype2 freetype

which fixed the compilation problem for me.[/quote]
I had to compile ROOT on a new machine, because of Ubuntu packages lack of QtRoot. The linking trick worked for me, thank you :smiley: