What should I change in order to install the module? php is 5.3.3 withyum install php-devel in place.
PHP.c: In function ‘PHP_set_php_input’:
PHP.c:818: warning: passing argument 2 of ‘Perl_sv_2pv_flags’ from incompatible pointer type
/home/mpapec/.plenv/versions/5.20.0/lib/perl5/5.20.0/x86_64-linux/CORE/proto.h:3931: note: expected ‘STRLEN * const’ but argument is of type ‘int *’
cc -c -I/usr/include/php -I/usr/include/php/main -I/usr/include/php/TSRM -I/usr/include/php/Zend -I/usr/include/php/ext -I/usr/include/php/ext/date/lib -Wall -O2 -DVERSION=\"0.15\" -DXS_VERSION=\"0.15\" -fPIC "-I/home/mpapec/.plenv/versions/5.20.0/lib/perl5/5.20.0/x86_64-linux/CORE" array.c
In file included from /usr/include/php/main/php.h:33,
from /usr/include/php/sapi/embed/php_embed.h:23,
from PHP.h:14,
from array.c:9:
/usr/include/php/main/php_config.h:2417:1: warning: "_GNU_SOURCE" redefined
In file included from /home/mpapec/.plenv/versions/5.20.0/lib/perl5/5.20.0/x86_64-linux/CORE/perl.h:28,
from PHP.h:9,
from array.c:9:
/home/mpapec/.plenv/versions/5.20.0/lib/perl5/5.20.0/x86_64-linux/CORE/config.h:1825:1: warning: this is the location of the previous definition
rm -f blib/arch/auto/PHP/PHP.so
cc -shared -O2 -L/usr/local/lib -fstack-protector PHP.o array.o -o blib/arch/auto/PHP/PHP.so \
\
chmod 755 blib/arch/auto/PHP/PHP.so
"/home/mpapec/.plenv/versions/5.20.0/bin/perl5.20.0" -MExtUtils::Command::MM -e 'cp_nonempty' -- PHP.bs blib/arch/auto/PHP/PHP.bs 644
Manifying 1 pod document
Running Mkbootstrap for PHP ()
chmod 644 "PHP.bs"
PERL_DL_NONLAZY=1 "/home/mpapec/.plenv/versions/5.20.0/bin/perl5.20.0" "-Iblib/lib" "-Iblib/arch" test.pl
1..79
not ok 1 - use_ok PHP
# Failed test 'use_ok PHP'
# at test.pl line 11.
not ok 2 - require PHP;
# Failed test 'require PHP;'
# at test.pl line 18.
# Tried to require 'PHP'.
# Error: Attempt to reload PHP.pm aborted.
# Compilation failed in require at (eval 6) line 2.
not ok 3 - eval
# Failed test 'eval'
# at test.pl line 49.
Module PHP failed to load at blib/lib/PHP.pm line 80.
Module PHP failed to load at blib/lib/PHP.pm line 80.
END failed--call queue aborted at test.pl line 50.
# Looks like you planned 79 tests but ran 3.
# Looks like you failed 3 tests of 3 run.
# Looks like your test exited with 22 just after 3.
make: *** [test_dynamic] Error 22
-> FAIL Installing PHP failed. See /home/mpapec/.cpanm/work/1440522239.12833/build.log for details. Retry with --force to force install it.
(
PHP is kind of fragile. It probably won't work out of the box with your system php installation, and may have trouble with 64-bit or multi-threaded versions of perl.
I have only ever gotten it to work on Linux. The latest version I have tried to use is 5.3.8 (back in 2013), though I remember things going smoothly from 5.2.x to 5.3.8.
I always build php from source, with this configuration:
./configure --enable-embed --with-zlib --with-openssl --with-mysql \
--with-libdir=lib/i386-linux-gnu
--enable-embed is absolutely required, as the pod mentions, to build a PHP interpreter with the SAPI extension, and which then allows perl to manipulate the PHP interpreter through XS code. The other extensions were for other requirements of my project; they may be optional, but I haven't experimented with building the PHP interpreter or the PHP module with any other configuration. The pod also says to never use the --with-apxs argument, which I was never tempted to do anyway.
The build process of the PHP module will look for and require a program called php-config. You may need to hack your $PATH, if only during the build process, so that the PHP module runs the correct php-config. After that the module will know where to look for the rest of your php installation.
I had fun working with this module for a while (writing a Catalyst and then a Mojolicious wrapper around WordPress), but it has fallen into disrepair and disrepute. Share whatever you learn trying to build it and we'll put it in the docs, making this module that much easier to use.
Related
I am very much a perl newbie, I know very little about the system.
I am trying to install App/Lingua/BO/Wylie/Transliteration.pm which seems to be dependent on true.
I am getting an error on the install of true. This seems very surprising, so I am very open to something very fundamental and wrong with the perl installation. Running perl v5.30.2 on MacOS 11.3.1.
cpan error log:
force install true.pm
Running install for module 'true'
CHOCOLATE/true-v1.0.2.tar.gz
Has already been unwrapped into directory /Users/phil/.cpan/build/true-v1.0.2-0
CHOCOLATE/true-v1.0.2.tar.gz
Has already been prepared
Running make for C/CH/CHOCOLATE/true-v1.0.2.tar.gz
"/usr/bin/perl" -MExtUtils::Command::MM -e 'cp_nonempty' -- true.bs blib/arch/auto/true/true.bs 644
cc -c -I/Users/phil/perl5/lib/perl5/darwin-thread-multi-2level/B/Hooks/OP/Annotation/Install -I/System/Library/Perl/Extras/5.30/darwin-thread-multi-2level/B/Hooks/OP/Check/Install -g -pipe -fno-strict-aliasing -fstack-protector-strong -DPERL_USE_SAFE_PUTENV -O3 -Wall -W -DVERSION=\"v1.0.2\" -DXS_VERSION=\"v1.0.2\" -iwithsysroot "/System/Library/Perl/5.30/darwin-thread-multi-2level/CORE" true.c
true.xs:8:10: fatal error: 'hook_op_check.h' file not found
#include "hook_op_check.h"
^~~~~~~~~~~~~~~~~
1 error generated.
make: *** [true.o] Error 1
CHOCOLATE/true-v1.0.2.tar.gz
/usr/bin/make -- NOT OK
Failed during this command:
CHOCOLATE/true-v1.0.2.tar.gz : make NO
true.xs:8:10: fatal error: 'hook_op_check.h' file not found
This looks like a bug in the system Perl installation that comes preinstalled on macOS. The module B::Hooks::OP::Check comes preinstalled in /System/Library/Perl/Extras/5.30/darwin-thread-multi-2level/B/Hooks/OP/ but the file /System/Library/Perl/Extras/5.30/darwin-thread-multi-2level/B/Hooks/OP/Check/Install/hook_op_check.h is missing for some reason. As a consequence, it is not possible to install the module true which depends on that file being there.
You can override the preinstalled version by running:
$ cpan -f B::Hooks::OP::Check
This will install the module into /Library/Perl/5.30/darwin-thread-multi-2level/B/Hooks/OP if you are using sudo with cpan, or into ~/perl5/lib/perl5/darwin-thread-multi-2level/B/Hooks/OP if you are using local::lib with cpan. This latter installation will be found before the preinstalled version due to the ordering of the perl #INC include path, so it will override the preinstalled version of the module.
This will enable you to install the module true, but after installing this the installation of App::Lingua::BO::Wylie::Transliteration still fails:
$ cpan App::Lingua::BO::Wylie::Transliteration
Loading internal logger. Log::Log4perl recommended for better logging
Reading '/Users/hakonhaegland/.cpan/Metadata'
Database was generated on Sat, 01 Jan 2022 22:29:03 GMT
Running install for module 'App::Lingua::BO::Wylie::Transliteration'
Fetching with LWP:
http://www.cpan.org/authors/id/D/DB/DBR/App-Lingua-BO-Wylie-Transliteration-0.1.0.tar.gz
Fetching with LWP:
HASH(0x13444b3c8)authors/id/D/DB/DBR/CHECKSUMS
Fetching with LWP:
HASH(0x13444b3c8)authors/id/D/DB/DBR/CHECKSUMS.gz
Fetching with LWP:
http://www.cpan.org/authors/id/D/DB/DBR/CHECKSUMS
Checksum for /Users/hakonhaegland/.cpan/sources/authors/id/D/DB/DBR/App-Lingua-BO-Wylie-Transliteration-0.1.0.tar.gz ok
Configuring D/DB/DBR/App-Lingua-BO-Wylie-Transliteration-0.1.0.tar.gz with Build.PL
Created MYMETA.yml and MYMETA.json
Creating new 'Build' script for 'App-Lingua-BO-Wylie-Transliteration' version '0.1.0'
DBR/App-Lingua-BO-Wylie-Transliteration-0.1.0.tar.gz
/usr/bin/perl Build.PL -- OK
Running Build for D/DB/DBR/App-Lingua-BO-Wylie-Transliteration-0.1.0.tar.gz
Building App-Lingua-BO-Wylie-Transliteration
DBR/App-Lingua-BO-Wylie-Transliteration-0.1.0.tar.gz
./Build -- OK
Running Build test for DBR/App-Lingua-BO-Wylie-Transliteration-0.1.0.tar.gz
t/00-check-deps.t ........ ok
t/00-load.t .............. 1/1
# Failed test 'use App::Lingua::BO::Wylie::Transliteration;'
# at /Library/Perl/5.30/Test/UseAllModules.pm line 71.
# Tried to use 'App::Lingua::BO::Wylie::Transliteration'.
# Error: Couldn't find declarator 'method' at /System/Library/Perl/Extras/5.30/darwin-thread-multi-2level/Devel/Declare/Context/Simple.pm line 47.
# Devel::Declare::Context::Simple::skip_declarator(Method::Signatures::Simple=HASH(0x12704f6d8)) called at /System/Library/Perl/Extras/5.30/darwin-thread-multi-2level/Devel/Declare/MethodInstaller/Simple.pm line 62
# Devel::Declare::MethodInstaller::Simple::parser(Method::Signatures::Simple=HASH(0x12704f6d8), "method", 0, 1) called at /System/Library/Perl/Extras/5.30/darwin-thread-multi-2level/Devel/Declare/MethodInstaller/Simple.pm line 25
# Devel::Declare::MethodInstaller::Simple::__ANON__("method", 0) called at /System/Library/Perl/Extras/5.30/darwin-thread-multi-2level/Devel/Declare.pm line 277
# Devel::Declare::linestr_callback("const", "method", 0) called at lib/App/Lingua/BO/Wylie/Transliteration.pm line 37
# require App/Lingua/BO/Wylie/Transliteration.pm called at /Library/Perl/5.30/Test/UseAllModules.pm line 71
# Test::UseAllModules::BEGIN() called at lib/App/Lingua/BO/Wylie/Transliteration.pm line 37
# eval {...} called at lib/App/Lingua/BO/Wylie/Transliteration.pm line 37
# eval 'package Test::UseAllModules;
# BEGIN { ${^WARNING_BITS} = $args[-1] if defined $args[-1] }
# #line 71 /Library/Perl/5.30/Test/UseAllModules.pm
# use App::Lingua::BO::Wylie::Transliteration #{$args[0]};
# 1;
# ' called at /System/Library/Perl/5.30/Test/More.pm line 1034
# Test::More::_eval("package Test::UseAllModules;\x{a}BEGIN { \${^WARNING_BITS} = \$args"..., ARRAY(0x1268938e0), "UUUUUUUUUUUUUUUUUUU") called at /System/Library/Perl/5.30/Test/More.pm line 1009
# Test::More::use_ok("App::Lingua::BO::Wylie::Transliteration") called at /Library/Perl/5.30/Test/UseAllModules.pm line 71
# Test::UseAllModules::all_uses_ok() called at t/00-load.t line 4
# main::BEGIN() called at lib/App/Lingua/BO/Wylie/Transliteration.pm line 37
# eval {...} called at lib/App/Lingua/BO/Wylie/Transliteration.pm line 37
# Compilation failed in require at /Library/Perl/5.30/Test/UseAllModules.pm line 71.
# BEGIN failed--compilation aborted at /Library/Perl/5.30/Test/UseAllModules.pm line 71.
Bailout called. Further testing stopped: failed: App::Lingua::BO::Wylie::Transliteration
this is due to a recent change in Devel::Declare and a corresponding change in the parser in bleed described in these bug reports, report1 and report2.
A workaround is to install a an earlier version of perl together with an earlier version of Devel::Declare. You can do this using perlbrew. For example:
$ perlbrew install perl-5.26.3
$ cpanm Devel::Declare#0.006019
$ cpanm App::Lingua::BO::Wylie::Transliteration
this is a bit of a long shot but:
I'm following this guide: https://www.tutorialspoint.com/postgresql/postgresql_c_cpp.htm
But when running ./configure I get the following error:
(previous checking lines omitted for brevity)
checking for main in -lpq... yes
checking for PQexec in -lpq... yes
checking for correct C++ linkage of basic libpq functions...
sed: character class syntax is [[:space:]], not [:space:]
configure: error:
Linking a call to libpq failed in C++, even though it succeeded in C. If your
C and C++ compilers are very different beasts, this may mean that we do not have
the right options for linking with it after all.
Read the config.log file for more detailed information. Look for the last error
message, which may be several pages up from the end of the file.
And the configure.log file looks like this:
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
It was created by libpqxx configure 4.0, which was
generated by GNU Autoconf 2.68. Invocation command line was
$ ./configure
## --------- ##
## Platform. ##
## --------- ##
(some lines omitted)
configure:3039: g++ -V >&5
g++: error: unrecognized command line option '-V'
g++: fatal error: no input files
compilation terminated.
configure:3050: $? = 1
configure:3039: g++ -qversion >&5
g++: error: unrecognized command line option '-qversion'; did you mean '--version'?
g++: fatal error: no input files
compilation terminated.
(some lines omitted)
configure:7629: gcc -E conftest.c
conftest.c:11:10: fatal error: ac_nonexistent.h: No such file or directory
#include <ac_nonexistent.h>
^~~~~~~~~~~~~~~~~~
compilation terminated.
(some lines omitted)
configure:8319: gcc -c -g -O2 -fno-rtti -fno-exceptions conftest.c >&5
cc1: warning: command line option '-fno-rtti' is valid for C++/ObjC++ but not for C
(some lines omitted)
configure:16424: g++ -o conftest -g -O2 -L/usr/lib/x86_64-linux-gnu conftest.cpp >&5
/tmp/ccfFBf4K.o: In function `main':
/home/peter/libpqxx-4.0/conftest.cpp:44: undefined reference to `PQexec'
collect2: error: ld returned 1 exit status
(some liens omitted)
I don't believe I have any packages missing. I have the newest version of g++, psql and libpqxx installed.
I have updated and upgraded all packages on my system.
I have crawled the web for solutions to this error, but I have no clue what is wrong.
Do you have an idea where I can go from here?
There hasn't been a tarball release of libpqxx at the old spot in a long time, so the tutorial you used with its wget command to download the tarball is very outdated.
The issue you encountered looks related to this issue and appears to have been fixed in this commit:
commit 85e9336740475be25ed19924cca0961f7d844c4b
Author: Jeroen Vermeulen <jtvjtv#gmail.com>
Date: Thu Jun 1 11:39:08 2017 +0700
Fix #13: not linking to libpq.
This was that annoying interaction between autoconf, m4, GNU sed syntax,
and the shell which broke the "remove redundant -lpq options" code in
the configure script.
Solution: forget about GNU sed's "[[:space:]]" syntax, and just look for
a literal space. There aren't going to be any tabs, newlines,
non-breaking spaces, etc. there in even a moderately sane world.
The system is Ubuntu. There is a perl in /usr/bin/, and is version is 5.18.2.
In this state, I tried to install many software by "sudo apt-get install **" and it was OK.
But a few days before, I installed a new perl in an other
directory(/share/Software/perl-5.26.0/bin/perl). And I remove the original perl then link the new perl to /use/bin/. The commands are:
sudo mv /usr/bin/perl /usr/bin/old/; (the old/ directory was make before)
sudo ln -s /share/Software/perl-5.26.0/bin/perl /usr/bin/perl
After that, I got the error informations when I install system software by apt-get. The error likes below:
1 not fully installed or removed.
After this operation, 0 B of additional disk space will be used.
Do you want to continue? [Y/n] y
debconf: Perl may be unconfigured (Can't locate Debconf/Log.pm in #INC (you may need to install the Debconf::Log module) (#INC contains: /share/Software/perl-5.26.0/lib/site_perl/5.26.0/x86_64-linux /share/Software/perl-5.26.0/lib/site_perl/5.26.0 /share/Software/perl-5.26.0/lib/5.26.0/x86_64-linux /share/Software/perl-5.26.0/lib/5.26.0) at (eval 1) line 4.
BEGIN failed--compilation aborted at (eval 1) line 4.
) -- aborting
Setting up doc-base (0.10.5) ...
Can't locate Debian/DocBase/Common.pm in #INC (you may need to install the Debian::DocBase::Common module) (#INC contains: /share/Software/perl-5.26.0/lib/site_perl/5.26.0/x86_64-linux /share/Software/perl-5.26.0/lib/site_perl/5.26.0 /share/Software/perl-5.26.0/lib/5.26.0/x86_64-linux /share/Software/perl-5.26.0/lib/5.26.0) at /usr/sbin/install-docs line 8.
BEGIN failed--compilation aborted at /usr/sbin/install-docs line 8.
Some software can be installed successfully, but some can not be.
If I put perl back to the previous, it is normal again. (That must be!)
Module "Debconf::Log" is located at /share/Software/perl-5.26.0/lib/perl5, but I can not find Debian/DocBase/Common.pm.
Path of /share/Software/perl-5.26.0/lib/perl5 is inside #INC of perl. Why it can not find it?
I even think that it is the problem when perl installed. I get below error when perl installed: ("make test")
Useless use of single ref constructor in void context at op/gv.t line 1191.
In file included from ../../../../perl.h:5644:0,
from ExtTest.xs:2:
ExtTest.c: In function ‘XS_ExtTest_constant’:
../../../../embed.h:691:40: warning: ‘pv’ may be used uninitialized in this function [-Wmaybe-uninitialized]
#define sv_setpvn(a,b,c) Perl_sv_setpvn(aTHX_ a,b,c)
^
ExtTest.xs:420:14: note: ‘pv’ was declared here
const char *pv;
^
In file included from ../../../../perl.h:5644:0,
from ExtTest.xs:2:
../../../../embed.h:691:40: warning: ‘iv’ may be used uninitialized in this function [-Wmaybe-uninitialized]
#define sv_setpvn(a,b,c) Perl_sv_setpvn(aTHX_ a,b,c)
^
ExtTest.xs:418:6: note: ‘iv’ was declared here
IV iv;
^
In file included from ../../../../perl.h:5644:0,
from ExtTest.xs:2:
ExtTest.c: In function ‘XS_ExtTest_constant’:
../../../../embed.h:691:40: warning: ‘pv’ may be used uninitialized in this function [-Wmaybe-uninitialized]
#define sv_setpvn(a,b,c) Perl_sv_setpvn(aTHX_ a,b,c)
^
ExtTest.xs:194:14: note: ‘pv’ was declared here
const char *pv;
^
In file included from ../../../../perl.h:5644:0,
from ExtTest.xs:2:
ExtTest.c: In function ‘XS_ExtTest_constant’:
../../../../embed.h:675:42: warning: ‘iv’ may be used uninitialized in this function [-Wmaybe-uninitialized]
#define sv_setiv_mg(a,b) Perl_sv_setiv_mg(aTHX_ a,b)
^
ExtTest.xs:166:6: note: ‘iv’ was declared here
IV iv;
^
# Failed test 'cp updated mtime'
# at t/cp.t line 26.
# '38'
# <=
# '1'
# Looks like you failed 1 test of 1.
Request to remove file /share/Software/perl-5.26.0-src/cpan/File-Temp/suffixOEXZVr.dat could not be completed since it is not there!
at t/mktemp.t line 75.
# parser guessed wrong encoding expected 'CP1252' got 'UTF-8'
# Failed test 'File 1 atime set correctly'
# at t/utime.t line 113.
# '37.684463262558'
# <
# '0.1'
# Failed test 'File 1 mtime set correctly'
# at t/utime.t line 114.
# '37.684463262558'
# <
# '0.1'
# Failed test 'File 2 atime set correctly'
# at t/utime.t line 118.
# '37.684463262558'
# <
# '0.1'
# Failed test 'File 2 mtime set correctly'
# at t/utime.t line 119.
# '37.684463262558'
# <
# '0.1'
# Looks like you failed 4 tests of 18.
Can't open copy1-87150: Permission denied at ../lib/File/Copy.t line 326.
# Looks like your test exited with 13 just after 366.
Failed 3 tests out of 2449, 99.88% okay.
### Since not all tests were successful, you may want to run some of
### them individually and examine any diagnostic messages they produce.
### See the INSTALL document's section on "make test".
### You have a good chance to get more information by running
### ./perl harness
### in the 't' directory since most (>=80%) of the tests succeeded.
### You may have to set your dynamic library search path,
### LD_LIBRARY_PATH, to point to the build directory:
### setenv LD_LIBRARY_PATH `pwd`:$LD_LIBRARY_PATH; cd t; ./perl harness
### LD_LIBRARY_PATH=`pwd`:$LD_LIBRARY_PATH; export LD_LIBRARY_PATH; cd t; ./perl harness
### export LD_LIBRARY_PATH=`pwd`:$LD_LIBRARY_PATH; cd t; ./perl harness
### for csh-style shells, like tcsh; or for traditional/modern
### Bourne-style shells, like bash, ksh, and zsh, respectively.
make: *** [test] Error 1
Each Perl is compiled with a few #INC directories where it will search for modules. The error message explains which directories are searched:
#INC contains:
/share/Software/perl-5.26.0/lib/site_perl/5.26.0/x86_64-linux
/share/Software/perl-5.26.0/lib/site_perl/5.26.0
/share/Software/perl-5.26.0/lib/5.26.0/x86_64-linux
/share/Software/perl-5.26.0/lib/5.26.0
This does not include the directories where APT has installed modules for Perl, e.g. under /usr/lib.
However, adding those directories will not help. Some modules are compiled for a specific Perl versions. You cannot upgrade Perl in-place, but would have to reinstall all modules. Since APT contains pre-built modules you cannot use modules installed via APT with a custom Perl.
Therefore: leave the system Perl because Ubuntu depends on its proper functioning. It is safe to install another Perl alongside, e.g. via perlbrew. It is safe to add a custom Perl to your PATH, e.g. via perlbrew switch. This will also fix a couple of additional environment variables that are required for a second Perl to work.
I cannot for the life of me figure out how to setup Bugzilla to send email using TLS. I got the Bugzilla site running, however, when I try to change my Bugzilla account email, the system fails with the following (I setup my email parameters to use my Amazon AWS email server):
An unexpected error occurred. This could be a temporary problem, or some code is behaving incorrectly. If this problem persists, please email this page to ...#.....com with details of what you were doing at the time this message appeared.
URL: http://example.com/userprefs.cgi?new_password1=&new_password2=&tab=account&old_login=jdoe%40example.com&realname=John%20Doe&new_login_name=johndoe422%40example.net&dosave=1&token=...&old_password=...
There was an error sending mail from 'bugzilla#example.com' to 'johndoe422#example.com': failed AUTH: Must issue a STARTTLS command first
Traceback:
at Bugzilla/Mailer.pm line 186.
Bugzilla::Mailer::MessageToMTA(...) called at Bugzilla/Token.pm line 116
Bugzilla::Token::IssueEmailChangeToken(...) called at /srv/www/bugzilla/userprefs.cgi line 120
main::SaveAccount(...) called at /srv/www/bugzilla/userprefs.cgi line 608
So I proceeded to try to fix this problem by following the instructions in: Bugzilla Alerts Using Gmail
I managed to install the Email::Send::SMTP::TLS module using cpanm (Not sure why I just cannot install any module via CPAN at all), after installation, the SMTP::TLS option does not appear in the drop-down. I just ignored it and continue to update Mailer.pm as instructed.
After that, when I refresh my bugzilla page, I get the following error:
Software error:
Global symbol "#args" requires explicit package name at Bugzilla/Mailer.pm line 138.
Global symbol "#args" requires explicit package name at Bugzilla/Mailer.pm line 144.
Compilation failed in require at Bugzilla/Auth.pm line 22.
BEGIN failed--compilation aborted at Bugzilla/Auth.pm line 22.
Compilation failed in require at Bugzilla.pm line 23.
BEGIN failed--compilation aborted at Bugzilla.pm line 23.
Compilation failed in require at /srv/www/bugzilla/editparams.cgi line 15.
BEGIN failed--compilation aborted at /srv/www/bugzilla/editparams.cgi line 15.
For help, please send mail to this site's webmaster, giving this error message and the time and date of the error.
I've read that perhaps it is because Email::Send::SMTP::TLS requires Net::SSLeay package. So I proceed to try to install it using cpanm. However, cpanm fails with the following log:
23 *** Found OpenSSL-1.0.1f installed in /usr
24 *** Be sure to use the same compiler and options to compile your OpenSSL, perl,
25 and Net::SSLeay. Mixing and matching compilers is not supported.
26 Do you want to run external tests?
27 These tests *will* *fail* if you do not have network connectivity. [n] n
28 Checking if your kit is complete...
29 Looks good
30 Generating a Unix-style Makefile
31 Writing Makefile for Net::SSLeay
32 Writing MYMETA.yml and MYMETA.json
33 -> OK
34 Checking dependencies from MYMETA.json ...
35 Checking if you have Test::More 0.60_01 ... Yes (1.001014)
36 Checking if you have MIME::Base64 0 ... Yes (3.13)
37 Checking if you have ExtUtils::MakeMaker 0 ... Yes (7.10)
38 Building and testing Net-SSLeay-1.72
39 cp lib/Net/SSLeay.pm blib/lib/Net/SSLeay.pm
40 AutoSplitting blib/lib/Net/SSLeay.pm (blib/lib/auto/Net/SSLeay)
41 blib/lib/Net/SSLeay.pm: some names are not unique when truncated to 8 characters:
42 directory blib/lib/auto/Net/SSLeay:
43 do_https3.al, do_https2.al, do_https4.al, do_https.al truncate to do_https
44 do_httpx3.al, do_httpx2.al, do_httpx4.al truncate to do_httpx
45 get_https.al, get_https3.al, get_https4.al, get_http.al, get_http3.al, get_http4.al, get_httpx.al, get_httpx3.al, get_httpx4.al truncate to get_http
46 head_https.al, head_https3.al, head_https4.al, head_http.al, head_http3.al, head_http4.al, head_httpx.al, head_httpx3.al, head_httpx4.al truncate to head_htt
47 post_https.al, post_https3.al, post_https4.al, post_http.al, post_http3.al, post_http4.al, post_httpx.al, post_httpx3.al, post_httpx4.al truncate to post_htt
48 put_https.al, put_https3.al, put_https4.al, put_http.al, put_http3.al, put_http4.al, put_httpx.al, put_httpx3.al, put_httpx4.al truncate to put_http
49 ssl_read_all.al, ssl_read_until.al, ssl_read_CRLF.al truncate to ssl_read
50 ssl_write_all.al, ssl_write_CRLF.al truncate to ssl_writ
51 tcp_read_all.al, tcp_read_until.al, tcp_read_CRLF.al truncate to tcp_read
52 tcp_write_all.al, tcp_write_CRLF.al truncate to tcp_writ
53 cp lib/Net/SSLeay/Handle.pm blib/lib/Net/SSLeay/Handle.pm
54 cp lib/Net/SSLeay.pod blib/lib/Net/SSLeay.pod
55 Running Mkbootstrap for Net::SSLeay ()
56 chmod 644 "SSLeay.bs"
57 "/usr/bin/perl" "-Iinc" "/usr/share/perl/5.18/ExtUtils/xsubpp" -typemap "/usr/share/perl/5.18/ExtUtils/typemap" -typemap "typemap" SSLeay.xs > SSLeay.xsc && mv SSLeay.xsc SSL eay.c
58 cc -c -I/usr/include -D_REENTRANT -D_GNU_SOURCE -DDEBIAN -fstack-protector -fno-strict-aliasing -pipe -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -O2 -g -DVERSION=\"1.72\" -DXS_VERSION=\"1.72\" -fPIC "-I/usr/lib/perl/5.18/CORE" SSLeay.c
59 {standard input}: Assembler messages:
60 {standard input}: Error: open CFI at the end of file; missing .cfi_endproc directive
61 cc: internal compiler error: Killed (program cc1)
62 Please submit a full bug report,
63 with preprocessed source if appropriate.
64 See <file:///usr/share/doc/gcc-4.8/README.Bugs> for instructions.
65 make: *** [SSLeay.o] Error 4
66 -> FAIL Installing Net::SSLeay failed. See /home/ubuntu/.cpanm/work/1443609644.32449/build.log for details. Retry with --force to force install it.
I do not know perl and cannot figure out why I'm getting errors left and right.
I read in many places that I can simply install all available packages using command like:
/usr/bin/perl install-module.pl --all
However, this command does not work for me. (I can't install any modules using CPAN at all, not sure why) It pretty much just does nothing for me. This is the output I get when execute install-module.pl:
ubuntu#ip-10-130-10-107:/srv/www/bugzilla$ sudo /usr/bin/perl install-module.pl --all
Checking for CPAN (v1.81) ok: found v2.10
Checking for YAML (any) ok: found v1.15
Checking for ExtUtils-MakeMaker (v6.31) ok: found v7.1
defined(#array) is deprecated at /usr/share/perl5/Chart/Base.pm line 181.
(Maybe you should just omit the defined()?)
defined(#array) is deprecated at /usr/share/perl5/Chart/Base.pm line 233.
(Maybe you should just omit the defined()?)
Reading '/home/ubuntu/.cpan/Metadata'
Fetching with LWP:
http://cpan.mirror.vexxhost.com/authors/01mailrc.txt.gz
Reading '/home/ubuntu/.cpan/source/authors/01mailrc.txt.gz'
............................................................................DONE
Fetching with LWP:
http://cpan.mirror.vexxhost.com/modules/02packages.details.txt.gz
Reading '/home/ubuntu/.cpan/source/modules/02packages.details.txt.gz'
Database was generated on Wed, 30 Sep 2015 09:53:42 GMT
..........ubuntu#ip-10-130-10-107:/srv/www/bugzilla$
I'm not sure why things just don't work for me. Do I have a faulty perl installation or what? Can some perl guru please help?
Thanks!
Solved the issue by killing my Bugzilla installation (5.0.1) and completely re-install an older version (4.4.10). Things just worked with the previous version.
I fought with the same problem, with Bugzilla 5, for half a day. I did not have any success getting STARTTLS to work, which is odd, because it's the standard way to send email these days. I finally gave up and activated SMTPS (port 465) on my Postfix server. It was very easy to do this, and once I did it, Bugzilla could send emails easily. If you have control over the mail server, this is an easier approach because life is too short to spend it reading through perl code. Edit: all these years later, STARTTLS still doesn't work on Bugzilla. I tried installing libnet-smtp-tls-butmaintained-perl which some suggested, but that didn't help. For those finding this post, give up and use smtps.
I have a Netgear ReadyNAS NV+ on which I'm trying to do some things using perl.
Since the perl installation from the vendor is compiled without the uselargefiles-flag I've tried to compile/install my own version to run in parallell with the system one.
When I first tried to compile perl on the machine itself I ran into trouble as the system is lacking alot of regular system tools which prevents the Configure-script from running properly.
# ./Configure -des -Dprefix=$HOME/perl-5.16.2
First let's make sure your kit is complete. Checking...
./Configure: line 1986: split: command not found
cat: /root/dload/perl-5.16.2/UU/x??: No such file or directory
Locating common programs...
I don't know where 'comm' is, and my life depends on it.
Go find a public domain implementation or fix your PATH setting!
To get around that I installed and used this cross-compiler to build perl on another machine.
I could not figure out how to cross-compile using the standard configure-script from perl, so I used this.
After that I could just copy my new perl-folder onto the NAS and have thing like the following work:
# ~/sparc-perl-5.16.2/bin/perl -version
This is perl 5, version 16, subversion 2 (v5.16.2) built for sparc-linux
Copyright 1987-2012, Larry Wall
Perl may be copied only under the terms of either the Artistic License or the
GNU General Public License, which may be found in the Perl 5 source kit.
Complete documentation for Perl, including FAQ lists, should be found on
this system using "man perl" or "perldoc perl". If you have access to the
Internet, point your browser at http://www.perl.org/, the Perl Home Page.
# ~/sparc-perl-5.16.2/bin/perl -e 'print "A string!\n";'
A string!
So in some sense I feel I've been successful in my quest to get "my" perl working on the machine.
I get in trouble when I try to install extra modules though.
I've tried installing Image::ExifTool using cpanp (among others), but the installation never finishes.
Today I resorted to trying the installation manually.
wget http://search.cpan.org/CPAN/authors/id/E/EX/EXIFTOOL/Image-ExifTool-9.12.tar.gz
tar xzf Image-ExifTool-9.12.tar.gz
cd Image-ExifTool-9.12
~/sparc-perl-5.16.2/bin/perl Makefile.pl
make
All work as they're supposed to.
when I get to make test however it hangs indefinitely like so:
# make test
PERL_DL_NONLAZY=1 /root/sparc-perl-5.16.2/bin/perl "-MExtUtils::Command::MM" "-e" "test_harness(0, 'blib/lib', 'blib/arch')" t/*.t t/AFCP.t ...........
Looking at the running processes I think these are the ones representing the command:
# ps aux | grep per[l]
root 26187 0.5 0.7 12000 7808 pts/0 S+ 10:31 0:07 /root/sparc-perl-5.16.2/bin/perl -MExtUtils::Command::MM -e test_harness(0, 'blib/lib', 'blib/arch') t/AFCP.t t/AIFF.t t/APE.t t/ASF.t t/BigTIFF.t t/BMP.t t/CanonRaw.t t/Canon.t t/CanonVRD.t t/Casio.t t/DICOM.t t/DjVu.t t/DNG.t t/DV.t t/EXE.t t/ExifTool.t t/FLAC.t t/FlashPix.t t/Flash.t t/Font.t t/FotoStation.t t/FujiFilm.t t/Geotag.t t/GeoTiff.t t/GE.t t/GIF.t t/GIMP.t t/GPS.t t/HTML.t t/InDesign.t t/IPTC.t t/ITC.t t/Jpeg2000.t t/JVC.t t/Kodak.t t/KyoceraRaw.t t/Lang.t t/LNK.t t/M2TS.t t/Matroska.t t/MIE.t t/MIFF.t t/Minolta.t t/MP3.t t/MWG.t t/MXF.t t/Nikon.t t/Olympus.t t/OpenEXR.t t/Panasonic.t t/PDF.t t/Pentax.t t/PGF.t t/PhotoCD.t t/PhotoMechanic.t t/Photoshop.t t/PICT.t t/PNG.t t/PostScript.t t/PPM.t t/PSP.t t/QuickTime.t t/Radiance.t t/Real.t t/Ricoh.t t/RIFF.t t/RTF.t t/Sanyo.t t/Sigma.t t/Sony.t t/Unknown.t t/Vorbis.t t/Writer.t t/XMP.t t/ZIP.t
root 26189 1.7 0.0 0 0 pts/0 Z+ 10:31 0:24 [perl] <defunct>
This is completely consistent with what happens when I try the same installation using cpanp.
I guess I could just run make install and hope that it won't be to much of a problem that the test is unable to run/complete, but that makes me feel a bit uneasy. I'd much rather figure out what is wrong.
I also find it odd that the test hangs the way it does, I could accept that it fails, but that it just keeps running in a non-productive manner feels weird.
Since it is the first time I've built perl from source and the first time I've used a cross-compiler I would not be surprised to learn I've done something very wrong, any help identifying what is very welcome.
What am I doing wrong?
EDIT - compiling on the mahcine:
Figured out how to get the Configure script working natively on the machine.
Will try to build there to see if that will work better. It'll take some time though, the machine is slow.
To be able to run the configure script I needed:
GCC
apt-get install libc6-dev gcc gdb libtag1-dev uuid-dev
coreutils
apt-get install coreutils
-Dcc=gcc
./Configure -des -Dprefix=$HOME/perl-5.16.2 -Dcc=gcc
EDIT2 - compile failed:
Most shortlived success ever:
# make
`sh cflags "optimize='-O2'" perlmini.o` -DPERL_IS_MINIPERL -DPERL_EXTERNAL_GLOB perlmini.c
CCCMD = gcc -DPERL_CORE -c -fno-strict-aliasing -pipe -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -O2 -Wall
In file included from perl.c:33:
perl.h:699: error: conflicting types for `syscall'
/usr/include/unistd.h:939: error: previous declaration of `syscall'
ake: *** [perlmini.o] Error 1
EDIT3 - testdriving fork:
Tried the following to verify that fork works as it should. I believe that the test is successful, but I've never tried fork before, so please let me know if I read the output wrong.
# cat test_forkwait.px
#!/root/sparc-perl-5.16.2/bin/perl
$pid = fork();
die if $pid < 0;
$SIG{CHLD} = sub { warn "SIGCHLD\n"; };
if($pid) {
$status = waitpid($pid, 0);
warn "wait status: $status\n";
} else {
warn "Child starting\n";
sleep 1;
warn "Child terminating\n";
}
# ./test_forkwait.px
Child starting
Child terminating
SIGCHLD
wait status: 29913
I'm a bit late with this comment, and don't have any ideas about your "make test" hang, but I wanted to point out the Image::ExifTool is pure Perl, so it does not require compilation. The install step is as simple as copying the distribution files to the proper directories.
Phil
Gave up on figuring out why the test fails. Ended up using the module anyways. Seems to work OK with my files.