I had a problem with this one: it was built successfully but when I
enabled tests, "make check" phase ate all my CPU and memory and after
several minutes of messing with my HDD, I got:

  g++: internal compiler error: Killed (program cc1plus)

(the backtrace is attached just in case)

I didn't report about it, as I think the problem is that I just have not
enough memory (3 GB), so I appreciate if someone tries to build
libtorrent with tests using this patch, thanks in advance.

>From 0fcf4b7368ce6f145a1cd45bd4b675145b5da4dc Mon Sep 17 00:00:00 2001
From: Alex Kost <[email protected]>
Date: Sat, 3 Oct 2015 22:21:33 +0300
Subject: [PATCH 2/3] gnu: libtorrent: Update to 0.13.6.

* gnu/packages/bittorrent.scm (libtorrent): Update to 0.13.6.
  [source]: Use new URL.
  [native-inputs]: Uncomment "cppunit" (for tests).
  [argument]: Remove (to enable tests).
---
 gnu/packages/bittorrent.scm | 14 ++++----------
 1 file changed, 4 insertions(+), 10 deletions(-)

diff --git a/gnu/packages/bittorrent.scm b/gnu/packages/bittorrent.scm
index c9b0fe2..fb40915 100644
--- a/gnu/packages/bittorrent.scm
+++ b/gnu/packages/bittorrent.scm
@@ -99,26 +99,20 @@ DHT, µTP, PEX and Magnet Links.")
 (define-public libtorrent
   (package
     (name "libtorrent")
-    (version "0.13.4")
+    (version "0.13.6")
     (source (origin
               (method url-fetch)
               (uri (string-append
-                    "http://libtorrent.rakshasa.no/downloads/libtorrent-";
+                    "http://rtorrent.net/downloads/libtorrent-";
                     version ".tar.gz"))
               (sha256
                (base32
-                "0ma910br5vxrfpm4f4w4942lpmhwvqjnnf9h8vpf52fw35qhjkkh"))))
+                "012s1nwcvz5m5r4d2z9klgy2n34kpgn9kgwgzxm97zgdjs6a0f18"))))
     (build-system gnu-build-system)
     (inputs `(("openssl" ,openssl)
               ("zlib" ,zlib)))
     (native-inputs `(("pkg-config" ,pkg-config)
-                     ;; Add this when you enable tests:
-                     ;; ("cppunit" ,cppunit)
-                     ))
-    (arguments
-     ;; FIXME: enable tests on the next release:
-     ;; https://github.com/rakshasa/libtorrent/issues/59
-     `(#:tests? #f))
+                     ("cppunit" ,cppunit)))
     (synopsis "BitTorrent library of rtorrent")
     (description
      "LibTorrent is a BitTorrent library used by and developed in parallel
-- 
2.5.0

...
Making check in test
make[1]: Entering directory 
'/tmp/nix-build-libtorrent-0.13.6.drv-0/libtorrent-0.13.6/test'
make  LibTorrentTest
make[2]: Entering directory 
'/tmp/nix-build-libtorrent-0.13.6.drv-0/libtorrent-0.13.6/test'
g++ -DHAVE_CONFIG_H -I. -I..  -I. -I.. -I../src -I/include 
-I/gnu/store/mbg8qp31g1bmvy1x399xivbm8vm3n7ad-cppunit-1.12.1/include -pthread 
-g -O2 -g -DDEBUG -fvisibility=hidden 
-I/gnu/store/p311lij4y6ali5l6rrli1nmcw73ksp5a-openssl-1.0.2d/include  -MT 
LibTorrentTest-main.o -MD -MP -MF .deps/LibTorrentTest-main.Tpo -c -o 
LibTorrentTest-main.o `test -f 'main.cc' || echo './'`main.cc
g++ -DHAVE_CONFIG_H -I. -I..  -I. -I.. -I../src -I/include 
-I/gnu/store/mbg8qp31g1bmvy1x399xivbm8vm3n7ad-cppunit-1.12.1/include -pthread 
-g -O2 -g -DDEBUG -fvisibility=hidden 
-I/gnu/store/p311lij4y6ali5l6rrli1nmcw73ksp5a-openssl-1.0.2d/include  -MT 
../src/LibTorrentTest-thread_disk.o -MD -MP -MF 
../src/.deps/LibTorrentTest-thread_disk.Tpo -c -o 
../src/LibTorrentTest-thread_disk.o `test -f '../src/thread_disk.cc' || echo 
'./'`../src/thread_disk.cc
g++ -DHAVE_CONFIG_H -I. -I..  -I. -I.. -I../src -I/include 
-I/gnu/store/mbg8qp31g1bmvy1x399xivbm8vm3n7ad-cppunit-1.12.1/include -pthread 
-g -O2 -g -DDEBUG -fvisibility=hidden 
-I/gnu/store/p311lij4y6ali5l6rrli1nmcw73ksp5a-openssl-1.0.2d/include  -MT 
rak/LibTorrentTest-allocators_test.o -MD -MP -MF 
rak/.deps/LibTorrentTest-allocators_test.Tpo -c -o 
rak/LibTorrentTest-allocators_test.o `test -f 'rak/allocators_test.cc' || echo 
'./'`rak/allocators_test.cc
mv -f ../src/.deps/LibTorrentTest-thread_disk.Tpo 
../src/.deps/LibTorrentTest-thread_disk.Po
g++ -DHAVE_CONFIG_H -I. -I..  -I. -I.. -I../src -I/include 
-I/gnu/store/mbg8qp31g1bmvy1x399xivbm8vm3n7ad-cppunit-1.12.1/include -pthread 
-g -O2 -g -DDEBUG -fvisibility=hidden 
-I/gnu/store/p311lij4y6ali5l6rrli1nmcw73ksp5a-openssl-1.0.2d/include  -MT 
rak/LibTorrentTest-ranges_test.o -MD -MP -MF 
rak/.deps/LibTorrentTest-ranges_test.Tpo -c -o rak/LibTorrentTest-ranges_test.o 
`test -f 'rak/ranges_test.cc' || echo './'`rak/ranges_test.cc
mv -f .deps/LibTorrentTest-main.Tpo .deps/LibTorrentTest-main.Po
g++ -DHAVE_CONFIG_H -I. -I..  -I. -I.. -I../src -I/include 
-I/gnu/store/mbg8qp31g1bmvy1x399xivbm8vm3n7ad-cppunit-1.12.1/include -pthread 
-g -O2 -g -DDEBUG -fvisibility=hidden 
-I/gnu/store/p311lij4y6ali5l6rrli1nmcw73ksp5a-openssl-1.0.2d/include  -MT 
data/LibTorrentTest-chunk_list_test.o -MD -MP -MF 
data/.deps/LibTorrentTest-chunk_list_test.Tpo -c -o 
data/LibTorrentTest-chunk_list_test.o `test -f 'data/chunk_list_test.cc' || 
echo './'`data/chunk_list_test.cc
mv -f rak/.deps/LibTorrentTest-allocators_test.Tpo 
rak/.deps/LibTorrentTest-allocators_test.Po
g++ -DHAVE_CONFIG_H -I. -I..  -I. -I.. -I../src -I/include 
-I/gnu/store/mbg8qp31g1bmvy1x399xivbm8vm3n7ad-cppunit-1.12.1/include -pthread 
-g -O2 -g -DDEBUG -fvisibility=hidden 
-I/gnu/store/p311lij4y6ali5l6rrli1nmcw73ksp5a-openssl-1.0.2d/include  -MT 
data/LibTorrentTest-hash_check_queue_test.o -MD -MP -MF 
data/.deps/LibTorrentTest-hash_check_queue_test.Tpo -c -o 
data/LibTorrentTest-hash_check_queue_test.o `test -f 
'data/hash_check_queue_test.cc' || echo './'`data/hash_check_queue_test.cc
mv -f data/.deps/LibTorrentTest-hash_check_queue_test.Tpo 
data/.deps/LibTorrentTest-hash_check_queue_test.Po
g++ -DHAVE_CONFIG_H -I. -I..  -I. -I.. -I../src -I/include 
-I/gnu/store/mbg8qp31g1bmvy1x399xivbm8vm3n7ad-cppunit-1.12.1/include -pthread 
-g -O2 -g -DDEBUG -fvisibility=hidden 
-I/gnu/store/p311lij4y6ali5l6rrli1nmcw73ksp5a-openssl-1.0.2d/include  -MT 
data/LibTorrentTest-hash_queue_test.o -MD -MP -MF 
data/.deps/LibTorrentTest-hash_queue_test.Tpo -c -o 
data/LibTorrentTest-hash_queue_test.o `test -f 'data/hash_queue_test.cc' || 
echo './'`data/hash_queue_test.cc
mv -f rak/.deps/LibTorrentTest-ranges_test.Tpo 
rak/.deps/LibTorrentTest-ranges_test.Po
g++ -DHAVE_CONFIG_H -I. -I..  -I. -I.. -I../src -I/include 
-I/gnu/store/mbg8qp31g1bmvy1x399xivbm8vm3n7ad-cppunit-1.12.1/include -pthread 
-g -O2 -g -DDEBUG -fvisibility=hidden 
-I/gnu/store/p311lij4y6ali5l6rrli1nmcw73ksp5a-openssl-1.0.2d/include  -MT 
protocol/LibTorrentTest-test_request_list.o -MD -MP -MF 
protocol/.deps/LibTorrentTest-test_request_list.Tpo -c -o 
protocol/LibTorrentTest-test_request_list.o `test -f 
'protocol/test_request_list.cc' || echo './'`protocol/test_request_list.cc
mv -f data/.deps/LibTorrentTest-chunk_list_test.Tpo 
data/.deps/LibTorrentTest-chunk_list_test.Po
g++ -DHAVE_CONFIG_H -I. -I..  -I. -I.. -I../src -I/include 
-I/gnu/store/mbg8qp31g1bmvy1x399xivbm8vm3n7ad-cppunit-1.12.1/include -pthread 
-g -O2 -g -DDEBUG -fvisibility=hidden 
-I/gnu/store/p311lij4y6ali5l6rrli1nmcw73ksp5a-openssl-1.0.2d/include  -MT 
torrent/LibTorrentTest-http_test.o -MD -MP -MF 
torrent/.deps/LibTorrentTest-http_test.Tpo -c -o 
torrent/LibTorrentTest-http_test.o `test -f 'torrent/http_test.cc' || echo 
'./'`torrent/http_test.cc
mv -f torrent/.deps/LibTorrentTest-http_test.Tpo 
torrent/.deps/LibTorrentTest-http_test.Po
g++ -DHAVE_CONFIG_H -I. -I..  -I. -I.. -I../src -I/include 
-I/gnu/store/mbg8qp31g1bmvy1x399xivbm8vm3n7ad-cppunit-1.12.1/include -pthread 
-g -O2 -g -DDEBUG -fvisibility=hidden 
-I/gnu/store/p311lij4y6ali5l6rrli1nmcw73ksp5a-openssl-1.0.2d/include  -MT 
torrent/LibTorrentTest-object_test.o -MD -MP -MF 
torrent/.deps/LibTorrentTest-object_test.Tpo -c -o 
torrent/LibTorrentTest-object_test.o `test -f 'torrent/object_test.cc' || echo 
'./'`torrent/object_test.cc
mv -f data/.deps/LibTorrentTest-hash_queue_test.Tpo 
data/.deps/LibTorrentTest-hash_queue_test.Po
g++ -DHAVE_CONFIG_H -I. -I..  -I. -I.. -I../src -I/include 
-I/gnu/store/mbg8qp31g1bmvy1x399xivbm8vm3n7ad-cppunit-1.12.1/include -pthread 
-g -O2 -g -DDEBUG -fvisibility=hidden 
-I/gnu/store/p311lij4y6ali5l6rrli1nmcw73ksp5a-openssl-1.0.2d/include  -MT 
torrent/LibTorrentTest-object_test_utils.o -MD -MP -MF 
torrent/.deps/LibTorrentTest-object_test_utils.Tpo -c -o 
torrent/LibTorrentTest-object_test_utils.o `test -f 
'torrent/object_test_utils.cc' || echo './'`torrent/object_test_utils.cc
mv -f torrent/.deps/LibTorrentTest-object_test_utils.Tpo 
torrent/.deps/LibTorrentTest-object_test_utils.Po
g++ -DHAVE_CONFIG_H -I. -I..  -I. -I.. -I../src -I/include 
-I/gnu/store/mbg8qp31g1bmvy1x399xivbm8vm3n7ad-cppunit-1.12.1/include -pthread 
-g -O2 -g -DDEBUG -fvisibility=hidden 
-I/gnu/store/p311lij4y6ali5l6rrli1nmcw73ksp5a-openssl-1.0.2d/include  -MT 
torrent/LibTorrentTest-object_static_map_test.o -MD -MP -MF 
torrent/.deps/LibTorrentTest-object_static_map_test.Tpo -c -o 
torrent/LibTorrentTest-object_static_map_test.o `test -f 
'torrent/object_static_map_test.cc' || echo 
'./'`torrent/object_static_map_test.cc
mv -f protocol/.deps/LibTorrentTest-test_request_list.Tpo 
protocol/.deps/LibTorrentTest-test_request_list.Po
g++ -DHAVE_CONFIG_H -I. -I..  -I. -I.. -I../src -I/include 
-I/gnu/store/mbg8qp31g1bmvy1x399xivbm8vm3n7ad-cppunit-1.12.1/include -pthread 
-g -O2 -g -DDEBUG -fvisibility=hidden 
-I/gnu/store/p311lij4y6ali5l6rrli1nmcw73ksp5a-openssl-1.0.2d/include  -MT 
torrent/LibTorrentTest-object_stream_test.o -MD -MP -MF 
torrent/.deps/LibTorrentTest-object_stream_test.Tpo -c -o 
torrent/LibTorrentTest-object_stream_test.o `test -f 
'torrent/object_stream_test.cc' || echo './'`torrent/object_stream_test.cc
mv -f torrent/.deps/LibTorrentTest-object_test.Tpo 
torrent/.deps/LibTorrentTest-object_test.Po
g++ -DHAVE_CONFIG_H -I. -I..  -I. -I.. -I../src -I/include 
-I/gnu/store/mbg8qp31g1bmvy1x399xivbm8vm3n7ad-cppunit-1.12.1/include -pthread 
-g -O2 -g -DDEBUG -fvisibility=hidden 
-I/gnu/store/p311lij4y6ali5l6rrli1nmcw73ksp5a-openssl-1.0.2d/include  -MT 
torrent/LibTorrentTest-tracker_controller_test.o -MD -MP -MF 
torrent/.deps/LibTorrentTest-tracker_controller_test.Tpo -c -o 
torrent/LibTorrentTest-tracker_controller_test.o `test -f 
'torrent/tracker_controller_test.cc' || echo 
'./'`torrent/tracker_controller_test.cc
mv -f torrent/.deps/LibTorrentTest-object_static_map_test.Tpo 
torrent/.deps/LibTorrentTest-object_static_map_test.Po
g++ -DHAVE_CONFIG_H -I. -I..  -I. -I.. -I../src -I/include 
-I/gnu/store/mbg8qp31g1bmvy1x399xivbm8vm3n7ad-cppunit-1.12.1/include -pthread 
-g -O2 -g -DDEBUG -fvisibility=hidden 
-I/gnu/store/p311lij4y6ali5l6rrli1nmcw73ksp5a-openssl-1.0.2d/include  -MT 
torrent/LibTorrentTest-tracker_controller_features.o -MD -MP -MF 
torrent/.deps/LibTorrentTest-tracker_controller_features.Tpo -c -o 
torrent/LibTorrentTest-tracker_controller_features.o `test -f 
'torrent/tracker_controller_features.cc' || echo 
'./'`torrent/tracker_controller_features.cc
mv -f torrent/.deps/LibTorrentTest-object_stream_test.Tpo 
torrent/.deps/LibTorrentTest-object_stream_test.Po
g++ -DHAVE_CONFIG_H -I. -I..  -I. -I.. -I../src -I/include 
-I/gnu/store/mbg8qp31g1bmvy1x399xivbm8vm3n7ad-cppunit-1.12.1/include -pthread 
-g -O2 -g -DDEBUG -fvisibility=hidden 
-I/gnu/store/p311lij4y6ali5l6rrli1nmcw73ksp5a-openssl-1.0.2d/include  -MT 
torrent/LibTorrentTest-tracker_controller_requesting.o -MD -MP -MF 
torrent/.deps/LibTorrentTest-tracker_controller_requesting.Tpo -c -o 
torrent/LibTorrentTest-tracker_controller_requesting.o `test -f 
'torrent/tracker_controller_requesting.cc' || echo 
'./'`torrent/tracker_controller_requesting.cc
torrent/tracker_controller_requesting.cc: In function ‘void 
do_test_hammering_multi3(bool, bool, bool, uint32_t)’:
torrent/tracker_controller_requesting.cc:106:1: note: variable tracking size 
limit exceeded with -fvar-tracking-assignments, retrying without
 do_test_hammering_multi3(bool success1, bool success2, bool success3, uint32_t 
min_interval = 0) {
 ^
mv -f torrent/.deps/LibTorrentTest-tracker_controller_requesting.Tpo 
torrent/.deps/LibTorrentTest-tracker_controller_requesting.Po
g++ -DHAVE_CONFIG_H -I. -I..  -I. -I.. -I../src -I/include 
-I/gnu/store/mbg8qp31g1bmvy1x399xivbm8vm3n7ad-cppunit-1.12.1/include -pthread 
-g -O2 -g -DDEBUG -fvisibility=hidden 
-I/gnu/store/p311lij4y6ali5l6rrli1nmcw73ksp5a-openssl-1.0.2d/include  -MT 
torrent/LibTorrentTest-tracker_list_test.o -MD -MP -MF 
torrent/.deps/LibTorrentTest-tracker_list_test.Tpo -c -o 
torrent/LibTorrentTest-tracker_list_test.o `test -f 
'torrent/tracker_list_test.cc' || echo './'`torrent/tracker_list_test.cc
torrent/tracker_controller_test.cc: In member function ‘void 
tracker_controller_test::test_multiple_failure()’:
torrent/tracker_controller_test.cc:327:1: note: variable tracking size limit 
exceeded with -fvar-tracking-assignments, retrying without
 tracker_controller_test::test_multiple_failure() {
 ^
torrent/tracker_list_test.cc: In member function ‘void 
tracker_list_test::test_has_active()’:
torrent/tracker_list_test.cc:446:1: note: variable tracking size limit exceeded 
with -fvar-tracking-assignments, retrying without
 tracker_list_test::test_has_active() {
 ^
g++: internal compiler error: Killed (program cc1plus)
Please submit a full bug report,
with preprocessed source if appropriate.
See <http://gcc.gnu.org/bugs.html> for instructions.
Makefile:1050: recipe for target 
'torrent/LibTorrentTest-tracker_controller_features.o' failed
make[2]: *** [torrent/LibTorrentTest-tracker_controller_features.o] Error 4
make[2]: *** Waiting for unfinished jobs....
mv -f torrent/.deps/LibTorrentTest-tracker_list_test.Tpo 
torrent/.deps/LibTorrentTest-tracker_list_test.Po
mv -f torrent/.deps/LibTorrentTest-tracker_controller_test.Tpo 
torrent/.deps/LibTorrentTest-tracker_controller_test.Po
make[2]: Leaving directory 
'/tmp/nix-build-libtorrent-0.13.6.drv-0/libtorrent-0.13.6/test'
Makefile:1511: recipe for target 'check-am' failed
make[1]: *** [check-am] Error 2
make[1]: Leaving directory 
'/tmp/nix-build-libtorrent-0.13.6.drv-0/libtorrent-0.13.6/test'
Makefile:494: recipe for target 'check-recursive' failed
make: *** [check-recursive] Error 1

Reply via email to