From 01b69ad1024c2acd4dd2105556439cc4629a9186 Mon Sep 17 00:00:00 2001 From: gubatron Date: Wed, 15 Jan 2014 11:29:36 -0500 Subject: [PATCH 1/4] added 2 missing brew dependencies that broke the bootstrap.sh script. --- doc/build-osx.md | 2 +- libtorrent/build-aux/config.guess | 30 ++++++++++++++++++++---------- 2 files changed, 21 insertions(+), 11 deletions(-) diff --git a/doc/build-osx.md b/doc/build-osx.md index ffa8ada4..02cb42db 100644 --- a/doc/build-osx.md +++ b/doc/build-osx.md @@ -41,7 +41,7 @@ Instructions: HomeBrew #### Install dependencies using Homebrew - brew install boost miniupnpc openssl berkeley-db4 + brew install boost miniupnpc openssl berkeley-db4 autoconf automake Note: After you have installed the dependencies, you should check that the Brew-installed version of OpenSSL is the one available for compilation. You can check this by typing diff --git a/libtorrent/build-aux/config.guess b/libtorrent/build-aux/config.guess index b79252d6..9afd6762 100755 --- a/libtorrent/build-aux/config.guess +++ b/libtorrent/build-aux/config.guess @@ -2,7 +2,7 @@ # Attempt to guess a canonical system name. # Copyright 1992-2013 Free Software Foundation, Inc. -timestamp='2013-06-10' +timestamp='2013-11-29' # This file is free software; you can redistribute it and/or modify it # under the terms of the GNU General Public License as published by @@ -1260,16 +1260,26 @@ EOF if test "$UNAME_PROCESSOR" = unknown ; then UNAME_PROCESSOR=powerpc fi - if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then - if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \ - (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \ - grep IS_64BIT_ARCH >/dev/null - then - case $UNAME_PROCESSOR in - i386) UNAME_PROCESSOR=x86_64 ;; - powerpc) UNAME_PROCESSOR=powerpc64 ;; - esac + if test `echo "$UNAME_RELEASE" | sed -e 's/\..*//'` -le 10 ; then + if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then + if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \ + (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \ + grep IS_64BIT_ARCH >/dev/null + then + case $UNAME_PROCESSOR in + i386) UNAME_PROCESSOR=x86_64 ;; + powerpc) UNAME_PROCESSOR=powerpc64 ;; + esac + fi fi + elif test "$UNAME_PROCESSOR" = i386 ; then + # Avoid executing cc on OS X 10.9, as it ships with a stub + # that puts up a graphical alert prompting to install + # developer tools. Any system running Mac OS X 10.7 or + # later (Darwin 11 and later) is required to have a 64-bit + # processor. This is not true of the ARM version of Darwin + # that Apple uses in portable devices. + UNAME_PROCESSOR=x86_64 fi echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE} exit ;; From c0b9349afb613d61d8c247219d3d9011a37edceb Mon Sep 17 00:00:00 2001 From: gubatron Date: Wed, 15 Jan 2014 12:16:47 -0500 Subject: [PATCH 2/4] revert changes on config.guess, the bootstrap script changed this file, perhaps shouldn't be in repo --- libtorrent/build-aux/config.guess | 30 ++++++++++-------------------- 1 file changed, 10 insertions(+), 20 deletions(-) mode change 100755 => 100644 libtorrent/build-aux/config.guess diff --git a/libtorrent/build-aux/config.guess b/libtorrent/build-aux/config.guess old mode 100755 new mode 100644 index 9afd6762..b79252d6 --- a/libtorrent/build-aux/config.guess +++ b/libtorrent/build-aux/config.guess @@ -2,7 +2,7 @@ # Attempt to guess a canonical system name. # Copyright 1992-2013 Free Software Foundation, Inc. -timestamp='2013-11-29' +timestamp='2013-06-10' # This file is free software; you can redistribute it and/or modify it # under the terms of the GNU General Public License as published by @@ -1260,26 +1260,16 @@ EOF if test "$UNAME_PROCESSOR" = unknown ; then UNAME_PROCESSOR=powerpc fi - if test `echo "$UNAME_RELEASE" | sed -e 's/\..*//'` -le 10 ; then - if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then - if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \ - (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \ - grep IS_64BIT_ARCH >/dev/null - then - case $UNAME_PROCESSOR in - i386) UNAME_PROCESSOR=x86_64 ;; - powerpc) UNAME_PROCESSOR=powerpc64 ;; - esac - fi + if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then + if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \ + (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \ + grep IS_64BIT_ARCH >/dev/null + then + case $UNAME_PROCESSOR in + i386) UNAME_PROCESSOR=x86_64 ;; + powerpc) UNAME_PROCESSOR=powerpc64 ;; + esac fi - elif test "$UNAME_PROCESSOR" = i386 ; then - # Avoid executing cc on OS X 10.9, as it ships with a stub - # that puts up a graphical alert prompting to install - # developer tools. Any system running Mac OS X 10.7 or - # later (Darwin 11 and later) is required to have a 64-bit - # processor. This is not true of the ARM version of Darwin - # that Apple uses in portable devices. - UNAME_PROCESSOR=x86_64 fi echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE} exit ;; From 613a312f65faf6d67e747a7a627ad232403675c8 Mon Sep 17 00:00:00 2001 From: gubatron Date: Wed, 15 Jan 2014 12:54:17 -0500 Subject: [PATCH 3/4] silenced unused variable warnings. --- src/core.h | 1 - src/leveldb/table/table.cc | 1 - src/leveldb/util/cache.cc | 1 - 3 files changed, 3 deletions(-) diff --git a/src/core.h b/src/core.h index d1e05763..bea5d1b9 100644 --- a/src/core.h +++ b/src/core.h @@ -404,7 +404,6 @@ public: template void Unserialize(Stream &s, int nType, int nVersion) { - unsigned int nCode = 0; // version ::Unserialize(s, VARINT(this->nVersion), nType, nVersion); // header code diff --git a/src/leveldb/table/table.cc b/src/leveldb/table/table.cc index dbd6d3a1..71c1756e 100644 --- a/src/leveldb/table/table.cc +++ b/src/leveldb/table/table.cc @@ -228,7 +228,6 @@ Status Table::InternalGet(const ReadOptions& options, const Slice& k, !filter->KeyMayMatch(handle.offset(), k)) { // Not found } else { - Slice handle = iiter->value(); Iterator* block_iter = BlockReader(this, options, iiter->value()); block_iter->Seek(k); if (block_iter->Valid()) { diff --git a/src/leveldb/util/cache.cc b/src/leveldb/util/cache.cc index 24f1f63f..2cb5b5f0 100644 --- a/src/leveldb/util/cache.cc +++ b/src/leveldb/util/cache.cc @@ -116,7 +116,6 @@ class HandleTable { LRUHandle* h = list_[i]; while (h != NULL) { LRUHandle* next = h->next_hash; - Slice key = h->key(); uint32_t hash = h->hash; LRUHandle** ptr = &new_list[hash & (new_length - 1)]; h->next_hash = *ptr; From 8466448d35e68af9c60c2df3c15f6ed9a42725fa Mon Sep 17 00:00:00 2001 From: gubatron Date: Wed, 15 Jan 2014 15:19:19 -0500 Subject: [PATCH 4/4] make sure BDB_INCLUDE_PATH is in the PATH for Mac users as it can be in conflict with existing BDB installation. --- doc/build-osx.md | 1 + 1 file changed, 1 insertion(+) diff --git a/doc/build-osx.md b/doc/build-osx.md index 02cb42db..23ebda38 100644 --- a/doc/build-osx.md +++ b/doc/build-osx.md @@ -73,6 +73,7 @@ Instead, it's enough to make sure the right openssl binary is on your $PATH: export BOOST_LIB_SUFFIX=-mt export LDFLAGS="-L$OPENSSL_LIB_PATH -L$BDB_LIB_PATH -L$BOOST_LIB_PATH" export CPPFLAGS="-I$OPENSSL_INCLUDE_PATH -I$BDB_INCLUDE_PATH -I$BOOST_INCLUDE_PATH" + export PATH=${BDB_INCLUDE_PATH}:${PATH} 3. Build libtorrent