Skip navigation

Help recompiling gdlib

5445 Views 29 Replies Latest reply: Oct 14, 2012 3:03 PM by etresoft RSS
1 2 Previous Next
garberal Calculating status...
Currently Being Moderated
Apr 14, 2011 8:01 PM
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)
  • Linc Davis Level 10 Level 10 (107,650 points)
    Currently Being Moderated
    Apr 14, 2011 8:04 PM (in response to garberal)
    Mac OS X (10.6.7)
  • etresoft Level 7 Level 7 (23,895 points)
    Currently Being Moderated
    Apr 14, 2011 8:15 PM (in response to garberal)
    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.
    MacBook 2007 (white), Mac OS X (10.6.6), + iMac 27" + iPad + MacBook Pro
  • Linc Davis Level 10 Level 10 (107,650 points)
    Currently Being Moderated
    Apr 14, 2011 8:29 PM (in response to etresoft)
    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?
    Mac OS X (10.6.7)
  • Linc Davis Level 10 Level 10 (107,650 points)
    Currently Being Moderated
    Apr 14, 2011 8:35 PM (in response to garberal)
    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.
    Mac OS X (10.6.7)
  • Linc Davis Level 10 Level 10 (107,650 points)
    Currently Being Moderated
    Apr 14, 2011 9:46 PM (in response to garberal)
    There is no built-in gdlib. Where did you get it?
    Mac OS X (10.6.7)
  • etresoft Level 7 Level 7 (23,895 points)
    Currently Being Moderated
    Apr 15, 2011 5:00 AM (in response to Linc Davis)
    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.
    MacBook 2007 (white), Mac OS X (10.6.6), + iMac 27" + iPad + MacBook Pro
  • etresoft Level 7 Level 7 (23,895 points)
    Currently Being Moderated
    Apr 15, 2011 5:41 AM (in response to garberal)
    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.
    MacBook 2007 (white), Mac OS X (10.6.6), + iMac 27" + iPad + MacBook Pro
  • etresoft Level 7 Level 7 (23,895 points)
    Currently Being Moderated
    Apr 15, 2011 8:14 AM (in response to garberal)
    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.
    MacBook 2007 (white), Mac OS X (10.6.6), + iMac 27" + iPad + MacBook Pro
  • Linc Davis Level 10 Level 10 (107,650 points)
    Currently Being Moderated
    Apr 15, 2011 8:29 AM (in response to garberal)
    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.
    Mac OS X (10.6.7)
  • etresoft Level 7 Level 7 (23,895 points)
    Currently Being Moderated
    Apr 15, 2011 10:03 AM (in response to garberal)
    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...
    MacBook 2007 (white), Mac OS X (10.6.6), + iMac 27" + iPad + MacBook Pro
1 2 Previous Next

Actions

More Like This

  • Retrieving data ...

Bookmarked By (0)

Legend

  • This solved my question - 10 points
  • This helped me - 5 points
This site contains user submitted content, comments and opinions and is for informational purposes only. Apple disclaims any and all liability for the acts, omissions and conduct of any third parties in connection with or related to your use of the site. All postings and use of the content on this site are subject to the Apple Support Communities Terms of Use.