Page 1 of 1

Unable to compile latest 1.1.0_RC SVN

Posted: Sat May 16, 2009 5:09 am
by raab
I've had no issues in the past, using Debian Lenny 64bit, compiling from source however today when I updated the source to the latest revision I'm unable to compile the source.

I get the following when running 'python setup.py build':

Code: Select all

gcc -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fPIC -I./libtorrent -I./libtorrent/include -I./libtorrent/include/libtorrent -I/usr/include/python2.5 -I/usr/include -I/usr/include/python2.5 -c ./libtorrent/src/storage.cpp -o build/temp.linux-x86_64-2.5/./libtorrent/src/storage.o -D_FILE_OFFSET_BITS=64 -DNDEBUG -DTORRENT_USE_OPENSSL=1 -O2 -Wno-missing-braces
cc1plus: warning: command line option "-Wstrict-prototypes" is valid for Ada/C/ObjC but not for C++
./libtorrent/src/storage.cpp: In member function 'virtual bool libtorrent::storage::initialize(bool)':
./libtorrent/src/storage.cpp:447: warning: comparison between signed and unsigned integer expressions
./libtorrent/src/storage.cpp: In member function 'int libtorrent::piece_manager::check_one_piece(int&)':
./libtorrent/src/storage.cpp:2231: error: 'class std::vector<char, std::allocator<char> >' has no member named 'reset'
error: command 'gcc' failed with exit status 1
Any ideas?

Re: Unable to compile latest 1.1.0_RC SVN

Posted: Sat May 16, 2009 5:38 am
by johnnyg
seems to be a bug in libtorrent (it's also in trunk).
hydri (the developer for libtorrent) should hopefully fix it soon, hang in there ;)

Re: Unable to compile latest 1.1.0_RC SVN

Posted: Sat May 16, 2009 5:42 am
by raab
Cool :)

In the meantime I've just grabbed deluge 1.1.7 source as I don't know how to drop the revision on libtorrent with svn

Re: Unable to compile latest 1.1.0_RC SVN

Posted: Sat May 16, 2009 6:08 am
by johnnyg
I think I may have fixed the compilation errors; I'm compiling as we speak and if nothing crashes, I'll post the diff here :D

Re: Unable to compile latest 1.1.0_RC SVN

Posted: Sat May 16, 2009 7:37 am
by johnnyg
ok this patch seems to work for me so far:

Code: Select all

Index: libtorrent/src/storage.cpp
===================================================================
--- libtorrent/src/storage.cpp  (revision 3507)
+++ libtorrent/src/storage.cpp  (working copy)
@@ -2228,7 +2228,7 @@
                && m_storage->error() != error_code(ENOENT, get_posix_category()))
 #endif
            {
-               m_piece_data.reset();
+               m_piece_data.clear();
                return -1;
            }
            return 1;
Index: libtorrent/src/policy.cpp
===================================================================
--- libtorrent/src/policy.cpp   (revision 3507)
+++ libtorrent/src/policy.cpp   (working copy)
@@ -659,7 +659,7 @@
 #endif
            i->second.inet_as = ses.lookup_as(as);
 #endif
-           i->source = peer_info::incoming;
+           i->second.source = peer_info::incoming;
        }                                                                                                                                                                                                                                    

        c.set_peer_info(&i->second);
however it's not official, so use it at your own risk :P

Re: Unable to compile latest 1.1.0_RC SVN

Posted: Sat May 16, 2009 10:06 pm
by raab
I tried applying the patch

raab@ns302379:~/deluge$ patch -p0 < patch
patching file libtorrent/src/storage.cpp
patch: **** malformed patch at line 14: Index: libtorrent/src/policy.cpp

Checked the timestamp on storage.cpp and policy.cpp and they're unchanged

I just manually made the changes to each and it's compiling now

Upon installing it gives the following error:

Code: Select all

Extracting deluge-1.1.7-py2.5-linux-x86_64.egg to /usr/lib/python2.5/site-packages
  File "/usr/lib/python2.5/site-packages/deluge-1.1.7-py2.5-linux-x86_64.egg/deluge/ui/common.py", line 104
    'size': f["length"],
         ^
SyntaxError: invalid syntax

Re: Unable to compile latest 1.1.0_RC SVN

Posted: Sun May 17, 2009 2:11 am
by johnnyg
I generated that patch for libtorrent in trunk, but I assumed it was the same version seeing you had the same error, but the lines must have mismatched.
seems like there was a missing comma in that file, I've added it; svn up and try again.

Re: Unable to compile latest 1.1.0_RC SVN

Posted: Sun May 17, 2009 2:27 am
by raab
Hm, I would've thought it was the same version of libtorrent too :|

Anyway, svn up'd and installed fine, thanks :)