Yes the new freetype has change we have issue openned here:
sft.its.cern.ch/jira/browse/ROOT-5817?filter=-1
I am looking at it.
I tried to compile v5-34-10, because it Nicola was able to compile it. I tried:
I then ran configure and make again, but obtained the same freetype compile error.
I also pulled the latest changes from the master branch, but still no luck. Has anyone been able to compile it?
I have been able to work around this error. Going by what Nicola said, I created a freetype directory in /usr/include/freetype2 and made a symbolic link back to /usr/include/freetype2/freetype.h
[quote=“Nicola_Mori”]
In my system, the freetype headers are in /usr/include/freetype2/ and the build system correctly finds this path, but then I get:
gcc -m64 -O3 -DNO_DEBUG_OUTPUT -fPIC -I/usr/include/freetype2 -c asfont.c -o asfont.o
asfont.c:67:33: fatal error: freetype/freetype.h: No such file or directory
# include <freetype/freetype.h>
So the path is correctly passed to the compiler, but then in asfont.c the header is included as freetype/freetype.h rather than freetype.h, and I guess this where the error is generated. [/quote]
[quote=“jazzax”]I have been able to work around this error. Going by what Nicola said, I created a freetype directory in /usr/include/freetype2 and made a symbolic link back to /usr/include/freetype2/freetype.h
[/quote]
Hi, AFAIK you do not need workarounds anymore - this problem was fixed recently. Can you, please, try v5-34-00-patches or ROOT 6 (trunk)? Or do you have to work with some fixed release?
I am trying to compile the trunk. I got it using
However, I’m still getting the same compile error. I did git pull to make sure it was up to date. Am I missing something?
[quote=“shadeless”]I am trying to compile the trunk. I got it using
However, I’m still getting the same compile error. I did git pull to make sure it was up to date. Am I missing something?[/quote]
No, it should work. Probably, I’ve misunderstood something, I’ve seen this (it’s also related to the “new” freetype’s sources layout) : Mac OS X 10.9 / macport - compile issue so I was quite sure everything is ok with freetype now.
./configure --enable-builtin-freetype
with that it should be fine if you do not have freetype installed.( I have done in fix in trunk and 5.34)
you do not need and special link.
If you have freetype installed which version do you have ?
The flag HAVE_FREETYPE_FREETYPE
Is define in:
$ROOTSYS/graf2d/asimage/src/libAfterImage/config.h
the file is created thanks to:
$ROOTSYS/graf2d/asimage/src/libAfterImage/configure.in
Could it be that. on your machine, HAVE_FREETYPE_FREETYPE is wrongly defined (or not) ?
I have freetype2-infinality-ultimate 2.5.2-3 installed. Due to dependency issues, I haven’t figured out how to replace this patched version of freetype2 with the standard version.
When I try to compile, it looks for freetype.h in the a freetype directory. I have freetype.h in /usr/include/freetype2. That’s when it gives me the compile error.
I tried using configure --enable-builtin-freetype, but it still gives me the same error message. It’s odd that it’s still looking for that header.
In $ROOTSYS/graf2d/asimage/src/libAfterImage/config.h, I have
/* Define if libFreeType is available */
#define HAVE_FREETYPE 1
/* Define if libFreeType has freetype.h in freetype/ */
#define HAVE_FREETYPE_FREETYPE
/* Define to 1 if you have the <ft2build.h> header file. */
#define HAVE_FT2BUILD_H
what about if in config.h you remove
#define HAVE_FREETYPE_FREETYPE
It finally compiled after I commented out
After I did it, i just did ./configure without having to specify the --enable-builtin-freetype. That seems a little weird to me. Does it still think that freetype.h is in /usr/include/freetype instead of /usr/include/freetype2?
In principle configure tells you where freetype has been found.
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.
This is actually a packaging bug.
In asimage/src/libAfterImage/config.h.in
#define HAVE_FREETYPE_FREETYPE
is incorrectly set.
If you run “autoheader” in asimage/src/libAfterImage again it will create the correct config.h.in. “autoconf” and “configure” will create the correct defines to be able to compile…
I simply change the code of graf2d/asimage/src/libAfterImage/asfont.c
find “freetype/freetype.h”, change it with “freetype2/freetype.h”
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.