您的位置:首页 >> Web开发 >> CGI技术 >> 正文
CGI技术 RSS
 

Perl/Tk FAQ - 6. 如何编译安装

http://www.rdxx.com 06年08月27日 00:00 我要投稿

关键词: 编译 , FAQ , 安装 , Perl

  原文:

6. How do I build it?

Assuming you are not running a binary distribution then, in general, building perl/Tk requires:

1. A made & installed perl (requires a C language compiler). You may need different versions of perl depending on which version of Tk you wish to run.
2. A C language compiler for the Tk code itself.
3. A linkable Xlib (.o, .so, .a, etc.) for X-windows.



Perl/Tk has been successfully built using various vendors' cc compilers, as well as with the free GNU gcc compiler. A make utility of some sort (make/gmake) will be extremely helpful.

[OBSOLETE] Step - by - step the commands to build the Tk extension to Perl are (for the dynamically linked version) roughly as follows:

1. make install # the appropriate version of perl.
2. uninstall # prior versions of the Tk extension to perl.
3. gunzip -c Tk400.*.tar.gz | tar xvf - (tar options may vary esp. on SysV)
4. cd Tk400.*
5. read INSTALL
6. perl Makefile.PL
7. make
8. make test
9. make install



For the statically linked version you would `make tkperl` just after executing the `make` step and before the `make test` step.

Note carefully that this process leaves behind a large amount of documentation and examples in various sub-directories. You are strongly encouraged to look carefully through your build tree for docs, examples, etc. and keep those valuable files in a safe place. You might consider tar-ing them off and installing in a webserver directory tree.

A relatively easy way to determine if the perl on your system allows for dynamic linking was mentioned by Kenneth Albanowski <kjahds@kjahds.com>. If any of the following does not say "dl_none.xs" then you probably do have dynamically linked perl (or perhaps a very non-Unixy perl): perl -V:dlsrcor perl -MConfig -e 'print $Config{dlsrc},"\n"'or perl -e 'use Config; print $Config{dlsrc},"\n"'

(thanks to Paul Lussier <plussier@isd.3com.com> for the correction!).

Here is a little more detailed discussion of each the steps just given:

* Install Perl Read the Tk files (Tk*/README, etc.) for info on which version of perl is required for the perl/Tk kit you obtained.) For code locations see a CPAN site (separate question in this FAQ), the actual installation instructions come bundled in the perl***.tar.gz distribution file. (Perl Configure & make troubles are beyond the scope of this FAQ - please see the Perl FAQ itself or the INSTALL file for more help with this critical step.)
You can install perl almost anywhere you like by specifying the -Dprefix=/path argument to sh Configure
* [OBSOLETE] Unpack perl/Tk outside the Perl distribution
(i.e. outside the perl build, perl install, or perl lib areas).
gunzip Tk400.*.tar.gz
tar -xvf Tk400.*.tar
(Your tar program may not take -xvf. The resultant directory area will be referred to as your ``Tk build'' directory throughout this document.)
* [OBSOLETE] Read INSTALL carefully
cd Tk400.*
pager INSTALL
where pager is the program you use to scroll through text files more or less. Be sure to read it and do

共6页  1 2 3 4 5 6


 
 
标签: 编译 , FAQ , 安装 , Perl 打印本文
 
 



Valid XHTML 1.0 Transitional
Copyright ©2005 - 2008 Rdxx.Com,All Rights Reserved
收藏本页
收藏本站