|
Cross-compiling A5.0 Linux -> Win32, can't find FreeType |
SimonN
Member #8,272
January 2007
|
Hi, I am going to cross-compile Allegro 5.0.11 on Linux (64-bit Debian 6) for 32-bit Windows, using the MinGW 32-bit cross-compiler. I have successfully cross-compiled zlib and libpng, and installed them to /usr/i586-mingw32msvc/lib and /usr/i586-mingw32msvc/include. No problems here, Allegro 5's cmake script finds them and enables support. I got stuck on installing FreeType. I have successfully cross-compiled libfreetype.a and have an include directory with a single file, freetype2/ftconfig.h. I haven't figured what install path to give to FreeType's cmake, so I tried to install these manually: /usr/i586-mingw32msvc/lib/libfreetype.a ...but the A5 cmake file didn't find them, disabling support. Then I tried, also unsuccessfully: /usr/i586-mingw32msvc/local/lib/libfreetype.a So: Is FreeType needed at all on Windows for A5's TTF support? I suppose so? Where does A5's cmake process with MinGW look for FreeType? Is installing libfreetype.a and freetype2/ftconfig.h enough, or do I need to install all the FreeType headers? *** Edit: yes, this was the problem, see my reply below for detailed instructions. Maybe someone knows what switch to pass to FreeType's cmake to get the desired behavior for make install, but that's a bonus. ;-) |
SiegeLord
Member #7,827
October 2006
|
What cmake version are you using? I experimented with a few older cmake's the other day, and some of them definitely had trouble finding freetype. "For in much wisdom is much grief: and he that increases knowledge increases sorrow."-Ecclesiastes 1:18 |
SimonN
Member #8,272
January 2007
|
$ cmake --version I think it's what came with Debian 6. :-) |
SiegeLord
Member #7,827
October 2006
|
Yeah, try upgrading. You can download binaries from cmake's website and run them without installing. Grab the most recent one, it should be fine. "For in much wisdom is much grief: and he that increases knowledge increases sorrow."-Ecclesiastes 1:18 |
Edgar Reynaldo
Major Reynaldo
May 2007
|
When I use cmake for Allegro with FreeType I usually have to use cmake-gui to set FREETYPE_INCLUDE_DIR_freetype2 to the include folder where FreeType2 is. You need FreeType for ttf fonts. CMake 2.8.12.2 works for me. My Website! | EAGLE GUI Library Demos | My Deviant Art Gallery | Spiraloid Preview | A4 FontMaker | Skyline! (Missile Defense) Eagle and Allegro 5 binaries | Older Allegro 4 and 5 binaries | Allegro 5 compile guide |
SimonN
Member #8,272
January 2007
|
Thanks for the ideas. I am running cmake 3.2.0-rc2 now, and it still doesn't find Freetype for the cross-compiler. I'll try installing all possible freetype headers manually now. I start to believe the ftconfig.h is too little. ***************************** -- Found Freetype: /usr/i586-mingw32msvc/lib/libfreetype.a (found version "2.5.5") This file has been there all the time (!), but the missing headers were a problem. When building Freetype with cmake, it'll build an include/ directory in the cmake build dir. Installing that is too little, as suspected above. When doing a manual install of Freetype for MinGW, the correct thing seems to be: mkdir BuildDir !!@#@%, the forum kills my slashes in front of usr >_> In hindsight, I feel a little stupid for believing the single header to be eonugh. >_> Thanks to you two for tips! *********************** I'm getting many undefined references when building Allegro still, I couldn't fix them. This is sad. ******************** I've reverted to FreeType 2.4.12. This version doesn't build with cmake, but with autotools. Now that's much easier on the end user. ;-) rm -rf everything from FreeType 2.5.x earlier Then cmake Allegro with MinGW, which will find the lib, and make succeeds afterwards. |
Phrasz
Member #10,091
August 2008
|
What I've had last time I built: (Pretend $packageZIP is any FreeType tar.gz)
|
SimonN
Member #8,272
January 2007
|
Right, that's very similar to how I've successfully built Freetype 2.4.12. It looks cleaner than what I wrote, thanks. The initial problems came from configuring cmake, which is used to build the current Freetype 2.5.x. :-) |
|