1 2 Previous Next 29 Replies Latest reply: Oct 14, 2012 3:03 PM by etresoft
garberal Level 1 Level 1 (0 points)
Hello,

I am trying to get Freetype support for GD. When I run gdlib-config --all, it returns:

GD library 2.0.34
includedir: /usr/include
cflags: -I/usr/include
ldflags:
libs: -lpng -lz -liconv
libdir: /usr/lib
features: GD_PNG GD_GIF GD_GIFANIM GD_OPENPOLYGON


...indicating no support for Freetype. Does anyone have information on how to recompile gdlib on Snow Leopard?


Thanks!

Andrew

Macbook Pro Intel Core i7, Mac OS X (10.6.7)
  • 1. Re: Help recompiling gdlib
    Linc Davis Level 10 Level 10 (117,875 points)
  • 2. Re: Help recompiling gdlib
    etresoft Level 7 Level 7 (24,270 points)
    I don't think this is one that macports can fix. The reasons behind freetype being missing are more complex. This thread: http://discussions.apple.com/message.jspa?messageID=12512596
    has a lot of good links for more information.
  • 3. Re: Help recompiling gdlib
    garberal Level 1 Level 1 (0 points)
    Thanks for the quick reply.

    I followed the link and the install seems beyond the scope of my abilities. Is it something that can be resolved by reverting to an older version of OSX or switching to Unix?
  • 4. Re: Help recompiling gdlib
    Linc Davis Level 10 Level 10 (117,875 points)
    I have port gd2 installed, version 2.0.35, and it supports freetype. I don't know exactly what it does, but it certainly builds. Why is that not a solution to the OP's problem?
  • 5. Re: Help recompiling gdlib
    Linc Davis Level 10 Level 10 (117,875 points)
    Mac OS X is UNIX. Reverting to an older version is inadvisable, and depending on your hardware, may be impossible.

    MacPorts is a lot easier than tinkering with makefiles and tracking down dependencies to get some random piece of code to build.

    Maybe if you explain what the ultimate goal is, someone will be better able to help you.
  • 6. Re: Help recompiling gdlib
    garberal Level 1 Level 1 (0 points)
    The goal is to work with a visualization software called Circos: http://mkweb.bcgsc.ca/circos/
    I have all of the requisite Perl modules installed, but when I run a diagnostic test on GD, a picture results, but there is no text where there should be.

    I was told that indicates that my install of GD (2.45) does not support Freetype. The suggested solution was to recompile my gdlib, since it was not compiled with Freetype.
  • 7. Re: Help recompiling gdlib
    Linc Davis Level 10 Level 10 (117,875 points)
    There is no built-in gdlib. Where did you get it?
  • 8. Re: Help recompiling gdlib
    etresoft Level 7 Level 7 (24,270 points)
    Linc Davis wrote:
    I have port gd2 installed, version 2.0.35, and it supports freetype. I don't know exactly what it does, but it certainly builds. Why is that not a solution to the OP's problem?


    Does it work? From what I understand, Freetype supports MacOSX fonts, but that logic is incompatible with other parts of GD and/or PHP. So, in order to build it for GD and PHP on MacOSX, you have to disable the MacOSX font logic and build it with support for only X11 fonts. If you are aware of that and don't expect to be able to use your system fonts, it should work fine.
  • 9. Re: Help recompiling gdlib
    garberal Level 1 Level 1 (0 points)
    Linc, I downloaded it from here: https://bitbucket.org/pierrejoye/gd-libgd/overview

    etresoft, if it means losing my system fonts, that may not be a tradeoff I'm willing to take. I need fonts for the type of work I do.
  • 10. Re: Help recompiling gdlib
    etresoft Level 7 Level 7 (24,270 points)
    garberal wrote:
    etresoft, if it means losing my system fonts, that may not be a tradeoff I'm willing to take. I need fonts for the type of work I do.


    You have fonts, they are just the X11 fonts. That is usually adequate for things people use GD and PHP for. Still, it might be worth trying to compile it again. It may have had improvements since the last time I looked at it.
  • 11. Re: Help recompiling gdlib
    garberal Level 1 Level 1 (0 points)
    Thanks for the help. If I need to go through those steps from the link you sent earlier, by modifying PHP and Apache, I'll probably break my computer.
  • 12. Re: Help recompiling gdlib
    etresoft Level 7 Level 7 (24,270 points)
    garberal wrote:
    Thanks for the help. If I need to go through those steps from the link you sent earlier, by modifying PHP and Apache, I'll probably break my computer.


    That is a a possibility. You can install a new, self-contained Apache/PHP/etc. with XAMPP: http://www.apachefriends.org/en/xampp-macosx.html

    That is probably the easiest, least invasive way to get GD running with freetype support.

    MacPorts will work too. It does something similar to XAMPP, only it isn't as self-contained. It will squirrel away new versions of PHP and maybe Apache in /opt or somewhere.

    Neither method will replace any built-in software. XAMPP is definitely more self-contained.
  • 13. Re: Help recompiling gdlib
    Linc Davis Level 10 Level 10 (117,875 points)
    Why not use the online version of the program on the site you linked to? That means no installation, versus a very difficult, advanced installation that you wouldn't know how to maintain, even if you ever got it working.
  • 14. Re: Help recompiling gdlib
    etresoft Level 7 Level 7 (24,270 points)
    garberal wrote:
    The goal is to work with a visualization software called Circos: http://mkweb.bcgsc.ca/circos/
    I have all of the requisite Perl modules installed, but when I run a diagnostic test on GD, a picture results, but there is no text where there should be.


    Wait. You aren't trying to run PHP. You are trying to use GD by itself with Perl. That is an entirely different matter.

    I was told that indicates that my install of GD (2.45) does not support Freetype. The suggested solution was to recompile my gdlib, since it was not compiled with Freetype.


    Unfortunately, GD seems to be a truly horrible, unsupported, and unmaintained library. It doesn't even have a web site and about the only way to get it is as part of PHP. Let me see what I can do with it...
1 2 Previous Next