Help installing gd-1.8.4?

Find out how to get that @*&^$&@ thing to compile!

Help installing gd-1.8.4?

Postby cann0010 » Sat Jun 08, 2002 9:36 pm

I'm trying to install GD.pm, which requires gd, which requires libpng and libjpeg. I can install libpng and libjpeg either from source or from packages at the Libraries section of forked.net ports. But the gd installation croaks, warning "can't open dynamic library: /usr/local/lib/libz.1.dylib".

I have tried precisely following the instructions at www.stepwise.com/Articles/Workbench/2001-06-12.01.html and at Ernie Rothman's excellent OS X site (compsci.salve.edu/list.html). I have run into the same problem on two machines, both running OS X 10.1.5. One of the systems is a new build, and the other was installed cleanly in the last two weeks but is also running XDarwin. Help!
cann0010
 
Posts: 3
Joined: Sat Jun 08, 2002 7:00 pm

Re: Help installing gd-1.8.4?

Postby cann0010 » Tue Jul 09, 2002 1:33 am

I finally did get gd installed. My goal was to install the Perl module GD.pm, so that's what the last half of the instructions describe. For gd and the dependencies, I cheated, using Fink.

The default Fink gd installation is configured to use X11 graphics libraries, and I don't know how to tell Fink not to do this "deluxe" gd installation, so this whole process takes longer than would a manual installation of libgd, libpng, and libjpeg. But using Fink was the only way I was able to get around some conflicts with the OS X dynamic library system.

If you don't have Fink, go to the Fink web site, and get the binary Fink installer. Double click the Fink installer, to install the Fink base system. In your home directory, add "source /sw/bin/init.csh" to the top of .cshrc (to place whatever Fink installs on your directory path). Then, make this change "live" by typing
source .cshrc
at the command prompt. To actually download gd and its dependencies, go
fink install gd
When the Fink installer dialog starts and asks which X11 option to use, say
3 for Xfree86-base. This means Fink will install tons of stuff.

If you have X11 and related libraries and know that they work and know how to tell Fink where to find them, then use options 1 or 2. But otherwise, 3 is probably safest.
Then Fink asks if you want to install a set of dependencies. Say "Y" to accept all.
Then let it chug for a few hours or over night.

Then get GD.pm from http://stein.cshl.org/WWW/software/GD/
Edit Makefile.PL , replacing the @INC and @LIBPATH lines with
my @INC = qw(-I/sw/include);
my @LIBPATH = qw(-L/sw/lib );
Then run "perl Makefile.PL" .
During the installer dialog, answer "y n n" to install GD only with jpeg support (not freetype or XPM).
Then "make test" and "sudo make install".
To test GD.pm, go into the demos folder in GD-1.33, choose and copy one of the demo files, and make these edits:
- change the #! line if necessary (probably to #!/usr/bin/perl )
- comment out the "binmode STDOUT" line
- open a file to write the .png file:
open (OUT, "> file_path/test_file.png")
or die "couldn't open file_path/test_file.png: $!";
- change the print line to:
print OUT $im->png;
Then see if test_file.png looks like a .png. That's it!
cann0010
 
Posts: 3
Joined: Sat Jun 08, 2002 7:00 pm


Return to Compile Problems

Who is online

Users browsing this forum: No registered users and 29 guests

cron