Page 6 of 6

Re: Compiling latest qBittorrent with MacPorts package manager

Posted: Wed Jul 29, 2015 2:31 pm
by ignas2526
After about 6 hours of trying I did manage to compile qBittorrent 3.2.1. Unfortunately, it crashes with "Segmentation fault: 11".
The compilation of qBittorrent is super broken.
Firstly geoip.pri kept nagging that GeoIP.dat doesn't exist in src/gui/geoip/ when it did. I had to edit geoip.pri and remove those checks. When I opened geoip.qrc, it did show GeoIP.dat correctly. Then the autoconf or whichever brain damaged program makes src/Makefile inserted a bunch of lowercase letter N's where it was not needed:

Code: Select all

CXXFLAGS      = -pipe -nI/opt/local/includenDTORRENT_USE_OPENSSLnDBOOST_ASIO_HASH_MAP_BUCKETS=1021nDBOOST_EXCEPTION_DISABLEnDBOOST_ASIO_ENABLE_CANCELIOnDBOOST_ASIO_DYN_LINKnDTORRENT_LINKING_SHAREDnI/opt/local/includenI/opt/local/include/libtorrentnI/opt/local/include -g -O2 -O2 -arch x86_64 -Xarch_x86_64 -mmacosx-version-min=10.9 -Wall -W $(DEFINES)
I had to manually edit src/Makefile and fix typos.

I have no idea why qBittorrent crashes for me. Configure finished fine, Makefile, apart from the incorrect variable above which I've fixed, ran fine.
I've compiled with qt4-mac and libtorrent-rasterbar installed through macports. qBittorrent seems to not want to install with qt5-mac.

Edit:
The src/Makefile is generated by qmake which gets this broken line from conf.pri . conf.pri is generated by configure. I suspect problem is in configure script.
Also, I've opened qBittorrent project with Qt Creator and it seems that it doesn't compile at all with Qt5.4. Does qBittorrent even support Qt5?

Re: Compiling latest qBittorrent with MacPorts package manager

Posted: Sun Aug 02, 2015 12:55 pm
by ignas2526
I've managed to compile qBittorrent 3.2.2
* The configure or some other brain damaged program still messes up the Makefile as I've described in my previous post. Makefile requires editing
* The geoip.pri still fails to detect existing GeoIp.dat. Editing out detection lines from geoip.pri solves the problem.

Vaguely compilation process:
libtorrent-rasterbar compilation
...
cd qBittorrent
./configure
...
* Makefile and geopip.pri hacking *
...
* A bunch of macport calls here *
...
./configure
make
otool -L qbittorrent.app/Contents/MacOS/qbittorrent
* A bunch of calls such like this one: * sudo install_name_tool -change /opt/local/Library/Frameworks/QtNetwork.framework/Versions/4/QtNetwork @loader_path/../Frameworks/QtNetwork.framework/Versions/4/QtNetwork qbittorrent.app/Contents/MacOS/qbittorrent
...
macdeployqt qbittorrent.app  -dmg

And that's all.
Download link: https://mega.co.nz/#!W8F2iSpD!1dV5Bsv4uTzeIx6hqmTu8feYT_AFNZ8eO_aQX28EaRw

Unlike 3.2.0 which would not download anything for me, this version seems to download stuff, however, connection always stays "No direct connections" and DHT node count stays at 0. UPnP fails with 500 internal error. Manual port mapping doesn't seem to work either.
Also, all http://... trackers always have status "Not Working". I had this problem in 3.1.12, 3.2.0 and 3.2.2. This pretty much makes it impossible to use private trackers as well as any http trackers.

Re: Compiling latest qBittorrent with MacPorts package manager

Posted: Sun Aug 02, 2015 12:58 pm
by Rainmaker
Thanks for reporting back and for your efforts. Looks like I'm stuck with uTorrent Mac for a while longer yet.  :-\

Re: Compiling latest qBittorrent with MacPorts package manager

Posted: Sun Aug 02, 2015 1:07 pm
by ignas2526
[quote="Rainmaker"]
Thanks for reporting back and for your efforts. Looks like I'm stuck with uTorrent Mac for a while longer yet.  :-\
[/quote]
How come? Is it because of the issues I've listed? Are you having them too?
Try running 3.2.2 I've compiled. Maybe you won't have issues I'm having.

Re: Compiling latest qBittorrent with MacPorts package manager

Posted: Sun Aug 02, 2015 7:49 pm
by Rainmaker
[quote="ignas2526"]
How come? Is it because of the issues I've listed? Are you having them too?
Try running 3.2.2 I've compiled. Maybe you won't have issues I'm having.
[/quote]

Fair point. I'll install it later if/when I get chance and report back. Thanks for taking the time to compile and for getting it to build successfully. :)

Re: Compiling latest qBittorrent with MacPorts package manager

Posted: Sun Aug 02, 2015 8:19 pm
by Rainmaker
Your 3.3.2 build wouldn't launch at all for me mate. It seems it's calling on specific libraries/dependencies in /opt rather than having them bundled in the package (I assume you got these via MacPorts or whatever). Thanks anyway, I know you must have spent some sweat on this! Also funny that 3.3.3 is out already... we need to catch a break lol.

Re: Compiling latest qBittorrent with MacPorts package manager

Posted: Wed Aug 05, 2015 10:48 pm
by sledgehammer_999
Can you guys test my "test build"??? -> http://builds.shiki.hu/temp/qbittorrent ... _build.dmg

Re: Compiling latest qBittorrent with MacPorts package manager

Posted: Wed Aug 05, 2015 10:51 pm
by Rainmaker
[quote="sledgehammer_999"]
Can you guys test my "test build"??? -> http://builds.shiki.hu/temp/qbittorrent ... _build.dmg
[/quote]

I'll be able to test in an hour or so if nobody else gets there first. I'll let you know mate. Cheers!

Re: Compiling latest qBittorrent with MacPorts package manager

Posted: Thu Aug 06, 2015 12:21 am
by Rainmaker
[quote="sledgehammer_999"]
Can you guys test my "test build"??? -> http://builds.shiki.hu/temp/qbittorrent ... _build.dmg
[/quote]

Works great on my 2012 MBP (OS X 10.10.4).  Thanks! 8)

EDIT: I don't want to take the pee, as I know you must be busy enough!... But if you ever got around to it would you consider a quick guide on how you compiled for future reference? I don't mind contributing builds in the future, so long as I know how to do it! I compile qBittorrent on Linux without issues but the Mac compile had me running into issues constantly. Just an idea. Thanks again.

Re: Compiling latest qBittorrent with MacPorts package manager

Posted: Thu Aug 06, 2015 4:09 pm
by sledgehammer_999
Can you try my final build that uses libtorrent 1.0.6 and confirm that it launches? (I want to upload it to sf.net)
Link: http://builds.shiki.hu/temp/qbittorrent_3.2.3_final.dmg

[quote="Rainmaker"]
[quote="sledgehammer_999"]
Can you guys test my "test build"??? -> http://builds.shiki.hu/temp/qbittorrent ... _build.dmg
[/quote]

Works great on my 2012 MBP (OS X 10.10.4).  Thanks! 8)

EDIT: I don't want to take the pee, as I know you must be busy enough!... But if you ever got around to it would you consider a quick guide on how you compiled for future reference? I don't mind contributing builds in the future, so long as I know how to do it! I compile qBittorrent on Linux without issues but the Mac compile had me running into issues constantly. Just an idea. Thanks again.
[/quote]

(keep in mind that I have a clean environment)

Code: Select all

brew install --build-bottle openssl
brew install --build-bottle boost
brew install --build-bottle geoip
brew install --build-bottle libtorrent-rasterbar
brew install --build-bottle qt4
brew install gnu-sed
I install gnu-sed because Mac OS X's sed garbles the conf.pri output. Installing it will not be needed after this bug is fixed: https://github.com/qbittorrent/qBittorrent/issues/3169
(also you may need gawk)
I use "--build-bottle" because it builds for the oldest supported CPU (IIRC core 2 duo). This is why the previous releases were failing. They were built for newer CPUs.

Then you extract the qbt source, you download and put GeoIP.dat to src/gui/geoip and issue:

Code: Select all

./configure --disable-qt-bus
Finally:

Code: Select all

macdeployqt src/qbittorrent.app -dmg
And that gives you a .dmg file in src/

However there are 2 problems with my package that I can't seem to solve:
1. HTTPS doesn't work. Try it with an RSS feed. If you put HTTPS in front of it, it doesn't download. If you change it to HTTP it will download. QtNetwork is responsible for this. My hunch is that it doesn't "see openssl". However, I don't know how to solve this yet.
2. macdeployqt doesn't copy the necessary qt plugins into the folder structure. This makes qbt unable to load jpg/gif/ico icons. (look at the tracker icons at the sidepanel. They should have icons).

Re: Compiling latest qBittorrent with MacPorts package manager

Posted: Fri Aug 07, 2015 2:58 pm
by Rainmaker
[quote="sledgehammer_999"]
Can you try my final build that uses libtorrent 1.0.6 and confirm that it launches? (I want to upload it to sf.net)
Link: http://builds.shiki.hu/temp/qbittorrent_3.2.3_final.dmg[/quote]

So sorry for the delay replying this time. I had surgery recently, still recovering. I can confirm the final build installs and opens perfectly for me (2012 MBP with Core i5, 4GB RAM, OS X Yosemite 10.10.4).

Search works, downloading from search works, importing magnets and torrents works and SOCKS5 works. The only thing I did notice was favicons for https trackers are still failing (404) but I think I remember you saying that was a known issue.

Thanks so much for the info on compiling. I'll have a play around later and see if I can get it working. At least then there's an extra person contributing builds when new releases come out.

Re: Compiling latest qBittorrent with MacPorts package manager

Posted: Sat Aug 08, 2015 11:18 am
by sledgehammer_999
I am sorry for your surgery.
Anyway I uploaded another build to sf.net. This build seems to also work for HTTPS and have tracker icons in the sidepanel for me. Please test it and give me feedback.

Re: Compiling latest qBittorrent with MacPorts package manager

Posted: Sun Jul 17, 2016 8:29 pm
by ignas2526
Any news on compiling the 3.3.5 version for the mac? The 3.3.4 suffers from some very annoying bugs: the addition dialog gets stuck when adding multiple torrents and qBittorrent refuses keep some torrents: as soon as I close it, they vanish. Judging by the news 3.3.5 should fix them.
Edit: just restarted the program and every single torrent except for one are gone. Lately, it seems to me that qBittorrent lost it: the most basic things keep breaking... I feel that it is time to think about switching to a more stable torrent client.