Skip navigation

Help recompiling gdlib

5447 Views 29 Replies Latest reply: Oct 14, 2012 3:03 PM by etresoft RSS
  • etresoft Level 7 Level 7 (23,895 points)
    Currently Being Moderated
    Apr 15, 2011 10:34 AM (in response to garberal)
    First of all - a question. What have you already installed? The only gd I have is the bundled one from PHP. I don't have any gdlib-config at all. The instructions below assume there isn't any standalone gd installed on your system.

    OK. Here is what you do:

    1) Download the source for libgd from: https://bitbucket.org/pierrejoye/gd-libgd/overview
    2) Extract the tar ball
    3) Edit the file src/configure.ac and remove the 4 lines that start with 'AM_ICONV'
    4) Go into the src directory and run: "ln -s ../config config" and "ln -s ../test test"
    5) Now (still in src) run "sh bootstrap.sh"
    6) Now (still in src) run "autoreconf -fvi"
    (Hopefully you have had no errors by this point)
    7) Now (still in src) run "./configure"

    On my machine, I am running 10.6.7 with Xcode3 and Xcode4 installed. In the past, I have installed a fair number of funky Perl modules. After running "./configure", my system reports:

    Support for PNG library: yes
    Support for JPEG library: yes
    Support for Freetype 2.x library: yes
    Support for Fontconfig library: yes
    Support for Xpm library: yes
    Support for pthreads: yes

    If yours doesn't say the same thing, you may have to go back and install some prerequisites.

    8) Run "make"
    9) Run "sudo make install"

    At this point, you have a standalone libgd installed in /usr/local. If you build all of your Perl modules, they should find that automatically. I don't know what GD they found before.
    MacBook 2007 (white), Mac OS X (10.6.6), + iMac 27" + iPad + MacBook Pro
  • Linc Davis Level 10 Level 10 (107,700 points)
    Currently Being Moderated
    Apr 15, 2011 10:41 AM (in response to etresoft)
    The thing is front-ended as a web app on the developer's site. There's no need for him to install it at all, unless he's dealing with some super-secret dataset.
    Mac OS X (10.6.7)
  • etresoft Level 7 Level 7 (23,895 points)
    Currently Being Moderated
    Apr 15, 2011 10:46 AM (in response to Linc Davis)
    Linc Davis wrote:
    The thing is front-ended as a web app on the developer's site. There's no need for him to install it at all, unless he's dealing with some super-secret dataset.


    It seems to be something the developers expect users would want to download.

    You had the right idea by asking about where GD came from. I was a bit confused before, but I get it now.
    MacBook 2007 (white), Mac OS X (10.6.6), + iMac 27" + iPad + MacBook Pro
  • Linc Davis Level 10 Level 10 (107,700 points)
    Currently Being Moderated
    Apr 15, 2011 10:57 AM (in response to etresoft)
    +It seems to be something the developers expect users would want to download.+

    Or use online.
    Mac OS X (10.6.7)
  • Morris Zwick Level 1 Level 1 (0 points)
    Currently Being Moderated
    Dec 14, 2011 4:09 AM (in response to garberal)

    First, thanks for the post as I think it has gotten me remarkably close to the finish line.

     

    I am trying to get the GD Freetype Library working for a webstore application. I ran through the install posted by etresoft and everything compiled and configured fine. Start and stopped Apache. Still no joy.

     

    In my SLS configuration from Server Admin, I am running the built-in PHP with one extension (prior to getting this working) of the mcrypt libraries. The built-in PHP has the JPEG, PNG and GIF libraries installed but not Freetype.

     

    Do I need to add an extension line in the php.ini file to pick up the locally built GD library presented above?

     

    Thanks!

  • etresoft Level 7 Level 7 (23,895 points)
    Currently Being Moderated
    Dec 14, 2011 5:55 AM (in response to Morris Zwick)

    Morris Zwick wrote:

     

    Do I need to add an extension line in the php.ini file to pick up the locally built GD library presented above?

    Perhaps. Here is my standard link to hacking up PHP: http://michaelgracie.com/2011/07/21/plugging-mcrypt-into-php-on-mac-os-x-lion-10 -7/

  • Morris Zwick Level 1 Level 1 (0 points)
    Currently Being Moderated
    Dec 14, 2011 6:03 AM (in response to etresoft)

    I actually used your guidance to get mcrypt working (thanks!) before, although I am running 10.6.8 server rather than Lion (the whole Lion upgrade thing freaks me out with the number of services on my server dependent on MySQL).

     

    For the GD library, I executed what you posted above. I then added "extension = gd.so" to php.ini but no dice. Do I have to do some sort of compile on a portion of PHP also?

     

    Sorry to be dense here, but the GD libraries are a bit of an enigma...

  • etresoft Level 7 Level 7 (23,895 points)
    Currently Being Moderated
    Dec 14, 2011 10:44 AM (in response to Morris Zwick)

    Morris Zwick wrote:

     

    I actually used your guidance to get mcrypt working (thanks!) before, although I am running 10.6.8 server rather than Lion (the whole Lion upgrade thing freaks me out with the number of services on my server dependent on MySQL).

    It shouldn't make a difference. You just need to make sure to download the source to PHP that matches whatever happens to be running on your version of the OS. While Lion Server no longer includes MySQL, you can download and install it on your own.

     

    For the GD library, I executed what you posted above. I then added "extension = gd.so" to php.ini but no dice. Do I have to do some sort of compile on a portion of PHP also?

     

    Sorry to be dense here, but the GD libraries are a bit of an enigma...

     

    Same here. Are you making sure to restart the Apache server? Does GD show up in an info.php page?

  • Morris Zwick Level 1 Level 1 (0 points)
    Currently Being Moderated
    Dec 14, 2011 11:43 AM (in response to etresoft)

    "It shouldn't make a difference. You just need to make sure to download the source to PHP that matches whatever happens to be running on your version of the OS. While Lion Server no longer includes MySQL, you can download and install it on your own."

     

    True, but I would prefer not having to reinstall and restore my MySQL DBs from scratch. I get the impression that a Lion install will wipe them out.

     

    Anyway... back at the ranch:

     

     

    This is what info.php returns for GD:

     

    gd

    GD Supportenabled
    GD Versionbundled (2.0.34 compatible)
    GIF Read Supportenabled
    GIF Create Supportenabled
    JPEG Supportenabled
    libJPEG Version8
    PNG Supportenabled
    libPNG Version1.5.4
    WBMP Supportenabled
    XBM Supportenabled

     

    DirectiveLocal ValueMaster Value
    gd.jpeg_ignore_warning00
  • etresoft Level 7 Level 7 (23,895 points)
    Currently Being Moderated
    Dec 14, 2011 12:21 PM (in response to Morris Zwick)

    You may need to rebuild PHP completely. It is easy enough to add a module that PHP doesn't have. But if PHP already has it built-in, it may never look for a module.

  • bwparks Calculating status...
    Currently Being Moderated
    Mar 27, 2012 12:50 PM (in response to etresoft)

    I tried this fix and made it to bootstrap with the following error....

     

    bootstrap.sh: line 25: aclocal: command not found

    Failed

     

     

    Not sure how to fix from here..

  • etresoft Level 7 Level 7 (23,895 points)
    Currently Being Moderated
    Mar 27, 2012 1:41 PM (in response to bwparks)

    There is no "fix" here. This is a horribly complex issue and thread. I strongly suggest you start your own thread specific to your exact problem. Chiming in a year later with a random error is a non-starter.

  • g01dfish Calculating status...
    Currently Being Moderated
    Oct 13, 2012 1:14 PM (in response to bwparks)

    I have the same issue as bwparks. Does anyone know why this issue has arisen?

  • etresoft Level 7 Level 7 (23,895 points)
    Currently Being Moderated
    Oct 14, 2012 3:03 PM (in response to g01dfish)

    g01dfish wrote:

     

    I have the same issue as bwparks. Does anyone know why this issue has arisen?

    What issue? The junky open-source software is unsupported on Macs? I think that issue arrived circa 1984.

     

    I suggest you see what other people have tried and then post a new question here if it still doesn't work.

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.