Install Perl GD on SPARC Solaris10

April 18th, 2007 | Categories: Boring | Tags:

上周费了老大劲在windows上搞定Perl GD,这回在Solaris10上费了更多的功夫才搞定。

安装步骤如下,

1)安装新版本的Perl    Solaris10自带Perl版本v5.8.4,路径在/usr/bin/perl。可以从sunfreeware下载v5.8.7,可执行文件路径在/usr/local/bin下。

2)安装 gcc-3.4.6-sol10-sparc-local.gz

3)安装 libgcc-3.3-sol10-sparc-local.gz

安装libgcc的时候会提示有些库文件已存在,我选择的是全部覆盖。

voyager1# pkgadd -d libgcc-3.4.6-sol10-sparc-local

The following packages are available:
1  SMClgcc346     libgcc
(sparc) 3.4.6

Select package(s) you wish to process (or ‘all’ to process
all packages). (default: all) [?,??,q]: y
ERROR: Entry does not match available menu selection. Enter the number
of the menu item you wish to select, or the token which is associated
with the menu item, or a partial string which uniquely identifies the
token for the menu item. Enter ?? to reprint the menu.

Select package(s) you wish to process (or ‘all’ to process
all packages). (default: all) [?,??,q]: all

Processing package instance <SMClgcc346> from </export/home/oracle/binzhang/libgcc-3.4.6-sol10-sparc-local>

libgcc(sparc) 3.4.6
FSF
Using </usr/local> as the package base directory.
## Processing package information.
## Processing system information.
4 package pathnames are already properly installed.
## Verifying disk space requirements.
## Checking for conflicts with packages already installed.

The following files are already installed on the system and are being
used by another package:
/usr/local/lib <attribute change only>
/usr/local/lib/libg2c.so.0.0.0
/usr/local/lib/libgcc_s.so.1
/usr/local/lib/libstdc++.so.6.0.3

Do you want to install these conflicting files [y,n,?,q] y
## Checking for setuid/setgid programs.

Installing libgcc as <SMClgcc346>

## Installing part 1 of 1.
/usr/local/lib/libg2c.so.0.0.0
/usr/local/lib/libgcc_s.so.1
/usr/local/lib/libstdc++.so.6.0.3
[ verifying class <none> ]

Installation of <SMClgcc346> was successful.

4)安装操作系统的GD库,pkginfo要确保依赖关系的包全部安装,挺麻烦的

gd-2.0.33-sol10-sparc-local.gz GD Graphics Library - An ANSI C library for the dynamic creation of images. GD creates PNG and JPEG images, among other formats - installs in /usr/local. The gd package requires the following library files - libXpm.so.4.11 from xpm, libfreetype.so.6 from freetype, libfontconfig.so.1 from fonctconfig, libgcc_s.so.1 from libgcc-3.3 or from gcc-3.3.2, libiconv.so.2 from libiconv, libpng12.so.0 from libpng, libz.so from zlib, libexpat.so.0 from expat, and libjpeg.so.62 from the jpeg package.

5)然后安装Perl GD-2.35

voyager1# pwd
/export/home/oracle/binzhang/GD-2.35

voyager1# /usr/local/bin/perl Makefile.PL
NOTICE: This module requires libgd 2.0.28 or higher.
If you are using Math::Trig 1.01 or lower, it has a bug that
causes a “prerequisite not found” warning to be issued.  You may
safely ignore this warning.
Type perl Makefile.PL -h for command-line option summary
Configuring for libgd version 2.0.33.
Checking for stray libgd header files…none found.
Included Features:          GD_XPM GD_JPEG GD_FONTCONFIG GD_FREETYPE GD_PNG GD_GIF GD_UNCLOSEDPOLY GD_ANIMGIF GD_FTCIRCLE VERSION_33
GD library used from:       /usr/local
Unrecognized argument in LIBS ignored: ‘/usr/local/lib/libiconv.so’
Writing Makefile for GD

voyager1# /usr/ccs/bin/make
gcc -B/usr/ccs/bin/ -c  -I/usr/local/include  -fno-strict-aliasing -pipe -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -O    -DVERSION=\”2.35\”  -DXS_VERSION=\”2.35\” -fPIC “-I/usr/local/lib/perl5/5.8.7/sun4-solaris/CORE”  -DHAVE_JPEG -DHAVE_FT -DHAVE_XPM -DHAVE_GIF -DHAVE_PNG -DHAVE_ANIMGIF -DVERSION_33 -DHAVE_UNCLOSEDPOLY -DHAVE_FONTCONFIG -DHAVE_FTCIRCLE GD.c
Running Mkbootstrap for GD ()
chmod 644 GD.bs
rm -f blib/arch/auto/GD/GD.so
LD_RUN_PATH=”/usr/local/lib:/usr/lib” gcc -B/usr/ccs/bin/  -G -L/usr/local/lib GD.o  -o blib/arch/auto/GD/GD.so   -L/usr/local/lib -L/usr/local/lib -L/usr/local/lib -L/usr/lib -L/usr/openwin/lib -L/usr/local/lib -lXpm -lX11 -ljpeg -lfontconfig -lfreetype -lpng12 -lz -lm -R/usr/local/lib -lgd -liconv
chmod 755 blib/arch/auto/GD/GD.so
cp GD.bs blib/arch/auto/GD/GD.bs
chmod 644 blib/arch/auto/GD/GD.bs
cp bdf_scripts/bdf2gdfont.pl blib/script/bdf2gdfont.pl
/usr/local/bin/perl “-MExtUtils::MY” -e “MY->fixin(shift)” blib/script/bdf2gdfont.pl
Manifying blib/man1/bdf2gdfont.pl.1
Manifying blib/man3/GD::Polyline.3
Manifying blib/man3/GD::Image.3
Manifying blib/man3/GD::Simple.3
Manifying blib/man3/GD.3
Manifying blib/man3/GD::Polygon.3

voyager1# /usr/ccs/bin/make install
Installing /usr/local/lib/perl5/site_perl/5.8.7/sun4-solaris/auto/GD/GD.so
Installing /usr/local/lib/perl5/site_perl/5.8.7/sun4-solaris/auto/GD/GD.bs
Files found in blib/arch: installing files in blib/lib into architecture dependent library tree
Installing /usr/local/lib/perl5/site_perl/5.8.7/sun4-solaris/qd.pl
Installing /usr/local/lib/perl5/site_perl/5.8.7/sun4-solaris/GD.pm
Installing /usr/local/lib/perl5/site_perl/5.8.7/sun4-solaris/auto/GD/autosplit.ix
Installing /usr/local/lib/perl5/site_perl/5.8.7/sun4-solaris/GD/Polyline.pm
Installing /usr/local/lib/perl5/site_perl/5.8.7/sun4-solaris/GD/Image.pm
Installing /usr/local/lib/perl5/site_perl/5.8.7/sun4-solaris/GD/Simple.pm
Installing /usr/local/lib/perl5/site_perl/5.8.7/sun4-solaris/GD/Polygon.pm
Installing /usr/local/share/man/man1/bdf2gdfont.pl.1
Installing /usr/local/share/man/man3/GD::Polyline.3
Installing /usr/local/share/man/man3/GD::Image.3
Installing /usr/local/share/man/man3/GD::Simple.3
Installing /usr/local/share/man/man3/GD.3
Installing /usr/local/share/man/man3/GD::Polygon.3
Installing /usr/local/bin/bdf2gdfont.pl
Writing /usr/local/lib/perl5/site_perl/5.8.7/sun4-solaris/auto/GD/.packlist
Appending installation info to /usr/local/lib/perl5/5.8.7/sun4-solaris/perllocal.pod

6)然后安装GD::Text

voyager1# /usr/local/bin/perl Makefile.PL
Writing Makefile for GD::Text
voyager1# /usr/ccs/bin/make
cp Text.pm blib/lib/GD/Text.pm
cp Text/Wrap.pm blib/lib/GD/Text/Wrap.pm
cp Text/Align.pm blib/lib/GD/Text/Align.pm
Manifying blib/man3/GD::Text::Wrap.3
Manifying blib/man3/GD::Text.3
Manifying blib/man3/GD::Text::Align.3
voyager1#  /usr/ccs/bin/make install
Installing /usr/local/lib/perl5/site_perl/5.8.7/GD/Text.pm
Installing /usr/local/lib/perl5/site_perl/5.8.7/GD/Text/Wrap.pm
Installing /usr/local/lib/perl5/site_perl/5.8.7/GD/Text/Align.pm
Installing /usr/local/share/man/man3/GD::Text::Wrap.3
Installing /usr/local/share/man/man3/GD::Text.3
Installing /usr/local/share/man/man3/GD::Text::Align.3
Writing /usr/local/lib/perl5/site_perl/5.8.7/sun4-solaris/auto/GD/Text/.packlist
Appending installation info to /usr/local/lib/perl5/5.8.7/sun4-solaris/perllocal.pod

7)然后安装GDGraph-1.4308

voyager1# /usr/local/bin/perl Makefile.PL
Checking if your kit is complete…
Looks good
Writing Makefile for GD::Graph

The automatic tests for GDGraph are not really a solid workout of the
library. The best way to test the package is to run the examples
before installing it.  You can run the examples in the samples
directory with `make samples` or by going into that directory, and
just running `make`.
If that fails, please read samples/Makefile.
voyager1# /usr/ccs/bin/make
cp Graph/utils.pm blib/lib/GD/Graph/utils.pm
cp Graph/axestype.pm blib/lib/GD/Graph/axestype.pm
cp Graph/hbars.pm blib/lib/GD/Graph/hbars.pm
cp Graph/axestype.pm.orig blib/lib/GD/Graph/axestype.pm.orig
cp Graph/pie.pm blib/lib/GD/Graph/pie.pm
cp Graph.pm blib/lib/GD/Graph.pm
cp Graph/Error.pm blib/lib/GD/Graph/Error.pm
cp Graph/bars.pm.orig blib/lib/GD/Graph/bars.pm.orig
cp Graph/lines.pm blib/lib/GD/Graph/lines.pm
cp Graph/points.pm blib/lib/GD/Graph/points.pm
cp Graph/linespoints.pm blib/lib/GD/Graph/linespoints.pm
cp Graph/bars.pm blib/lib/GD/Graph/bars.pm
cp Graph/Data.pm blib/lib/GD/Graph/Data.pm
cp Graph/area.pm blib/lib/GD/Graph/area.pm
cp Graph/colour.pm blib/lib/GD/Graph/colour.pm
cp Graph/mixed.pm blib/lib/GD/Graph/mixed.pm
cp Graph/FAQ.pod blib/lib/GD/Graph/FAQ.pod
Manifying blib/man3/GD::Graph.3
Manifying blib/man3/GD::Graph::Error.3
Manifying blib/man3/GD::Graph::Data.3
Manifying blib/man3/GD::Graph::hbars.3
Manifying blib/man3/GD::Graph::colour.3
Manifying blib/man3/GD::Graph::FAQ.3
voyager1#  /usr/ccs/bin/make install
Installing /usr/local/lib/perl5/site_perl/5.8.7/GD/Graph.pm
Installing /usr/local/lib/perl5/site_perl/5.8.7/GD/Graph/utils.pm
Installing /usr/local/lib/perl5/site_perl/5.8.7/GD/Graph/axestype.pm
Installing /usr/local/lib/perl5/site_perl/5.8.7/GD/Graph/hbars.pm
Installing /usr/local/lib/perl5/site_perl/5.8.7/GD/Graph/axestype.pm.orig
Installing /usr/local/lib/perl5/site_perl/5.8.7/GD/Graph/pie.pm
Installing /usr/local/lib/perl5/site_perl/5.8.7/GD/Graph/Error.pm
Installing /usr/local/lib/perl5/site_perl/5.8.7/GD/Graph/bars.pm.orig
Installing /usr/local/lib/perl5/site_perl/5.8.7/GD/Graph/lines.pm
Installing /usr/local/lib/perl5/site_perl/5.8.7/GD/Graph/points.pm
Installing /usr/local/lib/perl5/site_perl/5.8.7/GD/Graph/linespoints.pm
Installing /usr/local/lib/perl5/site_perl/5.8.7/GD/Graph/bars.pm
Installing /usr/local/lib/perl5/site_perl/5.8.7/GD/Graph/Data.pm
Installing /usr/local/lib/perl5/site_perl/5.8.7/GD/Graph/area.pm
Installing /usr/local/lib/perl5/site_perl/5.8.7/GD/Graph/colour.pm
Installing /usr/local/lib/perl5/site_perl/5.8.7/GD/Graph/mixed.pm
Installing /usr/local/lib/perl5/site_perl/5.8.7/GD/Graph/FAQ.pod
Installing /usr/local/share/man/man3/GD::Graph.3
Installing /usr/local/share/man/man3/GD::Graph::Error.3
Installing /usr/local/share/man/man3/GD::Graph::Data.3
Installing /usr/local/share/man/man3/GD::Graph::hbars.3
Installing /usr/local/share/man/man3/GD::Graph::colour.3
Installing /usr/local/share/man/man3/GD::Graph::FAQ.3
Writing /usr/local/lib/perl5/site_perl/5.8.7/sun4-solaris/auto/GD/Graph/.packlist
Appending installation info to /usr/local/lib/perl5/5.8.7/sun4-solaris/perllocal.pod

在Unix下安装OpenSource的软件真麻烦,如果有binary package还好说。如果是Source code,要将所有有依赖关系的包都装上,而且版本还复杂。Make & Make test有时候还会出一些莫名奇妙的错误。门槛虽高,奈何我有才。搞定。

Del.icio.us Google书签 Digg Live Bookmark Technorati Furl Yahoo书签 Facebook 百度搜藏 新浪 ViVi 365Key 网摘 天极网摘 和讯网摘 博拉网 POCO 网摘 饭否 QQ 书签 Digbuzz 我挖网 Mister Wong
No comments yet.