Find the answer to your Linux question:
Results 1 to 2 of 2
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 ...
  1. #1
    Linux Newbie
    Join Date
    Mar 2006
    Posts
    101

    recompile with -fPIC

    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.

  2. #2
    Linux Guru Rubberman's Avatar
    Join Date
    Apr 2009
    Location
    I can be found either 40 miles west of Chicago, or in a galaxy far, far away.
    Posts
    8,974
    The problem is probably in libcrypto.a or in the build line
    Code:
    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     \
    Sometimes, real fast is almost as good as real time.
    Just remember, Semper Gumbi - always be flexible!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
...