Dear all, As multiple people have asked me how to do this I think its a good idea to just post it on to the list. Many people don't realize how easy it is to build and install your own latest Perl in your home directory along with CPAN/CPANPLUS and with that comes Padre!
Typically on UNIX/Linux systems we don't have superuser access and installing rpm/apt packages is therefore not possible, anyway this is a not such a bad thing as these packages normally aren't the most up-to-date version available and after a while the distro stops updating them anyway without upgrading your entire system to the next distro version. In addition, the system Perl (normally at /usr/bin/perl) is typically an older version and it's always a good idea to have your own latest Perl and CPAN/CPANPLUS in your $HOME directory so you can have the latest versions and install whatever modules you want from CPAN without needing superuser access. Here I give the step-by-step instructions and commands to build, install and configure Perl, CPAN, and CPANPLUS into your $HOME on Fedora/RHEL/CentOS systems. Perl First make sure to unset any environment PERL5LIB, LD_LIBRARY_PATH, LD_RUN_PATH or other possibly offending environment vars before starting this procedure! (by typing e.g. unset PERL5LIB) If you log out and log back in any time during the Perl compiling and installing steps you have to make sure to unset them again. Create the Perl final installation directory: mkdir -p $HOME/soft/perl/5.12.1 In some other working directory (e.g. $HOME/downloads) download Perl source: wget http://search.cpan.org/CPAN/authors/id/J/JE/JESSE/perl-5.12.1.tar.gz tar xzof perl-5.12.1.tar.gz cd perl 5.12.1 Run the following command to build a... (please first replace the below the -Dperladmin email and -Dcf_by name with your values) 64-bit Perl on 64-bit Fedora/RHEL/CentOS: sh Configure \ -des \ -Doptimize='-O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic' \ -Accflags='-DPERL_USE_SAFE_PUTENV -I/usr/include/gdbm' \ -Aappend:libswanted='-l resolv' \ -Dversion=5.12.1 \ -Dmyhostname=localhost \ -dperladmin=myem...@mydomain \ -Dcc=gcc \ -Dcf_by='my name here' \ -Dprefix=$HOME/soft/perl/5.12.1 \ -Darchname=x86_64-linux-thread-multi \ -Dlibpth='/usr/local/lib64 /lib64 /usr/lib64' \ -Duseshrplib -Dusethreads -Duseithreads -Duselargefiles \ -Dd_semctl_semun -Di_db -Ui_ndbm -Di_gdbm -Di_shadow -Di_syslog \ -Dman3ext=3pm -Duseperlio -Dinstallusrbinperl=n -Ubincompat5005 \ -Uversiononly -Dpager='/usr/bin/less -isr' -Dd_gethostent_r_proto \ -Ud_endhostent_r_proto -Ud_sethostent_r_proto -Ud_endprotoent_r_proto \ -Ud_setprotoent_r_proto -Ud_endservent_r_proto -Ud_setservent_r_proto \ -Dinc_version_list=none 32-bit Perl on 32-bit Fedora/RHEL/CentOS: sh Configure \ -des \ -Doptimize='-O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m32 -mtune=generic' \ -Accflags='-DPERL_USE_SAFE_PUTENV -I/usr/include/gdbm' \ -Aappend:libswanted='-l resolv' \ -Dversion=5.12.1 \ -Dmyhostname=localhost \ -dperladmin=myem...@mydomain \ -Dcc=gcc \ -Dcf_by='my name here' \ -Dprefix=$HOME/soft/perl/5.12.1 \ -Darchname=i686-linux-thread-multi \ -Dlibpth='/usr/local/lib /lib /usr/lib' \ -Duseshrplib -Dusethreads -Duseithreads -Duselargefiles \ -Dd_semctl_semun -Di_db -Ui_ndbm -Di_gdbm -Di_shadow -Di_syslog \ -Dman3ext=3pm -Duseperlio -Dinstallusrbinperl=n -Ubincompat5005 \ -Uversiononly -Dpager='/usr/bin/less -isr' -Dd_gethostent_r_proto \ -Ud_endhostent_r_proto -Ud_sethostent_r_proto -Ud_endprotoent_r_proto \ -Ud_setprotoent_r_proto -Ud_endservent_r_proto -Ud_setservent_r_proto \ -Dinc_version_list=none For some reason :) if you need a 32-bit Perl on 64-bit Fedora/RHEL/CentOS you would run: sh Configure \ -des \ -Doptimize='-O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m32 -mtune=generic' \ -Accflags='-DPERL_USE_SAFE_PUTENV -I/usr/include/gdbm' \ -Aappend:libswanted='-l resolv' \ -Dversion=5.12.1 \ -Dmyhostname=localhost \ -dperladmin=myem...@mydomain \ -Dcc='gcc -m32' \ -Dcf_by='my name here' \ -Dprefix=$HOME/soft/perl/5.12.1 \ -Darchname=i686-linux-thread-multi \ -Dlibpth='/usr/local/lib /lib /usr/lib' \ -Duseshrplib -Dusethreads -Duseithreads -Duselargefiles \ -Dd_semctl_semun -Di_db -Ui_ndbm -Di_gdbm -Di_shadow -Di_syslog \ -Dman3ext=3pm -Duseperlio -Dinstallusrbinperl=n -Ubincompat5005 \ -Uversiononly -Dpager='/usr/bin/less -isr' -Dd_gethostent_r_proto \ -Ud_endhostent_r_proto -Ud_sethostent_r_proto -Ud_endprotoent_r_proto \ -Ud_setprotoent_r_proto -Ud_endservent_r_proto -Ud_setservent_r_proto \ -Dinc_version_list=none Now those of you who don't have RedHat based system no worries, how do you configure your Perl properly? The safest way it to build it just like the way your system Perl was built for your distro. Do a /usr/bin/perl -V and extract the config_args='...'. Please note a few important things: - Internal quotes are missing from this string and they need to be re-added manually, namely as you see above for the -Doptimize, -Accflags, -Dlibpth, etc. - remove the -Dd_dosuid parameter as a suid Perl can only be installed by superuser - Even when you have the config_args right you will probably have to do a couple test builds and compare the resulting perl -V with the system /usr/bin/perl -V to make sure the Compiler, Linker and Libraries and Dynamic Linking sections are the same. If they aren't, you typically have to add something to -Accflags or -Aappend:libswanted parameters, please check the INSTALL file (http://search.cpan.org/~jesse/perl-5.12.1/INSTALL) to get info on all the configuration options. Ok back to building, after the Configure command has run properly, we need to compile, test and install. Run the following commands in succession: make make test make install All tests should pass. Make sure that you now point to the new Perl binary by editing your $HOME/.bash_profile (or .profile or .bashrc) and add the Perl bin path to start of your path: PERL_HOME=$HOME/soft/perl/5.12.1 export PERL_HOME PATH=$PERL_HOME/bin:$PATH export PATH "source .bash_profile" or logout/login to read the new PATH. Make sure again you are pointing to the new Perl binary by doing "which perl" and "perl -V" and checking the results of your build. CPAN CPAN already comes as part of the Perl distribution you just built (it is in the 5.12.1/bin directory with the perl we just installed and in your PATH now), you can start by simply executing the cpan command-line executable and when prompted just hit return to initially configure it with sane default settings: cpan After this initial config runs, you might want to manually customize these cpan settings. Below are sane options that I like to set and I think are useful. For the urllist the CPAN initial configurator will try to find your closest mirrors and set them for you. For me at least it never picks the best ones, so I set it manually as you see below with my two Swiss mirrors first. cpan> o conf build_requires_install_policy yes cpan> o conf check_sigs 1 cpan> o conf prerequisites_policy follow cpan> o conf urllist ftp://mirror.switch.ch/mirror/CPAN/ ftp://ftp.solnet.ch/mirror/CPAN/ http://www.perl.org/CPAN/ ftp://ftp.perl.org/pub/CPAN/ cpan> o conf auto_commit 1 Now install some additional important modules for CPAN: cpan> install Module::Signature cpan> install Storable cpan> install Bundle::CPAN cpan> install YAML::Syck (or YAML::LibYAML) cpan> install CPAN::SQLite Now do additional configuration changes: cpan> o conf yaml_module YAML::Syck (or YAML::LibYAML) cpan> o conf use_sqlite 1 If the YAML::Syck or YAML::LibYAML modules don't build because you don't have the libraries on your system then just use YAML as that is pure Perl: cpan> o conf yaml_module YAML You have to quit and restart the cpan executable before installing any other modules so that CPAN can create its SQLite database from its index files. cpan> quit You can always check your current configuration by running cpan> o conf CPAN is now fully optimized and ready to manage your entire Perl library tree! You should periodically run the installs done above: cpan> install Storable Bundle::CPAN YAML::Syck Module::Signature CPAN::SQLite to keep CPAN and its related helper modules up-to-date. CPANPLUS CPANPLUS already comes as part of the Perl distribution (it is in the 5.12.1/bin directory with the perl we just installed and in your PATH now), you can start by simply executing the cpanp command-line executable and when prompted hit return to initially configure it with sane default settings: cpanp After this runs, manually customize these cpanp settings: CPAN Terminal> s conf email myem...@mydomain CPAN Terminal> s conf prereqs 1 CPAN Terminal> s conf signature 1 CPAN Terminal> s conf write_install_logs 0 CPAN Terminal> s save Now we have to add the CPAN mirrors, it is easier to do this by manually editing the configuration file directly by typing: CPAN Terminal> s edit This will open the file in vi. In the hosts section add your local mirrors vertically before the built-in ones, as you see in this example with my Swiss mirrors: { 'path' => '/mirror/CPAN/', 'scheme' => 'ftp', 'host' => 'mirror.switch.ch' }, { 'path' => '/mirror/CPAN/', 'scheme' => 'ftp', 'host' => 'ftp.solnet.ch' }, Save and quit. Now double check you added them properly by typing: CPAN Terminal> s mirrors Now let's update CPANPLUS and its dependencies to the latest versions: CPAN Terminal> i Bundle::CPANPLUS::Dependencies --verbose CPAN Terminal> s selfupdate all --verbose CPANPLUS is now fully optimized and ready to manage your entire Perl library tree! You should periodically run CPAN Terminal> s selfupdate all --verbose the above command to keep CPANPLUS and its helper modules up-to-date. You can use CPAN or CPANPLUS or both to manage you Perl library tree. CPANPLUS has some features CPAN doesn't have (like uninstall) but I find that some modules install in one and not the other so it is good to have both. Padre Using CPAN or CPANPLUS, install Padre: cpan> install Padre or cpanp> i Padre --verbose There are quite a few dependencies but they should all build, test and install properly. During the testing of Wx, Alien::wxWidgets, and maybe Padre you will see test GUI windows pop up and disappear this is normal its just testing Wx. Now you have Padre build and can launch it with: padre hope this helps everyone! best, Leandro _______________________________________________ Padre-dev mailing list Padre-dev@perlide.org http://mail.perlide.org/mailman/listinfo/padre-dev