1

I'm trying to compile curl with openssl support and though I've tried for hours I still cannot figure out what I'm doing wrong.
Here's what I did:

  1. compile openssl like this: cd /usr/local/install/openssl-1.0.2a
    ./config make make install

  2. try to compile curl

    cd /usr/local/install/curl-7.42.1 ./configure --with-ssl=/usr/local/ssl/ make

and I get this error:

/usr/bin/ld: /usr/local/ssl/lib/libssl.a(s2_clnt.o): relocation R_X86_64_32 against '.rodata' can not be used when making a shared object; recompile with -fPIC
/usr/local/ssl/lib/libssl.a: could not read symbols: Bad value

collect2: error: ld returned 1 exit status

7
  • 5
    Compiling curl seems to be the first thing you're doing wrong. Jun 4, 2015 at 18:39
  • 1
    Please explain what operating system is this, why can't use the pre-compiled packages (which already have openssl support, e.g ldd $(which curl) | grep ssl) and what business or professional requirement do you have for a custom compilation.
    – dawud
    Jun 4, 2015 at 20:20
  • 1
    @MichaelHampton why is that, could you please explain?
    – Alex Flo
    Jun 8, 2015 at 5:49
  • @dawud it is a Debian 6.0. I've been using the pre-compiled packages until now but when trying to connect to some HTTPs URLs I received errors. There wasn't (or I couldn't find) any newer curl version for this Debian and I needed to compile a curl with a newer version of openssl so I can make it work.
    – Alex Flo
    Jun 8, 2015 at 5:58
  • If you're getting https errors, why are you trying to upgrade curl? Jun 8, 2015 at 6:31

1 Answer 1

0

I finally found a way to compile curl, this is what worked for me:
openssl:

./config -fPIC no-gost no-shared no-zlib
make depend
make
make install 

curl:

./configure  --with-ssl=/usr/local/ssl
make 
make install  

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .