rakshasa / libtorrent

libTorrent BitTorrent library
http://rtorrent.net/downloads/
GNU General Public License v2.0
885 stars 209 forks source link

v0.13.7 recipe for target 'all-recursive' | 'diffie_hellman.lo' | 'all' failed #173

Closed mvegetto closed 6 years ago

mvegetto commented 6 years ago

cd /tmp git clone https://github.com/rakshasa/libtorrent.git cd libtorrent git checkout v0.13.7


./autogen.sh ./configure make make install

Makefile:422: recipe for target 'diffie_hellman.lo' failed make[3]: [diffie_hellman.lo] Error 1 make[3]: Leaving directory '/tmp/libtorrent/src/utils' Makefile:573: recipe for target 'all-recursive' failed make[2]: [all-recursive] Error 1 make[2]: Leaving directory '/tmp/libtorrent/src' Makefile:503: recipe for target 'all-recursive' failed make[1]: [all-recursive] Error 1 make[1]: Leaving directory '/tmp/libtorrent' Makefile:412: recipe for target 'all' failed make: [all] Error 2

mvegetto commented 6 years ago

Fixed by using the following code @ configure.ac

AC_ARG_ENABLE(openssl, [ --disable-openssl Don't use OpenSSL's SHA1 implementation.], [ if test "$enableval" = "yes"; then dnl move to scripts. PKG_CHECK_MODULES(OPENSSL, libcrypto, CXXFLAGS="$CXXFLAGS $OPENSSL_CFLAGS"; LIBS="$LIBS $OPENSSL_LIBS")

  AC_DEFINE(USE_OPENSSL, 1, Using OpenSSL.)
  AC_DEFINE(USE_OPENSSL_SHA, 1, Using OpenSSL's SHA1 implementation.)
  AC_CHECK_LIB([crypto], [DH_set0_pqg], [AC_DEFINE(USE_OPENSSL_1_1, 1, Using OpenSSL 1.1.)])

else
  AC_DEFINE(USE_NSS_SHA, 1, Using Mozilla's SHA1 implementation.)
fi

],[ PKG_CHECK_MODULES(OPENSSL, libcrypto, CXXFLAGS="$CXXFLAGS $OPENSSL_CFLAGS"; LIBS="$LIBS $OPENSSL_LIBS")

AC_DEFINE(USE_OPENSSL, 1, Using OpenSSL.)
AC_DEFINE(USE_OPENSSL_SHA, 1, Using OpenSSL's SHA1 implementation.)
AC_CHECK_LIB([crypto], [DH_set0_pqg], [AC_DEFINE(USE_OPENSSL_1_1, 1, Using OpenSSL 1.1.)])

] )

mvegetto commented 6 years ago

For diffie_hellman.lo I have used the following code:

https://raw.githubusercontent.com/exrat/rutorrent-bonobox/master/files/rutorrent/diffie_hellman.cc

kk140906 commented 5 years ago

good,thanks