The two OSs are Snow Leopard (10.6.7) and a beta OS. The Xcode version is 4.0.2 on 10.6.7 and a beta version on the other.
I am pretty sure that the issue with deluge was that Xcode uses llvm-gcc instead of vanilla gcc, as the default gcc version. The fix I found that worked, is to tell MacPorts to use the regular gcc-4.2 to compile the problem ports with.
On and off, I have spent a few days on this, but today was the first day I could actually sit down and concentrate on it for an afternoon. The main reason it took so long was because the information is not out there, as to how to coerce some of the ports into compiling. And in the case of gcc44 it really felt like I was fighting with it!
The ports that were a problem were:
- libsdl
gcc44
If you have already built mpfr and gmp, just use 'port -f uninstall gmp mpfr libsdl' before going any further.
In order to fix the ports that did not compile, you need to find the Portfile for these four ports: devel/libsdl, devel/gmp, devel/mpfr and lang/gcc44. In each of those, put the following line somewhere towards the bottom of the file:
Code: Select all
configure.compiler gcc-4.2
After you have changed those Portfile files, you need to build libtorrent-rasterbar with the +python26 flag. However, this port was very kind and actually told me that I needed to do that, when it failed to work.
After that, it was just a matter of waiting. Including all the dependencies, it was easily a few hours to get everything built. The irony was that one of the fastest ports to build and install was deluge itself!
Interestingly, when I built gcc44 on Snow Leopard the first time after these fixes, it failed. However, building it a second time worked. I swear I didn't wave a single dead chicken over it, and there was no incense involved. It just seemed to need to have a run up first, before it would go the whole hog.
I hope this post helps anyone else who has been fighting with getting deluge compiled under 10.6 and Xcode 4. And maybe will let people who tried and gave up, to have another go. I only installed it because I was getting an occasional kernel panic when running Transmission 2.30 beta, and my brother (hi bro!) suggested deluge. To be fair he did say it can be a sod to get working, but now I have succeeded, it does not feel like it was that much of an ordeal.
And for those brave people with a beta OS, trying to get deluge working on it, there is hope!
Good luck all