Linux - SoftwareThis forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I'm having a trouble compiling perl module NET-SSLeay. I've openssl already configured with -fPIC. Below is the error I got from my 64bit CentOS architecture
Code:
[root@qmail Net-SSLeay-1.36]# perl Makefile.PL
Cannot determine perl version info from lib/Net/SSLeay.pm
Cannot determine license info from lib/Net/SSLeay.pm
*** Found OpenSSL-0.9.8r installed in /usr/local/ssl
*** Be sure to use the same compiler and options to compile your OpenSSL, perl,
and Net::SSLeay. Mixing and matching compilers is not supported.
Do you want to run external tests?
These tests *will* *fail* if you do not have network connectivity. [n]
Writing Makefile for Net::SSLeay
Writing MYMETA.yml
[root@qmail Net-SSLeay-1.36]# make
Skip blib/lib/Net/SSLeay.pm (unchanged)
Skip blib/lib/Net/SSLeay/Handle.pm (unchanged)
cc -c -I/usr/local/ssl/include -I/usr/local/ssl/inc32 -I/usr/kerberos/include -fno-strict-aliasing -pipe -fstack-protector -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -O2 -g -DVERSION=\"1.36\" -DXS_VERSION=\"1.36\" -fPIC "-I/usr/local/lib/perl5/5.14.1/x86_64-linux/CORE" SSLeay.c
Running Mkbootstrap for Net::SSLeay ()
chmod 644 SSLeay.bs
rm -f blib/arch/auto/Net/SSLeay/SSLeay.so
LD_RUN_PATH="/usr/lib" cc -shared -O2 -L/usr/local/lib -fstack-protector SSLeay.o -o blib/arch/auto/Net/SSLeay/SSLeay.so \
-L/usr/local/ssl -L/usr/local/ssl/lib -lssl -lcrypto -lz \
/usr/bin/ld: /usr/local/ssl/lib/libcrypto.a(x86_64cpuid.o): relocation R_X86_64_PC32 against `OPENSSL_cpuid_setup' can not be used when making a shared object; recompile with -fPIC
/usr/bin/ld: final link failed: Bad value
collect2: ld returned 1 exit status
make: *** [blib/arch/auto/Net/SSLeay/SSLeay.so] Error 1
Can anyone recommend a solution for this or atleast give me a right direction? Your help will be very much appreciated.
Distribution: PCLinuxOS2023 Fedora38 + 50+ other Linux OS, for test only.
Posts: 17,511
Rep:
Why not do # yum install perl-Net-SSLeay
About openssl : It is quite unusual to have an extra openssl in /usr/local/.
Openssl is already installed. ( /lib64/libssl.so.0.9.8e etc.)
The command : 'rpm -qa | grep openssl' will show.
This means you only have the static libcrypto.a, libssl.a :
The shared libraries are required : libcrypto.so, libssl.so
→ → # yum install openssl-devel
I've already installed perl-Net-SSLeay from yum. But since the application I'm installing is from source, its also looking for perl modules generated from source. I've also installed openssl-devel but no luck.
Quote:
Originally Posted by knudfl
Why not do # yum install perl-Net-SSLeay
About openssl : It is quite unusual to have an extra openssl in /usr/local/.
Openssl is already installed. ( /lib64/libssl.so.0.9.8e etc.)
The command : 'rpm -qa | grep openssl' will show.
This means you only have the static libcrypto.a, libssl.a :
The shared libraries are required : libcrypto.so, libssl.so
→ → # yum install openssl-devel
export those variables and try again. If my syntax is right, it should turn off fPIC for your package and remove the dependency to OpenSSL fPIC objects.
Distribution: PCLinuxOS2023 Fedora38 + 50+ other Linux OS, for test only.
Posts: 17,511
Rep:
OK, ASSP. A new openssl is not required. Only a "local" perl-5.10.x.
Net-SSLeay-1.36 will build with no errors using the default 'CentOS 5'
openssl version. The openssl you have in /usr/local/ will not work.
Suggest : Start from scratch with Net-SSLeay-1.36 in a new directory.
Why are you typing # perl Makefile.PL ?
'perl' is /usr/bin/perl(5.8.8). I would expect $ /usr/local/bin/perl(5.10).
( Or whatever your location is for perl 5.10.x ).
And by the way: build commands are not to be run as root. Only 'make install'.
Other hints : The most perl modules can be installed with cpan.
Example : 1) su ; 2) /usr/local/bin/cpan ( The cpan from your perl 5.10 ).
3) cpan > install Text::Glob
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.