1

I'm trying to configure libircclient with OpenSSL but fails. Using MinGW msys:

X@X-PC /c/deps/libircclient
$ ./configure -enable-openssl
checking for g++... g++
checking whether the C++ compiler works... yes
checking for C++ compiler default output file name... a.exe
checking for suffix of executables... .exe
.......................etc etc
checking for CRYPTO_new_ex_data in -lcrypto... no
configure: error: OpenSSL not found

I have added those lines also but fails:

CPPFLAGS="-I/c/deps/openssl-1.0.1l/include
LDFLAGS="-L/c/deps/openssl-1.0.1l

And it results in:

checking For MinGW32... no
checking for CRYPTO_new_ex_data in -lcrypto... yes
checking for SSL_library_init in -lssl... no
configure: error: OpenSSL not found

so -lcrypto is ok, but -lssl... no

What is the problem and the solution ?


OpenSSL built from source using:

cd /c/deps/
tar xvfz openssl-1.0.1l.tar.gz
cd openssl-1.0.1l
./Configure no-zlib no-shared no-dso no-krb5 no-camellia no-capieng no-cast no-cms \
  no-dtls1 no-gost no-gmp no-heartbeats no-idea no-jpake no-md2 no-mdc2 no-rc5 \
  no-rdrand no-rfc3779 no-rsax no-sctp no-seed no-sha0 no-static_engine no-whirlpool \
  no-rc2 no-rc4 no-ssl2 no-ssl3 mingw64
make
jww
  • 97,681
  • 90
  • 411
  • 885
xoom
  • 63
  • 1
  • 9
  • `CPPFLAGS` is for the C preprocessor. Try `CFLAGS` and/or `CXXFLAGS` instead. – jww Mar 07 '16 at 00:20
  • You did not use `--openssldir` with OpenSSL's `Configure`. Where, exactly, does OpenSSL install on MinGW? Or maybe, what did you do after entering `make`? Also see [How to build OpenSSL with MinGW in WIndows?](http://stackoverflow.com/q/9379363). – jww Mar 07 '16 at 00:42

1 Answers1

0

Have you compiled OpenSSL by itself?

If you have I would double check that OpenSSL has compiled properly, and make sure that the lib is in the root openssl directory (not, for example, /c/deps/openssl-1.0.1l/lib).

Nick Taylor
  • 174
  • 7
  • i've built openssl from source, i have no /lib dir on the openssl dir. i've added the openssl compiling lines on the OP please have a look – xoom Mar 06 '16 at 17:08
  • I would try removing all of those no-something options in the ./configure, it looks like you're disabling some SSL libraries, but I am not sure which actually creates the SSL library itself. – Nick Taylor Mar 06 '16 at 18:41
  • i have compiled lots of programs that require -lcrypto & -lssl using this same openssl configurations without any problems. ill dig more and hope a new answer. PS : i have libcrypto.a and libssl.a in the openssl root – xoom Mar 06 '16 at 19:25
  • Now that is odd, one would assume that if it is finding one it would be able to find the other. The only thing I can think is that it checks for SSL_library_init and perhaps that is not in your particular version of libssl. Could you try running nm libssl.a in that directory and seeing if SSL_library_init is in the list of symbols? – Nick Taylor Mar 06 '16 at 21:27
  • yes, i got more than 2500 lines, and found SSL_library_init under ssl_algs.o:, ill compile an older openssl and test and share the results. – xoom Mar 06 '16 at 21:38