Hi all,
I am trying to compile root on System76 Gazelle Professional laptop running Arch linux. I did git clone root.cern.ch/git/root.git, cd’d into the root directory, and did ./configure.
When execute make, I get the following error,
[code]make[1]: Entering directory '/home/raphael/root/graf2d/asimage/src/libAfterImage’
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
It looks like you do not have freetype installed on your machine. You can use the one coming with ROOT.
Redo the configure command with the option --enable-builtin-freetype
I do have them installed. I very recently installed the infinality fonts bundle, but that still has the freetype fonts. I also ran into the same compilation error before I installed the bundle.
Anyways, I tried
and then make, but I still get the same error. So now I’m really lost.
I’m having the same trouble compiling 5.34.13 on ArchLinux x86_64. I have configured the build without internal freetype:
Checking for freetype-config ...
Checking for libfreetype version >= 9.3.0
Result: ok
Checking whether to build included libfreetype6
Result: no
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. I think it can be a problem with preprocessor flags since inside asfont.c I read:
# ifdef HAVE_FREETYPE_FREETYPE
# include <freetype/freetype.h>
# else
# include <freetype.h>
# endif
I don’t know what is the purpose of HAVE_FREETYPE_FREETYPE but it seems that in this case it has been wrongly defined while it should be left undefined.
By the way, I had no problem in compiling Root 5.34.10 (didn’t try with 5.34.11 and 5.34.12).
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?
[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.
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
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?
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.
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…