| 订阅 | 在线投稿
分享
 
 
当前位置: 王朝网络 >> perl >> Perl/TkFAQ-6. ru he bian yi an zhuang

Perl/TkFAQ-6. ru he bian yi an zhuang

2008-05-18 21:55:30 编辑來源:互联网 评论
 
 
 
本文为【Perl/TkFAQ-6.如何编译安装】的拼音翻译版
  yuan wen :
  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 don't just pound away on the spacebar.
  * If necessary remove any previously installed version of perl/Tk
  If you had a previously working version of Tk installed, you may need to resurrect the Makefile for it and execute:
  make uninstall
  make realclean
  before you unpack the new version. (The uninstall target of MakeMaker is relatively new so please be careful here.)
  * Have perl generate a custom Makefile.
  perl Makefile.PL
  (see below for more on this step.)
  * Compile.
  make
  (if and only if building static: make tkperl
  * Test.
  make test
  * Install.
  make install
  * Play with it.
  basic_demo
  (modify #! line if necessary, or specify /path/to/perl ./basic_demo)
  (warning if you build Tk-b9.01 with perl5.002gamma then change the line in basic_demo from
  use lib ./blib;
  to
  use lib qw(blib/arch blib/lib);)
  * Save the documentation and examples in a safe accessible place.
  use tar, cp, mv, chmod or whatever you prefer to save the valuable ancillary files from your Tk build tree.
  On the perl Makefile.PL step it may be necessary to give explicit locations of the required X11 libraries and/or include headers. For example: perl Makefile.PL X11=/usr/local/X11R5
  or perhaps different directory tree specification is necessary with your X installation: perl Makefile.PL X11INC=/usr/local/share/X11R5/include \ X11LIB=/usr/local/arch/X11R5/lib
  There are system and site dependencies in all of the above steps. However, the largest single source of build trouble comes from not using the latest versions of the various utilities (C compiler, make, etc.). In particular ensure that when you say perl Makefile.PL that the perl that gets invoked is up to date - use which perl (or whence perl) and perl -v to determine this. If necessary specify the full path name to your perl5 interpreter/compiler. (Some people do not rm their older perl interpreters when upgrading to a more recent version - beware.)
  If you still run into trouble take a look at the INSTALL, the README and the README file for your specific system (e.g. README.AIX, README.OSF, etc.). You might also find your system mentioned in the ptk hyper-mail archive at: http://www.rosat.mpe-garching.mpg.de/mailing-lists/ptk/or http://pubweb.bnl.gov/~ptk/or ftp://ftp.ccd.bnl.gov/pub/ptk/archives/
  or the Perl 5 Porters page at one of the following URLs: http://www.rosat.mpe-garching.mpg.de/mailing-lists/Perl5-Porters/ http://www.hut.fi/~jhi/perl5-porters.html
  If you wish to discuss your Tk build problems with others run and save the output from the myConfig script in the Tk build directory (the output may already be in the myConfig.out file from your perl/Tk build directory), as well as the myconfig script in your perl build directory (or the output of perl -V with a capitol V). It is often helpful to include the output of either (or both) of these scripts in your discussion.
  Presented here are the beginnings of a list of problems associated with building perl/Tk on various platforms (for help building perl itself please refer to the Perl FAQ). This list is in no way complete nor authoritative (nor is it necessarily even up-to-date!) but simply lists problems people have reported. Keep in mind that your installation may differ (e.g. location differences such as /usr/bin/perl vs. /usr/local/bin/perl) even if its the same platform listed here: A Sampling of Perl/Tk Platforms: AIX: As of perl5.002b & Tk-b9.01 README.AIX says no patching is necessary.
  For Tk-b8: modifying the perl.exp file may be necessary. There is a patch in Tk-b8/README.AIX. It may be necessary to make regen_headers after the patch. FreeBSD: [OBSOLETE] Nate Patwardhan <nvp@nfic.com> reports no trouble at all with Tk400.200 on FreeBSD-2.1.5 or FreeBSD-2.2.1. HPUX: For Tk-b11: One person reports a need to add #define TIMEOFDAY_TZ to the tkConfig.h header file in order to compile on HPUX 9.05.
  Previous versions: Most people seem to prefer the dynamic linking afforded by a recent version of the gcc compiler on this system. Linux: John C. Wingenbach indicates that should you encounter an error message like Cannot find -lX11 anywhere at ./myConfig line 184 when running your perl Makefile.PL (under Slakware 3.0) that you should be more specific about -l/path/to/libX11.a.
  Adam Wasserman <awasser@hermes.sgc.com> has graciously provided a compilation of Linux compilation trials & tribulations. It is an (as yet un-edited) document available at: http://www.perltk.org/contrib/hints/linux_compile.txt MachTen: Mark Pease mailto:pease@act.sps.mot.com mentions that:
  I was able to get Tk-b11.02 running under MachTen 2.2 perl5.002_01. I did need to make one change to get a round a MachTen problem. In pTk/tclUnix.h, pwd.h is included, but it is also included in pTk/tkPort.h (which is included in Lang.h, which is use by tclUnixUtil.c, whew!)
  MachTen's pwd.h can't be included more that once or you get an error.
  It looked to me like tclUnix.h was only used in tclUnixUtil.c, so I commented out the #include <pwd.h> in tclUnix.h. NetBSD: Jesus M. Gonzalez <jgb@gsyc.inf.uc3m.es> mentions success with:
  Tk-b11.01 compiles, installs and runs just out of the box in NetBSD-1.1/i386. I just followed the INSTALL instructions. NeXTSTEP: Gerd Knops recently posted a discussion of the steps to get perl running on several NeXTSTEPs to p5p. OS/2: Ilya Zakharevich mailto:ilya@math.ohio-state.edu has compiled a modified form of Tk-b11.02 to work with the Xfree86 client/server package, as well more advanced versions working with the Open32 PM package. OSF/1: As of perl5.002b & Tk-b9.01 you will probably be able to follow the usual instructions. John Stoffel <john@wpi.edu> reports that if you use gcc (rather than cc) you should use at least version 2.7.2
  For Tk-b8: make is reputedly not up to the task on this system. Tk-b8/README.OSF recommends gmake instead.
  Stephane Bortzmeyer mailto:bortzmeyer@pasteur.fr reports a successful build with Perl 5.001m, xsubpp 1.922, MakeMaker 4.23. He points out that it was necessary for him to upgrade the xsubpp and MakeMaker that he received with his copy of Perl5.001m. SCO: For Tk-b8: Eric J. Bohm mailto:bohm@cs.Buffalo.EDU reported a need to comment out line(s) from myConfig and GNUMakefiles using GNU make 3.67. (See Tk-b8/README.SCO for specifics.) SGI (Irix): For Tk-b11.02: Phillip Moore <wpm@morgan.com> reports a clean build on IRIX 5.3.
  Matthew Black mailto:black@csulb.edu recently mentioned a need to apply "patchSG0000596" to get perl sockets to work. His message was copyrighted and is not included here. Send e-mail to him to find out where the get "patchSG0000596". Suns: SunOS (BSD):
  For Tk-b10 on SunOS 4.1.3_U1
  using SparcWorks acc 3.0.1 Frederick L. Wagner <derf@ti.com> reports needing to use the perl malloc rather than the system malloc() when building perl.
  For Tk-b8: Tom Tignor mailto:tpt2@BBN.COM reports the following on SunOS (sun4m sparc): Tue, 28 Nov 1995 13:19:42
  In trying to make, I got a "write: argument mismatch" error for the file ptK/Lang.h. I looked at the file and found the offending function, Tcl_GetOpenFile, which has a third argument called "doWrite" (not "write") in tkGlue.c. I changed the argument from "write" to "doWrite" in Lang.h and it's compiling fine (for the moment. :)
  Solaris (System V):
  For Tk-b8: There is trouble getting perl to use Socket routines (i.e. trouble with make perl itself not necessarily trouble with Tk-b8). See the perl FAQ for more info or the .shar file that Tom Christiansen occasionally posts to comp.lang.perl.misc. Further information on perl inter process communication can be found in the perlipc* files at: ftp://ftp.perl.com/perl/info/everything_to_know/. SVR4: For Tk-b8: Martha G. Armour and Len Reed report on two separate hardware platforms running SVR4 - extensive details in Tk-b8/README.SVR4. Interestingly, they report no trouble at all on Linux. Ultrix: Peter Prymmer reports that with Tk-b11 it was necessary to change the line in Makefile.PL that reads:
  'LIBS' => ["$xlib -lX11 -lpt -lsocket -lnsl -lm"],
  to read:
  'LIBS' => ["$xlib -lX11 -lpt -lsocket -lnsl -lm -ldnet"],
  because of a newer X11 in /usr/local that needed the DECnet protocol linking.
  John Stoffel reports a successful build of static Tk-b10 on Ultrix 4.5. Windows NT: [OBSOLETE] Nick Ing-Simmons reports success with the alpha Tk404.000 kit, perl5.004, and Visual C++. Gurusamy Sarathy has distributed a binary kit with perl,Tk,etc. precompiled for Windows 32. Support is continuing to allow extension by the Borland C++ compiler as well as cross compiler extendability. non-Unix(ish)es:
  Information on non-Unix(ish) perl platforms may be obtained from newsgroups and email lists as well as a few world wide web sites. For example, try the Perl 5 Porters (p5p) [page|archives] at one of: http://www.rosat.mpe-garching.mpg.de/mailing-lists/Perl5-Porters/ http://www.hut.fi/~jhi/perl5-porters.html
  In general your non-Unix platform must be able to support perl 5 and Xlib (a C compiler and a make utility are tremendously useful too). If you want to run perl/Tk on another computer and simply have the display show up on yours then all you need on your computer is an "X server" The long list of UNIX and non-unix perl 5 ports, Tcl/Tk ports, and Perl/Tk ports that used to appear in this FAQ has now moved to a separate web page at: http://www.perltk.org/contrib/ptkPORT.html
  yi wen :
  6. ru he bian yi an zhuang ?
  ru guo ni bu shi yong de er jin zhi ban ben , na me yi ban shuo lai , bian yi an zhuang Perl/Tk xu yao :
  1. yi jing bian yi an zhuang hao de Perl huan jing ( xu yao C de bian yi qi )。 gen ju ni suo xuan ze de Tk de ban ben , ni ke neng hui xu yao bu tong ban ben de Perl huan jing 。
  2. C bian yi qi ( wei le bian yi Tk ben shen de dai ma )。
  3. tu xing chuang kou de lian jie ku Xlib(.o,.so,.a deng deng )。
  Perl/Tk yi jing bei yong hen duo bu tong de cc bian yi qi shang cheng gong de an zhuang ( bao kuo mian fei de GNU de gcc bian yi qi )。 tong shi yi ge make gong ju hui dui an zhuang fei chang you bang zhu 。
  bian yi Perl de Tk mo kuai de yi bu yi bu de ming ling da zhi ru xia ( dong tai lian jie ban ben ):
  1. make install ( xian an zhuang shi dang ban ben de Perl)
  2. uninstall ( xie zai yuan you de jiu ban ben de Tk)
  3. gunzip –c Tk400.*.tar.gz | tar xvf - (tar de shen shu zai ru SysV deng de xi tong shang ke neng hui bu tong )
  4. cd Tk400.*
  5. yue du INSTALL wen jian
  6. perl Makefile.PL
  7. make
  8. make test
  9. make install
  dui yu “ jing tai lian jie ” ban ben de an zhuang , ni ying gai zai zhi xing wan make zhi hou er zhi xing make test zhi qian zhi xing “make tkperl”。
  qing zhu yi , zai shang mian de bu zhou zhong wo men mei you ti dao da liang de xiang guan wen dang he zai na xie zi mu lu zhong de li zi 。 wo men qiang lie tui jian ni zai xi de yue du an zhuang mu lu li de docs,examples deng nei rong , bing qie ba ta men bao liu zai yi ge an quan de di fang 。 ni ye ke yi kao lv ba ta men da bao an zhuang dao yi ge wang luo fu wu qi de mu lu zhong qu 。
  Kenneth Albanowski ti gong le yi ge xiang dui jian dan de fang fa yong lai ce shi shi fou ni xi tong shang de Perl yuan xu dong tai lian jie 。 ru guo xia mian de ren he yi ge ming ling mei you xian shi “dl_none.xs”, na me ni ying gai yi jing an zhuang de dong tai lian jie de Perl:
  perl –V:dlsrc
  huo
  perl –Mconfig –e ‘print $Config{dlsrc},”\n”’
  huo
  perl –e ‘use Config; print $Config{dlsrc},”\n”’
  ( gan xie Paul Lussier de geng zheng !)。
  xia mian shi guan yu shang mian gei chu de bu zhou de yi xie geng xiang xi de tao lun :
  l an zhuang Perl: ying gai xian yue du ni huo qu dao Perl/Tk bao zhong de shuo ming wen jian (Tk*/README deng deng ) lai le jie ta suo yao qiu de Perl de ban ben 。 xiang ying de Perl dai ma ke yi cong CPAN de dao , qi shi ji de an zhuang shuo ming zai perl*.tar.gz de bao li mian 。( guan yu Perl de pei zhi he an zhuang deng wen ti yi jing chao chu lai wo men zhe ge FAQ de fan wei , xiang qing qing shen yue Perl FAQ wen jian )
  l zai Perl de an zhuang mu lu yi wai jie kai Perl/Tk de bao
  gunzip Tk400.*.tar.gz
  tar –xvf Tk400.*.tar
  ( zhu yi : ni de tar cheng xu ye xu hui bu ren -xvf xuan xiang 。 ling wai , jie kai yi hou de mu lu wo men zai xia mian de wen dang zhong jiang cheng zhi wei “Tk an zhuang mu lu ”。)
  l zai xi yue du INSTALL wen jian
  cd Tk400.*
  pager INSTALL
  zhu : zhe li de pager shi zhi ni yong lai yue du zheng ge wen ben de gong ju , qing wu bi zai xi yue du ci wen dang er bu yao jian dan tiao guo !
  l ru guo cun zai , qing xian qing chu suo you yuan xian an zhuang de Perl/Tk!
  ru guo ni yuan lai zeng jing an zhuang shi yong guo Tk, ni ke neng xu yao zai shi yong yuan lai de Makfile wen jian zhi xing ru xia :
  make uninstall
  make realclean
  zhu : ci cao zuo ying gai zai ni jie kai xin ban ben de bao zhi qian ( ling wai , qing zhu yi zhe li make de uninstall shu xing xiang dui bi jiao xin )。
  l rang Perl an zhao ni de xi tong qing kuang chan sheng yi ge Makefile wen jian
  perl Makefile.PL
  ( zhu : guan yu ci bu zhou di xiang xi shuo ming qing shen yue xia mian de bu fen )。
  l bian yi
  make
  ( zhu : zhi you zai zuo jing tai bian yi de shi hou cai shi yong :make tkperl)
  l ce shi
  make test
  l an zhuang
  make install
  l kai shi shi yong
  basic_demo( yi zhe zhu : jian yi zhi jie shi yong perl basic_demo)
  ( zhu : qing gen ju xu yao xiu gai shou xing #! hou mian de nei rong , huo zhi ding /path/to/perl ./basic_demo)
  ( jing gao : ru guo ni shi yong de shi Tk-b9.01 he perl5.002gamma, qing ba basic_demo zhong de use lib ./blib; xing gai cheng use lib qw(blib/arch blib/lib);)
  l ba zhe xie wen dang he li zi bao cun dao yi ge an quan ke yong de di fang
  ni ke yi shi yong tar,cp,mv,chmod deng deng yi xie ming ling lai ba Tk an zhuang mu lu li de zhe xie you yong de fu zhu wen jian bao cun qi lai 。
  ling wai , zai “perl Makefile.PL” de yi bu zhong , you shi ke neng xu yao ming que zhi ming X11 ku huo tou wen jian de wei zhi 。 li ru :
  perl Makefile.PL X11=/usr/local/X11R5
  huo zhe , ke neng ni de X an zhuang de tou wen jian he ku zai qi ta bu tong de mu lu zhong :
  perl Makefile.PL X11INC=/usr/local/share/X11R5/include X11LIB=/usr/local/arch/X11R5/lib
  yi shang de suo you bu zhou shi ji de cheng gong yu fou shi ji zhu yao yi lai yu ni de xi tong 。 dan shi , zui duo de an zhuang cuo wu tong chang shi you yu mei you shi yong zui xin ban ben de ge zhong gong ju er zao cheng de ( li ru C bian yi qi 、make deng deng )。 te bie shi zai ni zhi xing “perl Makefile.PL” qian , xian que ding ni tiao yong de shi na li de perl( yong which perl) yi ji ta de ban ben ( yong perl -v)。 ru guo bi yao de hua , shen zhi ke yi gei chu ni de Perl5 jie shi qi de quan lu jing ( yin wei , you xie ren zai sheng ji perl de shi hou bing mei you shan chu diao lao de ban ben , suo yi yao te bie xiao xin )。
  ru guo ni de an zhuang reng you wen ti , yue du yi xia INSTALL wen jian 、README wen jian he yu ni de xi tong dui ying de README wen jian ( li ru ,README.AIX、README.OSF deng deng )。 ni ke neng ye ke yi zai xia mian de di zhi zhao dao yu ni de xi tong dui ying de ptk de chao wen ben dang an wen jian :
  http://www.rosat.mpe-garching.mpg.de/mailing-lists/ptk/
  huo
  http://pubweb.bnl.gov/~ptk/
  huo
  ftp://ftp.ccd.bnl.gov/pub/ptk/archives/
  huo zhe xia mian de ren he yi ge di zhi :
  http://www.rosat.mpe-garching.mpg.de/mailing-lists/Perl5-Porters/
  http://www.hut.fi/~jhi/perl5-porters.html
  ru guo ni xi wang he qi ta ren tao lun ni zai an zhuang Tk shi yu dao de wen ti , ke yi yun xing Tk an zhuang mu lu zhong de myConfig jiao ben , bing bao cun qi shu chu jie guo ( ke neng yi jing bei bao cun zai ni de Tk an zhuang mu lu zhong de myConfig.out wen jian zhong le )。 tong yang de , yun xing perl an zhuang mu lu zhong de myconfig jiao ben ( huo perl –V), bing bao cun qi jie guo 。 yin wei yi ban shuo lai , zai yu bie ren tao lun de shi hou , chu shi shang mian de ren he yi ge ( huo quan bu ) jie guo hui fei chang you bang zhu de 。
  ( yi zhe zhu : yuan wen xia mian de bu fen shi yi xie zai ge zhong xi tong shang fa xian de Tk an zhuang zhong de wen ti , dan shi dou yi jing bi jiao lao le , ke neng bu tai shi yong le , suo yi jiu bu yi le …… lei de bu xing le , tou dian lan ge :P)【原文】【汉音对照
 
 
 
 
 
 
 
 
 
日版宠物情人插曲《Winding Road》歌词

日版宠物情人2017的插曲,很带节奏感,日语的,女生唱的。 最后听见是在第8集的时候女主手割伤了,然后男主用嘴帮她吸了一下,插曲就出来了。 歌手:Def...

兄弟共妻,我成了他们夜里的美食

老钟家的两个儿子很特别,就是跟其他的人不太一样,魔一般的执着。兄弟俩都到了要结婚的年龄了,不管自家老爹怎么磨破嘴皮子,兄弟俩说不娶就不娶,老父母为兄弟两操碎了心...

如何磨出破洞牛仔裤?牛仔裤怎么剪破洞?

把牛仔裤磨出有线的破洞 1、具体工具就是磨脚石,下面垫一个硬物,然后用磨脚石一直磨一直磨,到把那块磨薄了,用手撕开就好了。出来的洞啊很自然的。需要猫须的话调几...

我就是扫描下图得到了敬业福和爱国福

先来看下敬业福和爱国福 今年春节,支付宝再次推出了“五福红包”活动,表示要“把欠大家的敬业福都还给大家”。 今天该活动正式启动,和去年一样,需要收集“五福”...

冰箱异味产生的原因和臭味去除的方法

有时候我们打开冰箱就会闻到一股异味,冰箱里的这种异味是因为一些物质发出的气味的混合体,闻起来让人恶心。 产生这些异味的主要原因有以下几点。 1、很多人有这种习...

 
 
   yuan wen :   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 don't just pound away on the spacebar.   * If necessary remove any previously installed version of perl/Tk   If you had a previously working version of Tk installed, you may need to resurrect the Makefile for it and execute:   make uninstall   make realclean   before you unpack the new version. (The uninstall target of MakeMaker is relatively new so please be careful here.)   * Have perl generate a custom Makefile.   perl Makefile.PL   (see below for more on this step.)   * Compile.   make   (if and only if building static: make tkperl   * Test.   make test   * Install.   make install   * Play with it.   basic_demo   (modify #! line if necessary, or specify /path/to/perl ./basic_demo)   (warning if you build Tk-b9.01 with perl5.002gamma then change the line in basic_demo from   use lib ./blib;   to   use lib qw(blib/arch blib/lib);)   * Save the documentation and examples in a safe accessible place.   use tar, cp, mv, chmod or whatever you prefer to save the valuable ancillary files from your Tk build tree.   On the perl Makefile.PL step it may be necessary to give explicit locations of the required X11 libraries and/or include headers. For example: perl Makefile.PL X11=/usr/local/X11R5   or perhaps different directory tree specification is necessary with your X installation: perl Makefile.PL X11INC=/usr/local/share/X11R5/include \ X11LIB=/usr/local/arch/X11R5/lib   There are system and site dependencies in all of the above steps. However, the largest single source of build trouble comes from not using the latest versions of the various utilities (C compiler, make, etc.). In particular ensure that when you say perl Makefile.PL that the perl that gets invoked is up to date - use which perl (or whence perl) and perl -v to determine this. If necessary specify the full path name to your perl5 interpreter/compiler. (Some people do not rm their older perl interpreters when upgrading to a more recent version - beware.)   If you still run into trouble take a look at the INSTALL, the README and the README file for your specific system (e.g. README.AIX, README.OSF, etc.). You might also find your system mentioned in the ptk hyper-mail archive at: http://www.rosat.mpe-garching.mpg.de/mailing-lists/ptk/or http://pubweb.bnl.gov/~ptk/or ftp://ftp.ccd.bnl.gov/pub/ptk/archives/   or the Perl 5 Porters page at one of the following URLs: http://www.rosat.mpe-garching.mpg.de/mailing-lists/Perl5-Porters/ http://www.hut.fi/~jhi/perl5-porters.html   If you wish to discuss your Tk build problems with others run and save the output from the myConfig script in the Tk build directory (the output may already be in the myConfig.out file from your perl/Tk build directory), as well as the myconfig script in your perl build directory (or the output of perl -V with a capitol V). It is often helpful to include the output of either (or both) of these scripts in your discussion.   Presented here are the beginnings of a list of problems associated with building perl/Tk on various platforms (for help building perl itself please refer to the Perl FAQ). This list is in no way complete nor authoritative (nor is it necessarily even up-to-date!) but simply lists problems people have reported. Keep in mind that your installation may differ (e.g. location differences such as /usr/bin/perl vs. /usr/local/bin/perl) even if its the same platform listed here: A Sampling of Perl/Tk Platforms: AIX: As of perl5.002b & Tk-b9.01 README.AIX says no patching is necessary.   For Tk-b8: modifying the perl.exp file may be necessary. There is a patch in Tk-b8/README.AIX. It may be necessary to make regen_headers after the patch. FreeBSD: [OBSOLETE] Nate Patwardhan <nvp@nfic.com> reports no trouble at all with Tk400.200 on FreeBSD-2.1.5 or FreeBSD-2.2.1. HPUX: For Tk-b11: One person reports a need to add #define TIMEOFDAY_TZ to the tkConfig.h header file in order to compile on HPUX 9.05.   Previous versions: Most people seem to prefer the dynamic linking afforded by a recent version of the gcc compiler on this system. Linux: John C. Wingenbach indicates that should you encounter an error message like Cannot find -lX11 anywhere at ./myConfig line 184 when running your perl Makefile.PL (under Slakware 3.0) that you should be more specific about -l/path/to/libX11.a.   Adam Wasserman <awasser@hermes.sgc.com> has graciously provided a compilation of Linux compilation trials & tribulations. It is an (as yet un-edited) document available at: http://www.perltk.org/contrib/hints/linux_compile.txt MachTen: Mark Pease mailto:pease@act.sps.mot.com mentions that:   I was able to get Tk-b11.02 running under MachTen 2.2 perl5.002_01. I did need to make one change to get a round a MachTen problem. In pTk/tclUnix.h, pwd.h is included, but it is also included in pTk/tkPort.h (which is included in Lang.h, which is use by tclUnixUtil.c, whew!)   MachTen's pwd.h can't be included more that once or you get an error.   It looked to me like tclUnix.h was only used in tclUnixUtil.c, so I commented out the #include <pwd.h> in tclUnix.h. NetBSD: Jesus M. Gonzalez <jgb@gsyc.inf.uc3m.es> mentions success with:   Tk-b11.01 compiles, installs and runs just out of the box in NetBSD-1.1/i386. I just followed the INSTALL instructions. NeXTSTEP: Gerd Knops recently posted a discussion of the steps to get perl running on several NeXTSTEPs to p5p. OS/2: Ilya Zakharevich mailto:ilya@math.ohio-state.edu has compiled a modified form of Tk-b11.02 to work with the Xfree86 client/server package, as well more advanced versions working with the Open32 PM package. OSF/1: As of perl5.002b & Tk-b9.01 you will probably be able to follow the usual instructions. John Stoffel <john@wpi.edu> reports that if you use gcc (rather than cc) you should use at least version 2.7.2   For Tk-b8: make is reputedly not up to the task on this system. Tk-b8/README.OSF recommends gmake instead.   Stephane Bortzmeyer mailto:bortzmeyer@pasteur.fr reports a successful build with Perl 5.001m, xsubpp 1.922, MakeMaker 4.23. He points out that it was necessary for him to upgrade the xsubpp and MakeMaker that he received with his copy of Perl5.001m. SCO: For Tk-b8: Eric J. Bohm mailto:bohm@cs.Buffalo.EDU reported a need to comment out line(s) from myConfig and GNUMakefiles using GNU make 3.67. (See Tk-b8/README.SCO for specifics.) SGI (Irix): For Tk-b11.02: Phillip Moore <wpm@morgan.com> reports a clean build on IRIX 5.3.   Matthew Black mailto:black@csulb.edu recently mentioned a need to apply "patchSG0000596" to get perl sockets to work. His message was copyrighted and is not included here. Send e-mail to him to find out where the get "patchSG0000596". Suns: SunOS (BSD):   For Tk-b10 on SunOS 4.1.3_U1   using SparcWorks acc 3.0.1 Frederick L. Wagner <derf@ti.com> reports needing to use the perl malloc rather than the system malloc() when building perl.   For Tk-b8: Tom Tignor mailto:tpt2@BBN.COM reports the following on SunOS (sun4m sparc): Tue, 28 Nov 1995 13:19:42   In trying to make, I got a "write: argument mismatch" error for the file ptK/Lang.h. I looked at the file and found the offending function, Tcl_GetOpenFile, which has a third argument called "doWrite" (not "write") in tkGlue.c. I changed the argument from "write" to "doWrite" in Lang.h and it's compiling fine (for the moment. :)   Solaris (System V):   For Tk-b8: There is trouble getting perl to use Socket routines (i.e. trouble with make perl itself not necessarily trouble with Tk-b8). See the perl FAQ for more info or the .shar file that Tom Christiansen occasionally posts to comp.lang.perl.misc. Further information on perl inter process communication can be found in the perlipc* files at: ftp://ftp.perl.com/perl/info/everything_to_know/. SVR4: For Tk-b8: Martha G. Armour and Len Reed report on two separate hardware platforms running SVR4 - extensive details in Tk-b8/README.SVR4. Interestingly, they report no trouble at all on Linux. Ultrix: Peter Prymmer reports that with Tk-b11 it was necessary to change the line in Makefile.PL that reads:   'LIBS' => ["$xlib -lX11 -lpt -lsocket -lnsl -lm"],   to read:   'LIBS' => ["$xlib -lX11 -lpt -lsocket -lnsl -lm -ldnet"],   because of a newer X11 in /usr/local that needed the DECnet protocol linking.   John Stoffel reports a successful build of static Tk-b10 on Ultrix 4.5. Windows NT: [OBSOLETE] Nick Ing-Simmons reports success with the alpha Tk404.000 kit, perl5.004, and Visual C++. Gurusamy Sarathy has distributed a binary kit with perl,Tk,etc. precompiled for Windows 32. Support is continuing to allow extension by the Borland C++ compiler as well as cross compiler extendability. non-Unix(ish)es:   Information on non-Unix(ish) perl platforms may be obtained from newsgroups and email lists as well as a few world wide web sites. For example, try the Perl 5 Porters (p5p) [page|archives] at one of: http://www.rosat.mpe-garching.mpg.de/mailing-lists/Perl5-Porters/ http://www.hut.fi/~jhi/perl5-porters.html   In general your non-Unix platform must be able to support perl 5 and Xlib (a C compiler and a make utility are tremendously useful too). If you want to run perl/Tk on another computer and simply have the display show up on yours then all you need on your computer is an "X server" The long list of UNIX and non-unix perl 5 ports, Tcl/Tk ports, and Perl/Tk ports that used to appear in this FAQ has now moved to a separate web page at: http://www.perltk.org/contrib/ptkPORT.html    yi wen :   6. ru he bian yi an zhuang ?    ru guo ni bu shi yong de er jin zhi ban ben , na me yi ban shuo lai , bian yi an zhuang Perl/Tk xu yao :   1. yi jing bian yi an zhuang hao de Perl huan jing ( xu yao C de bian yi qi )。 gen ju ni suo xuan ze de Tk de ban ben , ni ke neng hui xu yao bu tong ban ben de Perl huan jing 。   2. C bian yi qi ( wei le bian yi Tk ben shen de dai ma )。   3. tu xing chuang kou de lian jie ku Xlib(.o,.so,.a deng deng )。   Perl/Tk yi jing bei yong hen duo bu tong de cc bian yi qi shang cheng gong de an zhuang ( bao kuo mian fei de GNU de gcc bian yi qi )。 tong shi yi ge make gong ju hui dui an zhuang fei chang you bang zhu 。    bian yi Perl de Tk mo kuai de yi bu yi bu de ming ling da zhi ru xia ( dong tai lian jie ban ben ):   1. make install ( xian an zhuang shi dang ban ben de Perl)   2. uninstall ( xie zai yuan you de jiu ban ben de Tk)   3. gunzip –c Tk400.*.tar.gz | tar xvf - (tar de shen shu zai ru SysV deng de xi tong shang ke neng hui bu tong )   4. cd Tk400.*   5. yue du INSTALL wen jian   6. perl Makefile.PL   7. make   8. make test   9. make install    dui yu “ jing tai lian jie ” ban ben de an zhuang , ni ying gai zai zhi xing wan make zhi hou er zhi xing make test zhi qian zhi xing “make tkperl”。    qing zhu yi , zai shang mian de bu zhou zhong wo men mei you ti dao da liang de xiang guan wen dang he zai na xie zi mu lu zhong de li zi 。 wo men qiang lie tui jian ni zai xi de yue du an zhuang mu lu li de docs,examples deng nei rong , bing qie ba ta men bao liu zai yi ge an quan de di fang 。 ni ye ke yi kao lv ba ta men da bao an zhuang dao yi ge wang luo fu wu qi de mu lu zhong qu 。   Kenneth Albanowski ti gong le yi ge xiang dui jian dan de fang fa yong lai ce shi shi fou ni xi tong shang de Perl yuan xu dong tai lian jie 。 ru guo xia mian de ren he yi ge ming ling mei you xian shi “dl_none.xs”, na me ni ying gai yi jing an zhuang de dong tai lian jie de Perl:   perl –V:dlsrc    huo   perl –Mconfig –e ‘print $Config{dlsrc},”\n”’    huo   perl –e ‘use Config; print $Config{dlsrc},”\n”’   ( gan xie Paul Lussier de geng zheng !)。    xia mian shi guan yu shang mian gei chu de bu zhou de yi xie geng xiang xi de tao lun :   l an zhuang Perl: ying gai xian yue du ni huo qu dao Perl/Tk bao zhong de shuo ming wen jian (Tk*/README deng deng ) lai le jie ta suo yao qiu de Perl de ban ben 。 xiang ying de Perl dai ma ke yi cong CPAN de dao , qi shi ji de an zhuang shuo ming zai perl*.tar.gz de bao li mian 。( guan yu Perl de pei zhi he an zhuang deng wen ti yi jing chao chu lai wo men zhe ge FAQ de fan wei , xiang qing qing shen yue Perl FAQ wen jian )   l zai Perl de an zhuang mu lu yi wai jie kai Perl/Tk de bao   gunzip Tk400.*.tar.gz   tar –xvf Tk400.*.tar   ( zhu yi : ni de tar cheng xu ye xu hui bu ren -xvf xuan xiang 。 ling wai , jie kai yi hou de mu lu wo men zai xia mian de wen dang zhong jiang cheng zhi wei “Tk an zhuang mu lu ”。)   l zai xi yue du INSTALL wen jian   cd Tk400.*   pager INSTALL    zhu : zhe li de pager shi zhi ni yong lai yue du zheng ge wen ben de gong ju , qing wu bi zai xi yue du ci wen dang er bu yao jian dan tiao guo !   l ru guo cun zai , qing xian qing chu suo you yuan xian an zhuang de Perl/Tk!    ru guo ni yuan lai zeng jing an zhuang shi yong guo Tk, ni ke neng xu yao zai shi yong yuan lai de Makfile wen jian zhi xing ru xia :   make uninstall   make realclean    zhu : ci cao zuo ying gai zai ni jie kai xin ban ben de bao zhi qian ( ling wai , qing zhu yi zhe li make de uninstall shu xing xiang dui bi jiao xin )。   l rang Perl an zhao ni de xi tong qing kuang chan sheng yi ge Makefile wen jian   perl Makefile.PL   ( zhu : guan yu ci bu zhou di xiang xi shuo ming qing shen yue xia mian de bu fen )。   l bian yi   make   ( zhu : zhi you zai zuo jing tai bian yi de shi hou cai shi yong :make tkperl)   l ce shi   make test   l an zhuang   make install   l kai shi shi yong   basic_demo( yi zhe zhu : jian yi zhi jie shi yong perl basic_demo)   ( zhu : qing gen ju xu yao xiu gai shou xing #! hou mian de nei rong , huo zhi ding /path/to/perl ./basic_demo)   ( jing gao : ru guo ni shi yong de shi Tk-b9.01 he perl5.002gamma, qing ba basic_demo zhong de use lib ./blib; xing gai cheng use lib qw(blib/arch blib/lib);)   l ba zhe xie wen dang he li zi bao cun dao yi ge an quan ke yong de di fang    ni ke yi shi yong tar,cp,mv,chmod deng deng yi xie ming ling lai ba Tk an zhuang mu lu li de zhe xie you yong de fu zhu wen jian bao cun qi lai 。    ling wai , zai “perl Makefile.PL” de yi bu zhong , you shi ke neng xu yao ming que zhi ming X11 ku huo tou wen jian de wei zhi 。 li ru :   perl Makefile.PL X11=/usr/local/X11R5    huo zhe , ke neng ni de X an zhuang de tou wen jian he ku zai qi ta bu tong de mu lu zhong :   perl Makefile.PL X11INC=/usr/local/share/X11R5/include   X11LIB=/usr/local/arch/X11R5/lib    yi shang de suo you bu zhou shi ji de cheng gong yu fou shi ji zhu yao yi lai yu ni de xi tong 。 dan shi , zui duo de an zhuang cuo wu tong chang shi you yu mei you shi yong zui xin ban ben de ge zhong gong ju er zao cheng de ( li ru C bian yi qi 、make deng deng )。 te bie shi zai ni zhi xing “perl Makefile.PL” qian , xian que ding ni tiao yong de shi na li de perl( yong which perl) yi ji ta de ban ben ( yong perl -v)。 ru guo bi yao de hua , shen zhi ke yi gei chu ni de Perl5 jie shi qi de quan lu jing ( yin wei , you xie ren zai sheng ji perl de shi hou bing mei you shan chu diao lao de ban ben , suo yi yao te bie xiao xin )。    ru guo ni de an zhuang reng you wen ti , yue du yi xia INSTALL wen jian 、README wen jian he yu ni de xi tong dui ying de README wen jian ( li ru ,README.AIX、README.OSF deng deng )。 ni ke neng ye ke yi zai xia mian de di zhi zhao dao yu ni de xi tong dui ying de ptk de chao wen ben dang an wen jian :   http://www.rosat.mpe-garching.mpg.de/mailing-lists/ptk/    huo   http://pubweb.bnl.gov/~ptk/    huo   ftp://ftp.ccd.bnl.gov/pub/ptk/archives/    huo zhe xia mian de ren he yi ge di zhi :   http://www.rosat.mpe-garching.mpg.de/mailing-lists/Perl5-Porters/   http://www.hut.fi/~jhi/perl5-porters.html    ru guo ni xi wang he qi ta ren tao lun ni zai an zhuang Tk shi yu dao de wen ti , ke yi yun xing Tk an zhuang mu lu zhong de myConfig jiao ben , bing bao cun qi shu chu jie guo ( ke neng yi jing bei bao cun zai ni de Tk an zhuang mu lu zhong de myConfig.out wen jian zhong le )。 tong yang de , yun xing perl an zhuang mu lu zhong de myconfig jiao ben ( huo perl –V), bing bao cun qi jie guo 。 yin wei yi ban shuo lai , zai yu bie ren tao lun de shi hou , chu shi shang mian de ren he yi ge ( huo quan bu ) jie guo hui fei chang you bang zhu de 。   ( yi zhe zhu : yuan wen xia mian de bu fen shi yi xie zai ge zhong xi tong shang fa xian de Tk an zhuang zhong de wen ti , dan shi dou yi jing bi jiao lao le , ke neng bu tai shi yong le , suo yi jiu bu yi le …… lei de bu xing le , tou dian lan ge :P)
󰈣󰈤
  免责声明:本文仅代表作者个人观点,与王朝网络无关。王朝网络登载此文出于传递更多信息之目的,并不意味着赞同其观点或证实其描述,其原创性以及文中陈述文字和内容未经本站证实,对本文以及其中全部或者部分内容、文字的真实性、完整性、及时性本站不作任何保证或承诺,请读者仅作参考,并请自行核实相关内容。
 
 
时尚秀气模特裴裴(8)
时尚秀气模特裴裴(7)
时尚秀气模特裴裴(6)
时尚秀气模特裴裴(5)
白墙黑瓦
广州东郊[原创]
八美至丹巴的东谷天然盆景
不一样的
 
>>返回首页<<
 
 
 为你推荐
 
 
 
 转载本文
 UBB代码 HTML代码
复制到剪贴板...
 
 热帖排行
 
 
 
 
 
©2005- 王朝网络 版权所有