Net::SSLeay won't install - perl

cpan Net::SSLeay
Running install for module 'Net::SSLeay'
Running make for M/MI/MIKEM/Net-SSLeay-1.55.tar.gz
Has already been unwrapped into directory /root/.cpan/build/Net-SSLeay-1.55-v9rgJp
Could not make: Unknown error
Running make test
Can't test without successful make
Running make install
Make had returned bad status, install seems impossible
I have installed all libs of this post:
install perl module Net::SSLeay through cpan
I also tryed to install it manually and during make command I had this log:
SSLeay.c:8143: error: declaration for parameter ‘XS_Net__SSLeay_BIO_write’ but no such parameter
SSLeay.c:8110: error: declaration for parameter ‘XS_Net__SSLeay_BIO_read’ but no such parameter
SSLeay.c:8091: error: declaration for parameter ‘XS_Net__SSLeay_BIO_free’ but no such parameter
SSLeay.c:8072: error: declaration for parameter ‘XS_Net__SSLeay_BIO_new’ but no such parameter
SSLeay.c:8053: error: declaration for parameter ‘XS_Net__SSLeay_BIO_new_ssl_connect’ but no such parameter
SSLeay.c:8032: error: declaration for parameter ‘XS_Net__SSLeay_BIO_new_ssl’ but no such parameter
SSLeay.c:8011: error: declaration for parameter ‘XS_Net__SSLeay_BIO_new_file’ but no such parameter
SSLeay.c:7992: error: declaration for parameter ‘XS_Net__SSLeay_BIO_new_buffer_ssl_connect’ but no such parameter
SSLeay.c:7972: error: declaration for parameter ‘XS_Net__SSLeay_get_ssl_method’ but no such parameter
SSLeay.c:7926: error: declaration for parameter ‘XS_Net__SSLeay_set_ssl_method’ but no such parameter
SSLeay.c:7864: error: declaration for parameter ‘XS_Net__SSLeay_TLSv1_method’ but no such parameter
SSLeay.c:1189: error: declaration for parameter ‘XS_Net__SSLeay_constant’ but no such parameter
SSLeay.c:1167: error: declaration for parameter ‘XS_Net__SSLeay_CLONE’ but no such parameter
SSLeay.c:1123: error: declaration for parameter ‘S_croak_xs_usage’ but no such parameter
SSLeay.xs:422: error: declaration for parameter ‘simple_cb_data_t’ but no such parameter
SSLeay.xs:359: error: declaration for parameter ‘perl_filehandle_t’ but no such parameter
SSLeay.c:13975: error: expected ‘{’ at end of input
make: *** [SSLeay.o] Error 1

Some CPAN modules require the C-header files to compile successfully. They end with -dev. These are not normally package with the OS. For Net::SSLeay you'll need to install libssl-dev.
For Debian distros: sudo apt-get install libssl-dev

Related

FIWARE- Orion Context Broker

I tried to install Orion context Broker on Ubuntu 14.04 with Alien but when I do contextBroker start it says:
contextBroker: error while loading shared libraries: libboost_thread-mt.so.5: cannot open shared object file: No such file or directory
I couldn't find where is the error then I tried to install with all the dependencies from the instructions in Git, but when I try to do the make it makes an error:
[ 26%] Building CXX object src/lib/serviceRoutines/CMakeFiles/serviceRoutines.dir/exitTreat.cpp.o
In file included from /home/sistemas/fiware-orion-develop/src/lib/serviceRoutines/exitTreat.cpp:32:0:
/home/sistemas/fiware-orion-develop/src/lib/mongoBackend/MongoGlobal.h:30:35: fatal error: mongo/client/dbclient.h: No existe el archivo o el directorio
#include "mongo/client/dbclient.h"
I have the mongo's driver installed, how can I solve this?
Finally I compile a new driver from https://github.com/mongodb/mongo-cxx-driver/releases and it continues compiling until:
*
/home/sistemas/fiware-orion/src/lib/mongoBackend/MongoGlobal.cpp: In function ‘void recoverOnTimeIntervalThread(std::string, mongo::BSONObj&)’:
/home/sistemas/fiware-orion/src/lib/mongoBackend/MongoGlobal.cpp:532:40: error: ‘class mongo::OID’ has no member named ‘str’
std::string subId = idField.OID().str();
^
/home/sistemas/fiware-orion/src/lib/mongoBackend/MongoGlobal.cpp: In function ‘void destroyOnTimeIntervalThread(std::string, mongo::BSONObj&)’:
/home/sistemas/fiware-orion/src/lib/mongoBackend/MongoGlobal.cpp:583:40: error: ‘class mongo::OID’ has no member named ‘str’
std::string subId = idField.OID().str();
^
/home/sistemas/fiware-orion/src/lib/mongoBackend/MongoGlobal.cpp: In function ‘void releaseTriggeredSubscriptions(std::map<std::basic_string<char>, TriggeredSubscription*>&)’:
/home/sistemas/fiware-orion/src/lib/mongoBackend/MongoGlobal.cpp:1911:17: error: ‘string’ was not declared in this scope
for (std::map<string, TriggeredSubscription*>::iterator it = subs.begin(); it != subs.end(); ++it)
^
/home/sistemas/fiware-orion/src/lib/mongoBackend/MongoGlobal.cpp:1911:17: note: suggested alternative:
In file included from /usr/include/c++/4.9/iosfwd:39:0,
from /usr/include/boost/smart_ptr/shared_ptr.hpp:49,
from /usr/include/boost/shared_ptr.hpp:17,
from /usr/include/mongo/client/dbclient_rs.h:20,
from /usr/include/mongo/client/dbclient.h:59,
from /home/sistemas/fiware-orion/src/lib/mongoBackend/MongoGlobal.cpp:27:
/usr/include/c++/4.9/bits/stringfwd.h:62:33: note: ‘std::string’
typedef basic_string<char> string;
^
/home/sistemas/fiware-orion/src/lib/mongoBackend/MongoGlobal.cpp:1911:47: error: template argument 1 is invalid
for (std::map<string, TriggeredSubscription*>::iterator it = subs.begin(); it != subs.end(); ++it)
^
/home/sistemas/fiware-orion/src/lib/mongoBackend/MongoGlobal.cpp:1911:47: error: template argument 3 is invalid
/home/sistemas/fiware-orion/src/lib/mongoBackend/MongoGlobal.cpp:1911:47: error: template argument 4 is invalid
/home/sistemas/fiware-orion/src/lib/mongoBackend/MongoGlobal.cpp:1911:59: error: invalid type in declaration before ‘it’
for (std::map<string, TriggeredSubscription*>::iterator it = subs.begin(); it != subs.end(); ++it)
^
/home/sistemas/fiware-orion/src/lib/mongoBackend/MongoGlobal.cpp:1911:59: error: expected ‘;’ before ‘it’
/home/sistemas/fiware-orion/src/lib/mongoBackend/MongoGlobal.cpp:1911:59: error: ‘it’ was not declared in this scope
/home/sistemas/fiware-orion/src/lib/mongoBackend/MongoGlobal.cpp:1911:94: error: expected ‘)’ before ‘;’ token
for (std::map<string, TriggeredSubscription*>::iterator it = subs.begin(); it != subs.end(); ++it)
/home/sistemas/fiware-orion/src/lib/mongoBackend/MongoGlobal.cpp:1911:50: error: unused variable ‘iterator’ [-Werror=unused-variable]
for (std::map<string, TriggeredSubscription*>::iterator it = subs.begin(); it != subs.end(); ++it)
^
/home/sistemas/fiware-orion/src/lib/mongoBackend/MongoGlobal.cpp:1911:98: error: ‘it’ was not declared in this scope
for (std::map<string, TriggeredSubscription*>::iterator it = subs.begin(); it != subs.end(); ++it)
^
cc1plus: all warnings being treated as errors
make[3]: *** [src/lib/mongoBackend/CMakeFiles/mongoBackend.dir/MongoGlobal.cpp.o] Error 1
make[3]: se sale del directorio «/home/sistemas/fiware-orion/BUILD_RELEASE»
make[2]: *** [src/lib/mongoBackend/CMakeFiles/mongoBackend.dir/all] Error 2
make[2]: *** Se espera a que terminen otras tareas....
[ 88%] Building CXX object src/lib/xmlParse/CMakeFiles/xmlParse.dir/xmlRegisterProviderRequest.cpp.o
*
Is a problem in a file of Orion Context Broker?
I think that it could be a problem with de mongo's driver again but I try to install another one older and it doesn't work. I also think it can be a problem with de -mt libraries that doesn't exist in boost anymore, but nothing that I try until now works.
I've installed Orion CB using Ubuntu 14.04 LTS as host. I've also found some problems with libboost_thread-mt.so libraries. Solved this way:
Get & install packages
boost-thread-1.41.0-25.el6.x86_64.rpm
boost-system-1.41.0-25.el6.x86_64.rpm
boost-filesystem-1.41.0-25.el6.x86_64.rpm
and install them using alien. Then, the libraries were installed in “/usr/lib64” folder. To correct this (and CB is able to locate them): create a .conf file within “/etc/ld.so.conf.d/”, add a line (“/usr/lib64”) within and save it and quit and reload your configuration by calling (“sudo ldconfig”)
Hope this helps
So, here we have two questions in one. Let's start with the first one, about shared library not found:
Ask the broker where the library should be, using "ldd $(which contextBroker) | grep boost_thread).
After running this command, make sure the library is there. If it is not, but you have it elsewhere, you should be able to use the env var LD_LIBRARY_PATH to point to the directory where the library is found.
Now, for the second question, the mongo driver includes are not found. In my machine, I have them in /usr/local/include/mongo => I'm ok with the -I/usr/local/include directive to the compiler.
If you have your mongo driver installed elsewhere, you might need to add another 'include-directory' for the compilation. This would be done in the top-level CMakeLists.txt (I guess using 'include_directories' - I'm far from a cmake expert :-)).
When building, to see detailed information, compile like this:
% CPU_COUNT=1 VERBOSE=1 make install
Post the info again here unless you manage to solve your problems.

install opencv for perl (centos)

I'm trying to do face detection on perl, and I found out about OpenCV and the perl module Image::ObjectDetect on CPAN here and here. I've done a clean install of CentOS 6.5 (minimal) on a virtual machine to test this, and then:
yum -y update
yum -y install perl cpan opencv
Ok, and considering I never user cpan before, I tried the obvious (after some short google searches)
perl -MCPAN -e shell
[accept default]
install Image::ObjectDetect
that gave me some errors:
Package opencv was not found in the pkg-config search path.
Perhaps you should add the directory containing `opencv.pc'
to the PKG_CONFIG_PATH environment variable
No package 'opencv' found
After googling about that error, I did:
export PKG_CONFIG_PATH=/usr/local/lib/pkgconfig
mkdir /usr/local/lib/pkgconfig
vi /usr/local/lib/pkgconfig/opencv.pc
the content of the file:
prefix=/usr
exec_prefix=${prefix}
includedir=${prefix}/include
libdir=${exec_prefix}/lib
Name: opencv
Description: The opencv library
Version: 2.x.x
Cflags: -I${includedir}/opencv -I${includedir}/opencv2
Libs: -L${libdir} -lopencv_calib3d -lopencv_imgproc -lopencv_contrib -lopencv_legacy -l
After I ran the install again, I noticed I was missing gcc:
/bin/sh: gcc: command not found
yum -y install gcc
Running the install again now gives me:
...
Note (probably harmless): No library found for -lopencv_calib3d
Note (probably harmless): No library found for -lopencv_imgproc
Note (probably harmless): No library found for -lopencv_contrib
Note (probably harmless): No library found for -lopencv_legacy
Note (probably harmless): No library found for -l
Writing Makefile for Image::ObjectDetect
Could not read '/root/.cpan/build/Image-ObjectDetect-0.12-BsNNjF/META.yml'. Falling back to other methods to determine prerequisites
cp lib/Image/ObjectDetect.pm blib/lib/Image/ObjectDetect.pm
cp lib/Image/ObjectDetect.xs blib/lib/Image/ObjectDetect.xs
/usr/bin/perl /usr/share/perl5/ExtUtils/xsubpp -typemap /usr/share/perl5/ExtUtils/typemap ObjectDetect.xs > ObjectDetect.xsc && mv ObjectDetect.xsc ObjectDetect.c
gcc -c -I/usr/include/opencv -I/usr/include/opencv2 -Isrc -I/usr/include/opencv -I/usr/include/opencv2 -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m32 -march=i686 -mtune=atom -fasynchronous-unwind-tables -DVERSION=\"0.12\" -DXS_VERSION=\"0.12\" -fPIC "-I/usr/lib/perl5/CORE" ObjectDetect.c
In file included from ObjectDetect.xs:7:
/usr/lib/perl5/CORE/cv.h:13: error: redefinition of ‘struct xpvcv’
/usr/lib/perl5/CORE/cv.h:94: error: conflicting types for ‘xpvcv_allocated’
/usr/lib/perl5/CORE/cv.h:94: note: previous declaration of ‘xpvcv_allocated’ was here
ObjectDetect.xs:8:21: error: highgui.h: No such file or directory
ObjectDetect.xs: In function ‘XS_Image__ObjectDetect_new’:
ObjectDetect.xs:19: error: ‘CvHaarClassifierCascade’ undeclared (first use in this function)
ObjectDetect.xs:19: error: (Each undeclared identifier is reported only once
ObjectDetect.xs:19: error: for each function it appears in.)
ObjectDetect.xs:19: error: ‘cascade’ undeclared (first use in this function)
ObjectDetect.xs:22: warning: implicit declaration of function ‘cvLoad’
ObjectDetect.xs: In function ‘XS_Image__ObjectDetect_xs_detect’:
ObjectDetect.xs:37: error: ‘IplImage’ undeclared (first use in this function)
ObjectDetect.xs:37: error: ‘img’ undeclared (first use in this function)
ObjectDetect.xs:37: error: ‘gray’ undeclared (first use in this function)
ObjectDetect.xs:37: warning: left-hand operand of comma expression has no effect
ObjectDetect.xs:39: error: ‘CvMemStorage’ undeclared (first use in this function)
ObjectDetect.xs:39: error: ‘storage’ undeclared (first use in this function)
ObjectDetect.xs:40: error: ‘CvHaarClassifierCascade’ undeclared (first use in this function)
ObjectDetect.xs:40: error: ‘cascade’ undeclared (first use in this function)
ObjectDetect.xs:41: error: ‘CvSeq’ undeclared (first use in this function)
ObjectDetect.xs:41: error: ‘objects’ undeclared (first use in this function)
ObjectDetect.xs:42: error: ‘CvRect’ undeclared (first use in this function)
ObjectDetect.xs:42: error: ‘rect’ undeclared (first use in this function)
ObjectDetect.xs:46: warning: implicit declaration of function ‘cvLoadImage’
ObjectDetect.xs:50: warning: implicit declaration of function ‘cvCreateImage’
ObjectDetect.xs:50: warning: implicit declaration of function ‘cvSize’
ObjectDetect.xs:51: warning: implicit declaration of function ‘cvCvtColor’
ObjectDetect.xs:51: error: ‘CV_BGR2GRAY’ undeclared (first use in this function)
ObjectDetect.xs:52: warning: implicit declaration of function ‘cvEqualizeHist’
ObjectDetect.xs:54: warning: implicit declaration of function ‘cvCreateMemStorage’
ObjectDetect.xs:55: error: expected expression before ‘)’ token
ObjectDetect.xs:56: warning: implicit declaration of function ‘cvHaarDetectObjects’
ObjectDetect.xs:58: error: ‘CV_HAAR_DO_CANNY_PRUNING’ undeclared (first use in this function)
ObjectDetect.xs:65: error: expected expression before ‘)’ token
ObjectDetect.xs:74: warning: implicit declaration of function ‘cvReleaseMemStorage’
ObjectDetect.xs:75: warning: implicit declaration of function ‘cvReleaseImage’
ObjectDetect.xs: In function ‘XS_Image__ObjectDetect_DESTROY’:
ObjectDetect.xs:86: error: ‘CvHaarClassifierCascade’ undeclared (first use in this function)
ObjectDetect.xs:86: error: ‘cascade’ undeclared (first use in this function)
ObjectDetect.xs:88: error: expected expression before ‘)’ token
ObjectDetect.xs:89: warning: implicit declaration of function ‘cvReleaseHaarClassifierCascade’
make: *** [ObjectDetect.o] Error 1
JIRO/Image-ObjectDetect-0.12.tar.gz
/usr/bin/make -- NOT OK
Warning (usually harmless): 'YAML' not installed, will not store persistent state
Running make test
Can't test without successful make
Running make install
Make had returned bad status, install seems impossible
Failed during this command:
JIRO/Image-ObjectDetect-0.12.tar.gz : make NO
Any help? Thanks.
Glad to see someone using OpenCV with Perl! I hope you can get it working and show us some nice asps and scripts :-)
You seem to be building from source and installing packages (with yum) - this sometimes complicates matters when it comes to dependencies. For example, you may have a version of OpenCV that is too new for the CPAN module. Image::ObjectDetect` is fairly old
(the last release was several years ago http://metacpan.org/pod/Image::ObjectDetect) whereas OpenCV is being actively developed.
Note this line:
ObjectDetect.xs:8:21: error: highgui.h: No such file or directory
I came across a similar error compiling applications that depend on OpenCV after a recent update. Either the header files were missing; the applications Makefiles did not know how to locate them; or other development libraries and headers in the chain of dependencies needed updating as well.
You may get better luck solving this by posting to the OpenCV development list where the error message may look more familiar.
See: http://groups.yahoo.com/neo/groups/OpenCV/info
You could try installing some other modules to see if it is perl, XS, gcc or your version of OpenCV that is at fault. Here's another module that uses OpenCV:
https://github.com/shisful/Image-OpenCV

Perl Cross Compilation: MAKE

I've been trying to Cross Compile Perl-5.14.2 for NetBSD target from Linux machine.
Configure script successfully invoked with following options,
./Configure -des -Dusecrosscompile
-Dtargetarch=netbsd
-Dosvers=3.0.0
-Dtargethost=10.184.22.48
-Dtargetuser=username
-Dusrinc=.../sb1-mips/usr/include
-Dlibpth=.../xc-sb1-mips/netbsd/Lib/lib
-Dcc=.../mips64-netbsdelf-gcc
Once after Configured, make wasn't successful.
It breaks at different places right from creating miniperlmain.o file.
For example following error occurred while generating gv.o file:
gv.c: In function `Perl_try_amagic_un':
gv.c:2018: error: void value not ignored as it ought to be
gv.c:2029: error: void value not ignored as it ought to be
gv.c:2029: warning: cast from pointer to integer of different size
gv.c: In function `Perl_try_amagic_bin':
gv.c:2061: error: void value not ignored as it ought to be
gv.c:2063: error: void value not ignored as it ought to be
make: *** [gv.o] Error 1
Now to get rid of these errors I've passed two flags namely -DPERL_IMPLICIT_CONTEXT and -DPERL_GCC_BRACE_GROUPS_FORBIDDEN to C Compiler CCFLAGS which solved the problem.
Since it is a custom build, want to know about all of the CCFLAGS that have to be passed in order to achieve a successful build?
What does each flag mean?
Is their any documentation available?
Use vagrant. It has some OpenBSD and FreeBSD images. Hopefuly those will be compatible with NetBSD.
You can get a build environment very fast with that. Then you can transfer and build your code happily :)

Perl IPTables Module Installation Error

I've been trying to install the IPTables module for perl http://metacpan.org/pod/IPTables::IPv4 and I've been running into errors during installation.
I've tried installing using the CPAN in shell as well as downloading the tarball form the link above. Both installation give me errors. I am not sure how to get the dump from CPAN but what I can get is a dump of my shell when I run the MAKE file from the tarball:
[root#localhost IPTables-IPv4-0.98]# make
make -C libiptc/ all
make[1]: Entering directory `/home/student/Downloads/IPTables-IPv4-0.98/libiptc'
gcc -o libip6tc.o -c libip6tc.c -I../include -I/usr/src/linux/include -DIPTABLES_VERSION=\"1.2.8\" -O2 -Wall
In file included from libip6tc.c:111:0:
libiptc.c: In function ‘ip6tc_init’:
libiptc.c:312:10: warning: pointer targets in passing argument 5 of ‘getsockopt’ differ in signedness
/usr/include/sys/socket.h:190:12: note: expected ‘socklen_t * __restrict__’ but argument is of type ‘int *’
libiptc.c: In function ‘target_name’:
libiptc.c:727:2: warning: dereferencing type-punned pointer will break strict-aliasing rules
libip6tc.c: In function ‘ipv6_prefix_length’:
libip6tc.c:121:7: error: ‘const struct in6_addr’ has no member named ‘in6_u’
libip6tc.c:125:7: error: ‘const struct in6_addr’ has no member named ‘in6_u’
libip6tc.c: In function ‘dump_entry’:
libip6tc.c:201:3: warning: dereferencing type-punned pointer will break strict-aliasing rules
make[1]: *** [libip6tc.o] Error 1
make[1]: Leaving directory `/home/student/Downloads/IPTables-IPv4-0.98/libiptc'
make: *** [libiptc/libiptc.a] Error 2
[root#localhost IPTables-IPv4-0.98]#
I would like to know what do I need to do so that I can install the module. Are there some dependencies that I need to install?
Your help is greatly appreciated.
The cpanratings and CPAN testers reports for this module make me think that you're wasting your time here.

How do I use the BLAS library provided by MATLAB?

I have noticed that MATLAB provides the BLAS and LAPACK headers among others:
$ ls ${MATLAB_DIR}/extern/include/
blas.h engine.h lapack.h mat.h mclmcr.h mex.h mwutil.h
blascompat32.h fintrf.h libmatlbm.mlib matrix.h mclmcrrt.h mwdebug.h tmwtypes.h
emlrt.h io64.h libmatlbmx.mlib mclcppclass.h mcr.h mwservices.h
I would like to use them for my compiled code, so I tried to compile the following:
ex_blas.c
#include <blas.h>
int main()
{
return 0;
}
with the following command:
$ mex ex_blas.c
But this returns an error:
In file included from ex_blas.c:1:
/Applications/MATLAB_R2009b.app/extern/include/blas.h:51: error: syntax error before ‘*’ token
/Applications/MATLAB_R2009b.app/extern/include/blas.h:62: error: syntax error before ‘*’ token
/Applications/MATLAB_R2009b.app/extern/include/blas.h:77: error: syntax error before ‘*’ token
/Applications/MATLAB_R2009b.app/extern/include/blas.h:92: error: syntax error before ‘*’ token
/Applications/MATLAB_R2009b.app/extern/include/blas.h:103: error: syntax error before ‘ptrdiff_t’
/Applications/MATLAB_R2009b.app/extern/include/blas.h:122: error: syntax error before ‘ptrdiff_t’
Is the blas.h provided by MATLAB usable by a 3rd party application outside of MATLAB? If yes, what is causing the error above?
I'm not sure if it will completely resolve your problems, but you may also have to include stddef.h since that is where the ptrdiff_t type is defined.