{"id":1115,"date":"2014-12-31T22:31:20","date_gmt":"2014-12-31T20:31:20","guid":{"rendered":"http:\/\/adrhc.go.ro\/wordpress\/?p=1115"},"modified":"2017-10-07T17:27:07","modified_gmt":"2017-10-07T15:27:07","slug":"perl-5-20-1","status":"publish","type":"post","link":"https:\/\/adrhc.go.ro\/blog\/perl-5-20-1\/","title":{"rendered":"Compiling Perl 5.20.1"},"content":{"rendered":"<pre class=\"brush:bash shell\">\r\n#See https:\/\/adrhc.go.ro\/wordpress\/common-commands-when-building\/ for building environment, x.sh script and other things not defined here.\r\n#Before starting do declare the environment variables specified to the link above.\r\n\r\n#search http:\/\/search.cpan.org\/ for modules\r\n#see http:\/\/www.thegeekstuff.com\/2008\/09\/how-to-install-perl-modules-manually-and-using-cpan-command\/\r\n#Installing Perl modules from CPAN (didn't work): http:\/\/perl.about.com\/od\/packagesmodules\/qt\/perlcpan.htm\r\n\r\n#environment\r\nexport CFLAGS=\"-march=armv5te -mfloat-abi=soft -mabi=aapcs-linux -fno-stack-protector -pthread -O2 -Wall -Wno-error\"\r\nexport BUILD_FLAGS=\"$CFLAGS -I\/ffp\/include\"\r\nexport LIBS=\"-lintl\"\r\nexport LDFLAGS=\"-L\/ffp\/lib $LIBS\"\r\nexport CPPFLAGS=\"$BUILD_FLAGS\"\r\nexport CXXFLAGS=\"$BUILD_FLAGS\"\r\n\r\n#building perl 5.20.1\r\n~\/x.sh ffpg\r\nsh Configure -Dprefix='\/ffp' -Duseshrplib\r\nBuild a threading Perl? [n] y\r\nWhat libraries to use? -lgdbm -ldb -ldl -lm -lcrypt -lutil -lpthread -lc -lgdbm_compat -lintl\r\nWhat optimizer\/debugger flag should be used? [-O2] -O2 -march=armv5te\r\nAny additional cc flags? -D_REENTRANT -D_GNU_SOURCE -fwrapv -fno-strict-aliasing -pipe $BUILD_FLAGS\r\nAny additional ld flags (NOT including libraries)? [ -L\/usr\/local\/lib] -L\/ffp\/lib\r\nShall I use \/ffp\/bin\/nm to extract C symbols from the libraries? [y] n\r\nDo you wish to use dynamic loading? [y]\r\n#Any special flags to pass to cc -c to compile shared library modules? $BUILD_FLAGS\r\nRun make depend now? [y] n\r\ncccdlflags='-fPIC'\r\nlddlflags='-shared -O2 -march=armv5te -L\/ffp\/lib'\r\nldflags='-L\/ffp\/lib'\r\noptimize='-O2 -march=armv5te'\r\n#sh Configure -S -> to run after config.sh is manually modified\r\nmake depend\r\nnohup \/ffp\/bin\/make -C ~\/compile\/perl-5.20.1 &\r\n\r\nERROR\r\n\t\"can't get tcp protocol by name\" for perl dist\/Net-Ping\/t\/ tests\r\nSOLUTION\r\n\t#see http:\/\/forum.nas-central.org\/viewtopic.php?f=249&t=16561&hilit=iana\r\n\t#see http:\/\/www.iana.org\/assignments\/port-numbers\r\n\t#see http:\/\/sethwklein.net\/iana-etc\r\n\t#you must have already installed one of these (they are the same considering the functionality gain): \r\n\thttps:\/\/adrhc.go.ro\/ffp_0.7_armv5\/packages\/iana-etc-2.30-arm-0.txz -> this one has more comments (compared with stripped version)\r\n\thttps:\/\/adrhc.go.ro\/ffp_0.7_armv5\/packages\/iana-etc-2.30-arm-0-stripped.txz\r\n\thttp:\/\/www.inreto.de\/ffp\/0.7\/arm\/packages\/iana-etc-2.30-arm-1.txz\r\n\t#then add to fun_plug.local the commands below\r\n\tcp \/ffp\/etc\/protocols \/etc\/protocols\r\n\tcp \/ffp\/etc\/services \/etc\/services\r\n\r\n#make minitest\r\nnohup \/ffp\/bin\/make test -C ~\/compile\/perl-5.20.1 &\r\ntail -f nohup.out\r\n\r\n#Install CPAN minus module\r\nwget http:\/\/search.cpan.org\/CPAN\/authors\/id\/M\/MI\/MIYAGAWA\/App-cpanminus-1.7023.tar.gz\r\n#In order to work CPAN minus requires:\r\n#ln -s \/ffp\/etc\/protocols \/etc\/protocols\r\n#CPAN minus might require Mozilla's CA Bundle certificate (search \/ffp\/bin\/cpanm for cert.pem after installation).\r\n#download the Mozilla's CA Bundle certificate:\r\n#wget -nv http:\/\/curl.haxx.se\/ca\/cacert.pem -O \/ffp\/etc\/ssl\/cert.pem\r\n\r\n#Install cpan-outdated module:\r\ncpan install App::cpanoutdated\r\n#or build yourself:\r\ncd ~\/compile\r\nwget http:\/\/search.cpan.org\/CPAN\/authors\/id\/T\/TO\/TOKUHIROM\/App-cpanoutdated-0.24.tar.gz\r\ntar xvzf App-cpanoutdated-0.24.tar.gz\r\ncd ~\/compile\/App-cpanoutdated-0.24\r\n~\/x.sh ffpg\r\nperl Makefile.PL\r\n#installing cpanoutdated required modules\r\ncpanm CPAN::DistnameInfo\r\ncpanm LWP\r\ncpanm Module::Metadata\r\ncpanm local::lib\r\n... and others if asked ...\r\nmake\r\nmake test\r\nmake install\r\n#In order to learn about outdated modules run:\r\ncpan-outdated\r\n\r\n#Install cpanlistchanges with CPAN:\r\ncpan install App::cpanlistchanges\r\n#or with CPAN minus:\r\ncpanm App::cpanlistchanges\r\n#If you want to see what is changed (Change-log) for CPAN module than run:\r\ncpan-listchanges CPAN\r\n\r\n#Building & installing Module-Build module.\r\ncd ~\/compile\r\nwget http:\/\/www.cpan.org\/authors\/id\/L\/LE\/LEONT\/Module-Build-0.4210.tar.gz\r\ntar xvzf Module-Build-0.4210.tar.gz\r\ncd Module-Build-0.4210\r\n~\/x.sh ffpg\r\nperl Build.PL\r\n.\/Build\r\n.\/Build test\r\n.\/Build install\r\n\r\n#Building & installing gettext module.\r\n#needs:\r\nexport LIBS=\"-lintl\"\r\nexport LDFLAGS=\"-L\/ffp\/lib $LIBS\"\r\ncd ~\/compile\/\r\nwget http:\/\/search.cpan.org\/CPAN\/authors\/id\/P\/PV\/PVANDRY\/gettext-1.05.tar.gz\r\ntar xvzf gettext-1.05.tar.gz\r\ncd gettext-1.05\r\n~\/x.sh ffpg\r\nperl Makefile.PL\r\nmake\r\nmake test\r\nmake install\r\n\r\n#When building help2man and perl has the module Locale::gettext I get the error:\r\n#sh: error while loading shared libraries: libintl.so.8: cannot open shared object file: No such file or directory\r\n#solved by (adding \/ffp\/lib to the end):\r\n#export LD_LIBRARY_PATH=\/usr\/local\/zy-pkgs\/lib:\/ffp\/opt\/serf-1.3.6\/lib:\/ffp\/lib\r\n#and also the error:\r\n#help2man: can't get `--help' info from .\/help2man\r\n#Try `--no-discard-stderr' if option outputs to stderr\r\n#solved by removing Locale::gettext perl module:\r\nperl ~\/tools\/uninstall_perl_module.pl Locale::gettext -> only shows what files should be removed\r\n#then remove by hand the Locale::gettext specific files\r\n\r\n#Listing PERL modules\r\n#original article http:\/\/www.linuxquestions.org\/questions\/linux-general-1\/how-to-list-all-installed-perl-modules-216603\/\r\ninstmodsh\t-> also have capabilities to show module's files\r\n#or\r\nperl -MFile::Find=find -MFile::Spec::Functions -Tlwe 'find { wanted => sub { print canonpath $_ if \/\\.pm\\z\/ }, no_chdir => 1 }, @INC'\r\n#or\r\n#Perl Module Tools (https:\/\/metacpan.org\/release\/pmtools)\r\npmall - get all installed modules pmdesc descriptions\r\npminst - find what's installed\r\n#or\r\ncpan -l\r\n\r\n#using cpanm to install App::cpanlistchanges module\r\ncpanm App::cpanlistchanges\r\n#using cpanm to reinstall XML::Simple module\r\ncpanm --reinstall XML::Simple\r\n#Shows the primary maintainers for XML::Simple module\r\ncpan -A XML::Simple\r\n#Show the XML::Simple module details\r\ncpan -D XML::Simple\r\n\r\n#upgrade a module using CPAN\r\n#enter CPAN shell using:\r\ncpan\r\n#press h then ENTER for CPAN shell help\r\n#report updates for DB_File module:\r\nr DB_File\r\n#report updates for CGI::Fast module:\r\nr CGI::Fast\r\n#upgrade CGI::Fast module:\r\nupgrade CGI::Fast\r\n<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>#See https:\/\/adrhc.go.ro\/wordpress\/common-commands-when-building\/ for building environment, x.sh script and other things not defined here. #Before starting do declare the environment variables specified to the link above. #search http:\/\/search.cpan.org\/ for modules #see http:\/\/www.thegeekstuff.com\/2008\/09\/how-to-install-perl-modules-manually-and-using-cpan-command\/ #Installing Perl modules from CPAN (didn&#8217;t work): http:\/\/perl.about.com\/od\/packagesmodules\/qt\/perlcpan.htm #environment [&hellip;]<\/p>\n<div class=\"link-more\"><a href=\"https:\/\/adrhc.go.ro\/blog\/perl-5-20-1\/#more-1115\" class=\"more-link\">Continue reading &#10142; <span class=\"screen-reader-text\">Compiling Perl 5.20.1<\/span><\/a><\/div>","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[5,6,8,11,163],"tags":[122],"class_list":["post-1115","post","type-post","status-publish","format-standard","hentry","category-compiling-from-source","category-configuration","category-howto","category-linux","category-nsa310","tag-perl"],"_links":{"self":[{"href":"https:\/\/adrhc.go.ro\/blog\/wp-json\/wp\/v2\/posts\/1115","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/adrhc.go.ro\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/adrhc.go.ro\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/adrhc.go.ro\/blog\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/adrhc.go.ro\/blog\/wp-json\/wp\/v2\/comments?post=1115"}],"version-history":[{"count":0,"href":"https:\/\/adrhc.go.ro\/blog\/wp-json\/wp\/v2\/posts\/1115\/revisions"}],"wp:attachment":[{"href":"https:\/\/adrhc.go.ro\/blog\/wp-json\/wp\/v2\/media?parent=1115"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/adrhc.go.ro\/blog\/wp-json\/wp\/v2\/categories?post=1115"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/adrhc.go.ro\/blog\/wp-json\/wp\/v2\/tags?post=1115"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}