Page 1 of 1

Problems installing Deluge on Leopard

Posted: Fri May 09, 2008 3:10 pm
by Sixmax
Hey..
I have a problem concerning the install process of Deluge in Mac OS X 10.5.2 Leopard in Terminal. I have followed the instruction, and downloaded Xcode Tools and MacPorts, but still get this message after all the packages have installed correctly:

Last login: Fri May 9 16:43:22 on console
sixten-maximillian-thestrups-macbook:~ sixtenthestrup$ export PATH=$PATH:/opt/local/bin
sixten-maximillian-thestrups-macbook:~ sixtenthestrup$ export MANPATH=$MANPATH:/opt/local/share/man
sixten-maximillian-thestrups-macbook:~ sixtenthestrup$ export INFOPATH=$INFOPATH:/opt/local/share/info
sixten-maximillian-thestrups-macbook:~ sixtenthestrup$ sudo port install deluge
Password:
---> Building deluge with target build
Error: Target org.macports.build returned: shell command " cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_net_deluge/work/deluge-torrent-0.5.8.9" && /opt/local/bin/python2.5 setup.py build " returned error 1
Command output: Attempting to detect your system information
32bit x86 system detected
Darwin / OS X system detected
running build
running build_py
running build_ext
building 'deluge_core' extension
/usr/bin/gcc-4.0 -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -I/opt/local/include -I/opt/local/include/boost -I./libtorrent -I./libtorrent/include -I./libtorrent/include/libtorrent -I/usr/include/python2.5 -I/opt/local/include/python2.5 -c libtorrent/src/alert.cpp -o build/temp.macosx-10.3-i386-2.5/libtorrent/src/alert.o -Wno-missing-braces -DHAVE_INCLUDE_LIBTORRENT_ASIO____ASIO_HPP=1 -DHAVE_INCLUDE_LIBTORRENT_ASIO_SSL_STREAM_HPP=1 -DHAVE_INCLUDE_LIBTORRENT_ASIO_IP_TCP_HPP=1 -DHAVE_PTHREAD=1 -DTORRENT_USE_OPENSSL=1 -DHAVE_SSL=1 -DNDEBUG=1 -O2
cc1plus: warning: command line option "-Wstrict-prototypes" is valid for C/ObjC but not for C++
./libtorrent/include/libtorrent/time.hpp:157: error: 'time_traits' is not a template
./libtorrent/include/libtorrent/time.hpp:158: error: explicit specialization of non-template 'asio::time_traits'
error: command '/usr/bin/gcc-4.0' failed with exit status 1

Error: Status 1 encountered during processing.
sixten-maximillian-thestrups-macbook:~ sixtenthestrup$


What to do?

Greetings
Sixten Thestrup

Re: Problems installing Deluge on Leopard

Posted: Fri May 09, 2008 3:19 pm
by johnnyg
do you have gcc v4.0 installed?

Re: Problems installing Deluge on Leopard

Posted: Sun May 11, 2008 1:00 am
by neurophyre
I do:

Code: Select all

$ sudo port install deluge
Password:
--->  Building deluge with target build
Error: Target org.macports.build returned: shell command " cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_net_deluge/work/deluge-torrent-0.5.8.9" && /opt/local/bin/python2.5 setup.py build " returned error 1
Command output: Attempting to detect your system information
32bit x86 system detected
Darwin / OS X system detected
running build
running build_py
running build_ext
building 'deluge_core' extension
/usr/bin/gcc-4.0 -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -I/opt/local/include -I/opt/local/include/boost -I./libtorrent -I./libtorrent/include -I./libtorrent/include/libtorrent -I/usr/include/python2.5 -I/opt/local/include/python2.5 -c libtorrent/src/alert.cpp -o build/temp.macosx-10.3-i386-2.5/libtorrent/src/alert.o -Wno-missing-braces -DHAVE_INCLUDE_LIBTORRENT_ASIO____ASIO_HPP=1 -DHAVE_INCLUDE_LIBTORRENT_ASIO_SSL_STREAM_HPP=1 -DHAVE_INCLUDE_LIBTORRENT_ASIO_IP_TCP_HPP=1 -DHAVE_PTHREAD=1 -DTORRENT_USE_OPENSSL=1 -DHAVE_SSL=1 -DNDEBUG=1 -O2
cc1plus: warning: command line option "-Wstrict-prototypes" is valid for C/ObjC but not for C++
./libtorrent/include/libtorrent/time.hpp:157: error: 'time_traits' is not a template
./libtorrent/include/libtorrent/time.hpp:158: error: explicit specialization of non-template 'asio::time_traits'
error: command '/usr/bin/gcc-4.0' failed with exit status 1

Error: Status 1 encountered during processing.

$ /usr/bin/gcc-4.0 
i686-apple-darwin9-gcc-4.0.1: no input files

Re: Problems installing Deluge on Leopard

Posted: Sun May 11, 2008 10:46 am
by Sixmax
Yeah - it's preinstalled with xcode tools 3.0

Re: Problems installing Deluge on Leopard

Posted: Thu Jun 05, 2008 6:08 pm
by oriain
Has anyone figured this out? I had it working on 10.4 but upon upgrading, things got messed up. I have the same error, so I've just been trying to make do but AZ is just killing me.

Re: Problems installing Deluge on Leopard

Posted: Mon Jun 09, 2008 3:52 am
by Geno
I am stuck on the same exact error. I'm under the impression that I need to uninstall python 2.5 and reinstall it. Could someone post the code on how to do that or has someone found some other way that might work?

Re: Problems installing Deluge on Leopard

Posted: Wed Jun 11, 2008 7:03 pm
by oriain
I don't think that the problem is with the version of Python that you have installed. If you take a look at the source for setup.py, there is a section mentioning that the -g and -Wstrict-prototypes flags are not supposed to be called in the line (/usr/bin/gcc-4.0 ...) directly preceding the warning and error statement. I keep reading over the file, but I can't figure out why we are still getting those flags when there is a code segment removing them. I actually entirely removed Macports and reinstalled it to see if I could then install deluge, but to no avail. I've managed to get around the error in time.hpp by changing the source code after the failed installation, but I just create more errors in other parts of the program. I really wish the Macports repository would get the newer version as that would hopefully solve the problem. Until then...

[Update]Actually, I just figured out how to get rid of the flags, but it only removes the warning. Nonetheless, there seems to be a mistake in the setup.py file. After you issue the

Code: Select all

sudo port install deluge
for the first time, the source code will be downloaded to your machine. Macports then "configures" it and tries to build it, which subsequently fails. We can then edit the source code and reissue the install command. Macports will pickup where it left off before. Type (or copy)

Code: Select all

sudo /Applications/TextEdit.app/Contents/MacOS/TextEdit /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_net_deluge/work/deluge-torrent-0.5.8.9/setup.py
into the Terminal and TextEdit will open with setup.py. If you go to approximately line 90 (command-L, then type 90), you will see the section explaining the flags.

Code: Select all

# NOTE: The following "hack" removes the -g and -Wstrict-prototypes
# build options from the command that will compile the C++ module,
# deluge_core.  While we understand that you aren't generally
# encouraged to do this, we have done so for the following reasons:
# 1) The -g compiler option produces debugging information about
#    the compiled module.  However, this option increases the 
#    size of deluge_core.so from ~1.9MB to 13.6MB and slows down
#    the program's execution without offering any benefits 
#    whatsoever.
# 2) -Wstrict-prototypes is not a valid C++ build option, and the
#    compiler will throw a number of warnings at compile time.
#    While this does not really impact anything, it makes it
#    seem as if something is going wrong with the compile, and
#    it has been removed to prevent confusion.
At line 168 (I think ^^) you will see the following:

Code: Select all

    if python_version == '2.5':
        cv_opt = sysconfig.get_config_vars()["CFLAGS"]
        for removal in removals:
            cv_opt = cv_opt.replace(removal, " ")
        sysconfig.get_config_vars()["CFLAGS"] = ' '.join(cv_opt.split())
    else:
        cv_opt = sysconfig.get_config_vars()["OPT"]
        for removal in removals:
            cv_opt = cv_opt.replace(removal, " ")
        sysconfig.get_config_vars()["OPT"] = ' '.join(cv_opt.split())
The CFLAGS need to be replaced with OPT. This will remove the warnings, but not the errors.

Does anyone know about C++ templates? That would be some real help.

[Update] Now I really have no idea why I could get previous versions of deluge running. It worked before I upgraded to 10.5. I figured that I would just install an old version of deluge to use while someone either fixed the current version on Macports (0.5.8.9) or until a new version came out, but _wrong_! Using the guide from http://journal.bitshaker.com/articles/2 ... -macports/ and the revision numbers from http://trac.macports.org/log/trunk/dpor ... e/Portfile I installed local copies of older deluge versions and tried installing them, but I got the same error as the current version on Macports. Arg!!!!

For anyone insterested, you can install old copies by using the following commands:

Code: Select all

mkdir /Users/Shared/dports
svn co http://svn.macports.org/repository/macports/trunk/dports/net/deluge --revision NUMBER net/deluge
portindex /Users/Shared/dports
port list deluge
sudo port install deluge@VERSION
1. Make a directory to hold the local svn copy.
2. Replace NUMBER with the revision number of the version you want installed.
3. The portindex command will add the old version to the Macports listing.
4. Make sure you have the old version available.
5. Replace VERSION with the old version number listed.

Viola! and Good Luck!

(So maybe the python version is what's screwing Mac users over... I haven't the slightest idea anymore.)

Re: Problems installing Deluge on Leopard

Posted: Mon Jun 23, 2008 12:43 am
by gray_hat
Btw, Deluge still doesn't compile on OS X Leopard (or even Snow Leopard for that matter). I tried with both the current GCC4.0 and the Snow Leopard GCC4.0 (I have no idea if they are different) and I get the same errors as everyone else.

Re: Problems installing Deluge on Leopard

Posted: Mon Jun 23, 2008 1:21 am
by oriain
I spoke with a friend who develops at Apple, and he mentioned that as compiler development continues, it gets more and more strict in regards to what it accepts, and in general while templates are very flexible, they can be tricky to code correctly. As templates seem to be causing the error and one of the biggest changes in migration to 10.5 seems to be the compiler, he mentioned that I try to use the gcc_select command to specify the older compiler version. I haven't yet had time to research this command much, but if anyone familiar with this could try it and post the results, we would be grateful!

Re: Problems installing Deluge on Leopard

Posted: Sun Sep 14, 2008 8:22 pm
by Special_K
I'm getting the same problem and, unfortunately, have no idea what I'm doing. It seems that about 50 things failed to build during the install, and then it ended with "Error: Status 1 encountered during processing." Could anyone explain how to get past this issue? I've tried several times, and it just won't work. The install log follows:

Code: Select all

Last login: Sun Sep 14 16:00:51 on tty??
bas2-toronto06-1279613104:~ John$ sudo port install deluge
Password:
--->  Building boost-jam
Error: Target org.macports.build returned: shell command " cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_devel_boost-jam/work/boost-jam-3.1.16" && ./build.sh " returned error 1
Command output: ###
### Using 'darwin' toolset.
###
rm -rf bootstrap
mkdir bootstrap
cc -o bootstrap/jam0 command.c compile.c debug.c expand.c glob.c hash.c hdrmacro.c headers.c jam.c jambase.c jamgram.c lists.c make.c make1.c newstr.c option.c output.c parse.c pathunix.c pathvms.c regexp.c rules.c scan.c search.c subst.c timestamp.c variable.c modules.c strings.c filesys.c builtins.c pwd.c class.c native.c w32_getreg.c modules/set.c modules/path.c modules/regex.c modules/property-set.c modules/sequence.c modules/order.c execunix.c fileunix.c
/usr/bin/ld: /usr/lib/gcc/i686-apple-darwin8/4.0.1/../../../libSystem.dylib unknown flags (type) of section 6 (__TEXT,__literal16) in load command 0
collect2: ld returned 1 exit status

Error: The following dependencies failed to build: boost boost-jam gmake gettext expat libiconv gperf ncurses ncursesw dbus-python25 dbus pkgconfig dbus-glib glib2 py25-gobject libxslt autoconf help2man p5-locale-gettext perl5.8 m4 automake libtool libxml2 zlib python25 py25-numeric librsvg libart_lgpl libcroco libgsf gnome-vfs desktop-file-utils popt gconf gtk2 atk cairo fontconfig freetype libpixman libpng render xrender jpeg pango Xft2 xorg-xproto xorg-util-macros shared-mime-info p5-xml-parser tiff intltool gnome-common orbit2 libidl gnome-mime-data openssl libbonobo py25-gtk libglade2 py25-cairo py25-numpy fftw-3 py25-hashlib py25-xdg py25-zlib
Error: Status 1 encountered during processing.
bas2-toronto06-1279613104:~ John$ 
Thanks
-S_K