building with libpng...
[email protected] (Chris Barker - NOAA Federal) Thu, 20 Jun 2013 15:09:44 -0700
| Newsgroups | php.gd.devel |
|---|---|
| Message-ID | <CALGmxELSQ3Nc9W7zYKXjcP4JDKevia88Xqv5O99wmtQ6rtH1kA@mail.gmail.com> |
Folks, I punted on trying to build with the Apple-provided libpng on OS-X, and instead decided to jsut built it myself. However, I'm doing a couple odd things: 1) I want to keep my system clean, so I'm instaling libpng in a special place in my home dir 2) I ultimately want to be able to build a self contained binary, so I'm building it static. But gd's ./configure can't quite handle this: I tried: ./configure --disable-shared --with-png=/Users/chris.barker/HAZMAT/GNOME-dev/GNOME-GIT/third_party_lib/gd/static_libs CFLAGS="-arch i386" --prefix=/Users/chris.barker/HAZMAT/GNOME-dev/GNOME-GIT/third_party_lib/gd/static_libs /Users/chris.barker/HAZMAT/GNOME-dev/GNOME-GIT/third_party_lib/gd/static_libs is where I'm putting all this (gd itself, as well) gd configures itself for png support. However, when I go to build, I get: ld: library not found for -lpng16 which makes sense, as the only plae it's lookign for libs is -L/usr/X11/lib (and the standard locations). It seem then when configure finds libpng, it should find where it's installed as well: $ /Users/chris.barker/HAZMAT/GNOME-dev/GNOME-GIT/third_party_lib/gd/static_libs/bin/libpng-config --libdir /Users/chris.barker/HAZMAT/GNOME-dev/GNOME-GIT/third_party_lib/gd/static_libs/lib I thought configure was using libpng-config to find this stuff? Anyway, adding that location to LDFLAGS by hand seems to work: ./configure --disable-shared --with-png=/Users/chris.barker/HAZMAT/GNOME-dev/GNOME-GIT/third_party_lib/gd/static_libs CFLAGS="-arch i386" LDFLAGS="-L/Users/chris.barker/HAZMAT/GNOME-dev/GNOME-GIT/third_party_lib/gd/static_libs/lib" --prefix=/Users/chris.barker/HAZMAT/GNOME-dev/GNOME-GIT/third_party_lib/gd/static_libs NOTE: I'm pretty sure that I tried all this with dynamical linking as well, and had the same problem. I know nothing about autoconf, so I don't even know where to begin trying to fix this. Thanks, -Chris -- Christopher Barker, Ph.D. Oceanographer Emergency Response Division NOAA/NOS/OR&R (206) 526-6959 voice 7600 Sand Point Way NE (206) 526-6329 fax Seattle, WA 98115 (206) 526-6317 main reception [email protected]