When I tried to compile version 1.0.6 on a fresh Ubuntu it fails on libtorrent compilation
./libtorrent/src/memdebug.cpp: In static member function 'static void* memdebug::my_malloc_hook(size_t, const void*)':
./libtorrent/src/memdebug.cpp:146: error: 'demangle' was not declared in this scope
Compiling fails
Re: Compiling fails
were you following this: http://dev.deluge-torrent.org/wiki/Inst ... FromSource ? in particular make sure you have all the dependencies installed.
also, out of curiosity, why would you want to compile deluge for ubuntu when there are .deb ready available?
also, out of curiosity, why would you want to compile deluge for ubuntu when there are .deb ready available?
Re: Compiling fails
All the dependencies are installed, I believe the problem lays in the libtorrent/include/libtorrent/assert.hpp file, it's included in the memdebug.cpp file
This file has changed since version 1.0.5, the new version starts like this:
The if for the TORRENT_DEBUG has been added and If I haven't defined TORRENT_DEBUG the function demangle will never be declared resulting in the error message. In the previous version the declaration was always done. I don't want to compile with debugging code.
As to why I like to compile instead of using the deb file =>
This file has changed since version 1.0.5, the new version starts like this:
Code: Select all
#ifndef TORRENT_ASSERT
#include "libtorrent/config.hpp"
#if !defined TORRENT_DEBUG
#define TORRENT_ASSERT(a) do {} while(false)
#else
#include <string>
#ifdef __GNUC__
std::string demangle(char const* name);
#endif
As to why I like to compile instead of using the deb file =>
Re: Compiling fails
It built fine here under Mandriva 2009.0 from the deluge-1.0.6.tar.gz
Re: Compiling fails
Did you build on a machine already running deluge? Because if you did the libtorrent won't be rebuild.barjac wrote:It built fine here under Mandriva 2009.0 from the deluge-1.0.6.tar.gz
Re: Compiling fails
Just delete the memdebug.cpp file in libtorrent/src
I have removed it from future versions because it's no longer used and it's only for debug builds anyways.
I have removed it from future versions because it's no longer used and it's only for debug builds anyways.
Re: Compiling fails
OK I found the problem.
There's a bug in the setup.py:
The above code should remove the memdebug from the _sources list but it doesn't.
From : http://effbot.org/zone/python-list.htm
The memdebug.cpp file is removed from the _sources list and the memdebug.cpp isn't compiled.
There's a bug in the setup.py:
Code: Select all
_sources = glob.glob("./libtorrent/src/*.cpp") + \
glob.glob("./libtorrent/src/*.c") + \
glob.glob("./libtorrent/src/kademlia/*.cpp") + \
glob.glob("./libtorrent/bindings/python/src/*.cpp")
# Remove some files from the source that aren't needed
_source_removals = ["mapped_storage.cpp", "memdebug.cpp"]
for source in _sources:
for rem in _source_removals:
if rem in source:
_sources.remove(source)
From : http://effbot.org/zone/python-list.htm
if I change it in :Note that the for-in statement maintains an internal index, which is incremented for each loop iteration. This means that if you modify the list you’re looping over, the indexes will get out of sync, and you may end up skipping over items, or process the same item multiple times.
Code: Select all
_sources = glob.glob("./libtorrent/src/*.cpp") + \
glob.glob("./libtorrent/src/*.c") + \
glob.glob("./libtorrent/src/kademlia/*.cpp") + \
glob.glob("./libtorrent/bindings/python/src/*.cpp")
# Remove some files from the source that aren't needed
_source_removals = ['mapped_storage.cpp', 'memdebug.cpp']
for rem in _source_removals:
for source in _sources:
if rem in source:
_sources.remove(source)