Author Topic: Compiling latest qBittorrent with MacPorts package manager  (Read 48997 times)

ignas2526

  • Newbie
  • *
  • Posts: 16
  • Karma: +0/-0
    • View Profile
Re: Compiling latest qBittorrent with MacPorts package manager
« Reply #75 on: July 29, 2015, 04:31:14 PM »
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]
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?
« Last Edit: July 29, 2015, 05:24:59 PM by ignas2526 »

ignas2526

  • Newbie
  • *
  • Posts: 16
  • Karma: +0/-0
    • View Profile
Re: Compiling latest qBittorrent with MacPorts package manager
« Reply #76 on: August 02, 2015, 02:55:42 PM »
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.
« Last Edit: August 02, 2015, 03:02:03 PM by ignas2526 »

Rainmaker

  • Member
  • **
  • Posts: 35
  • Karma: +1/-0
    • View Profile
Re: Compiling latest qBittorrent with MacPorts package manager
« Reply #77 on: August 02, 2015, 02:58:52 PM »
Thanks for reporting back and for your efforts. Looks like I'm stuck with uTorrent Mac for a while longer yet.  :-\

ignas2526

  • Newbie
  • *
  • Posts: 16
  • Karma: +0/-0
    • View Profile
Re: Compiling latest qBittorrent with MacPorts package manager
« Reply #78 on: August 02, 2015, 03:07:07 PM »
Thanks for reporting back and for your efforts. Looks like I'm stuck with uTorrent Mac for a while longer yet.  :-\
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.

Rainmaker

  • Member
  • **
  • Posts: 35
  • Karma: +1/-0
    • View Profile
Re: Compiling latest qBittorrent with MacPorts package manager
« Reply #79 on: August 02, 2015, 09:49:00 PM »
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.

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. :)

Rainmaker

  • Member
  • **
  • Posts: 35
  • Karma: +1/-0
    • View Profile
Re: Compiling latest qBittorrent with MacPorts package manager
« Reply #80 on: August 02, 2015, 10:19:46 PM »
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.

sledgehammer_999

  • qBittorrent maintainer
  • Administrator
  • Forum addict
  • *****
  • Posts: 2398
  • Karma: +148/-1
    • View Profile
Re: Compiling latest qBittorrent with MacPorts package manager
« Reply #81 on: August 06, 2015, 12:48:30 AM »

Rainmaker

  • Member
  • **
  • Posts: 35
  • Karma: +1/-0
    • View Profile
Re: Compiling latest qBittorrent with MacPorts package manager
« Reply #82 on: August 06, 2015, 12:51:38 AM »
Can you guys test my "test build"??? -> http://builds.shiki.hu/temp/qbittorrent_3.2.3_really_a_test_build.dmg

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

Rainmaker

  • Member
  • **
  • Posts: 35
  • Karma: +1/-0
    • View Profile
Re: Compiling latest qBittorrent with MacPorts package manager
« Reply #83 on: August 06, 2015, 02:21:30 AM »
Can you guys test my "test build"??? -> http://builds.shiki.hu/temp/qbittorrent_3.2.3_really_a_test_build.dmg

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.
« Last Edit: August 06, 2015, 02:23:36 AM by Rainmaker »

sledgehammer_999

  • qBittorrent maintainer
  • Administrator
  • Forum addict
  • *****
  • Posts: 2398
  • Karma: +148/-1
    • View Profile
Re: Compiling latest qBittorrent with MacPorts package manager
« Reply #84 on: August 06, 2015, 06:09:36 PM »
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

Can you guys test my "test build"??? -> http://builds.shiki.hu/temp/qbittorrent_3.2.3_really_a_test_build.dmg

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.

(keep in mind that I have a clean environment)
Code: [Select]
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]
./configure --disable-qt-bus
Finally:
Code: [Select]
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).

Rainmaker

  • Member
  • **
  • Posts: 35
  • Karma: +1/-0
    • View Profile
Re: Compiling latest qBittorrent with MacPorts package manager
« Reply #85 on: August 07, 2015, 04:58:03 PM »
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

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.

sledgehammer_999

  • qBittorrent maintainer
  • Administrator
  • Forum addict
  • *****
  • Posts: 2398
  • Karma: +148/-1
    • View Profile
Re: Compiling latest qBittorrent with MacPorts package manager
« Reply #86 on: August 08, 2015, 01:18:49 PM »
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.

ignas2526

  • Newbie
  • *
  • Posts: 16
  • Karma: +0/-0
    • View Profile
Re: Compiling latest qBittorrent with MacPorts package manager
« Reply #87 on: July 17, 2016, 10:29:49 PM »
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.
« Last Edit: July 17, 2016, 10:35:56 PM by ignas2526 »