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

littletree76

  • Member
  • **
  • Posts: 67
  • Karma: +3/-0
    • View Profile
Re: Compiling latest qBittorrent with MacPorts package manager
« Reply #60 on: September 15, 2014, 12:56:49 AM »

Allow me to reiterate what must be done before running the two build scripts:

-- Install Xcode or Command Line Tools (part of Xcode distribution) according to details I have given at beginning of this thread.

-- Install MacPorts package management system and details are given in this thread as well.

-- Once MacPorts has been in place, install necessary/extra third-party Unix packages not bundled with Mac OS X. Note svn Unix client is packaged in subversion package and there is no such thing as svn package (sorry for causing confusion). There may be dependancies among these packages but MacPorts will take care of them automatically (likely qt4-mac depends on boost thus boost does not have to be included in port command line but it won't hurt specifying boost in command line). Note since the version of libtorrent installed through MacPorts is too old, do not specify it in the port command line, instead use the build script build-qbittorrent to build any version (refer to early portion of this thread for usage information). The compiler cache ccache is for accelerate compilation process and is optional (time saved is not too much). Use command "port installed" to confirm all installed packages.

sudo port install qt4-mac boost pkgconfig subversion ccache
port installed

To update MacPorts system and all installed Unix packages, run following command sequence regularly:

sudo port selfupdate
sudo port upgrade outdated
sudo port uninstall inactive

-- Download following three files from my Dropbox site for latest copies: https://www.dropbox.com/sh/45qkagvurvxh3tp/UX0Ni-BVK3
Take note of release dates of these three files (YYYY/MM/DD format):

build-libtorrent                   --  2014/08/04
build-qbittorrent                 --  2014/08/04
macxconf.pri.autotools      --  2014/07/21
-- used by build-qbittorrent temporary until maintainer has committed these changes into online GitHub repository https://github.com/qbittorrent/qBittorrent

-- Gather these three files in same directory and execute the two build scripts to build libtorrent library and qbittorrent application. Just type name of the scripts and press return when you can not remember command line syntax. After execution of build-qbittorrent script, a disk image file qbittorrent-<version>.dmg will appear in the same directory for standard installation in Mac OS X.

build-libtorrent -t libtorrent-1_0_2
-- Latest libtorrent version 1.0.2 only work with latest alpha version 3.2.0 but not release version 3.1.9.2 of libtorrent (requires libtorrent version 0.16.x).

build-qbittorrent -t master
-- master version means latest alpha version 3.2.0, use "-t release-3.1.9.2" for release version 3.1.9.2 of qbittorrent application.

Followings are what I have just done to build latest versions of qbittorrent with latest versions of libtorrent library and resultant disk image files can be downloaded from the Dropbox site. Peer discovery seems improved when qbittorrent 3.2.0 is built with latest version 1.0.2 of libtorrent library. Following is a log of compilation process for release version 3.1.9.2 of qbittorrent application when build script build-qbittorrent was executed:

Code: [Select]
Wangs-iMac:~/project/qbittorrent$ ./build-qbittorrent -t release-3.1.9.2
You might be prompted for administrator password.

- Compilation date: Mon Sep 15 06:46:07 SGT 2014
- Build version: release-3.1.9.2
- Source directory: release-3.1.9.2

- Environment variables during compilation:

ccache (compiler cache to enhance compilation speed):
CC=ccache clang
CXX=ccache clang++
CCACHE_PATH=/usr/bin
CCACHE_SLOPPINESS=file_macro,include_file_mtime,time_macros
CCACHE_DIR=/Users/littletree/Library/Caches/ccache
CCACHE_LOGFILE=/Users/littletree/Library/Caches/ccache.log
CCACHE_CPP2=
CCACHE_DISABLE=

pkg-config (executed in configure script):
QT_QMAKE=/opt/local/bin/qmake
PKG_CONFIG_PATH=/usr/local/lib/pkgconfig
Version of libtorrent-rasterbar library in use: 0.16.9

------------------------------------------------------------------------------------------------

Be patient, building process is on going ..................
Processor cores for multi-threading: 4

+ case $TAG in
+ /opt/local/bin/svn checkout --depth infinity https://github.com/qbittorrent/qBittorrent/tags/release-3.1.9.2 release-3.1.9.2
+ STATUS=0
+ set +x
Source code checked out successfully from svn repository.
Checked out revision 6005.


+ /opt/local/bin/port -q deactivate libtorrent-rasterbar
++ echo http://geolite.maxmind.com/download/geoip/database/GeoLiteCountry/GeoIP.dat.gz
++ /usr/bin/sed 's/^..*\/\([^/][^/]*\)$/\1/'
+ GEOIP_FILE=GeoIP.dat.gz
+ /bin/rm -f GeoIP.dat.gz
+ /usr/bin/curl -LO http://geolite.maxmind.com/download/geoip/database/GeoLiteCountry/GeoIP.dat.gz
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100  403k  100  403k    0     0   125k      0  0:00:03  0:00:03 --:--:--  125k
+ case $TAG in
+ /usr/bin/gzip -cd GeoIP.dat.gz
+ case $TAG in
+ cd /Users/littletree/project/qbittorrent/release-3.1.9.2
+ /opt/local/bin/qmake qbittorrent.pro
+ /usr/bin/make --silent clean
Project MESSAGE: On Mac OS X, GeoIP database must be embedded.
Project MESSAGE: Project is built in RELEASE mode.
Project MESSAGE: Disabling debug output.
Project MESSAGE: GeoIP.dat was found in src/geoip/.
Project MESSAGE: qtAddLibrary: found framework QtXml in directory /opt/local/Library/Frameworks
Project MESSAGE: qtAddLibrary: found framework QtGui in directory /opt/local/Library/Frameworks
Project MESSAGE: qtAddLibrary: found framework QtNetwork in directory /opt/local/Library/Frameworks
Project MESSAGE: qtAddLibrary: found framework QtCore in directory /opt/local/Library/Frameworks
+ /usr/bin/make -j4
+ STATUS=0
+ set +x
WARNING:
WARNING: "qbittorrent.app/Contents/Resources/qt.conf" already exists, will not overwrite.
WARNING: To make sure the plugins are loaded from the correct location,
WARNING: please make sure qt.conf contains the following lines:
WARNING: [Paths]
WARNING:   Plugins = PlugIns


cache directory                     /Users/littletree/Library/Caches/ccache
cache hit (direct)                     9
cache hit (preprocessed)               0
cache miss                           212
called for link                        2
called for preprocessing              13
preprocessor error                     1
bad compiler arguments                 2
autoconf compile/link                 26
no input file                         11
files in cache                       795
cache size                          36.9 Mbytes
max cache size                     500.0 Mbytes

------------------------------------------------------------------------------------------------------------------------------
All done, resultant log files and application installation file are located in directory /Users/littletree/project/qbittorrent
------------------------------------------------------------------------------------------------------------------------------

littletree76

  • Member
  • **
  • Posts: 67
  • Karma: +3/-0
    • View Profile
Xcode/Command Line Tools upgrade
« Reply #61 on: September 19, 2014, 05:35:43 PM »

Just upgraded Mac OS X from 10.9.4 to 10.9.5 and Xcode from version 5.1.1 to version 6.0.1 (corresponding upgrade for Command Line Tools available for download as well). I noticed that I have used older version of libtorrent (version 0.16.9) instead of latest version 0.16.18 for previous build of release version 3.1.9.2 of qbittorrent application. Thus I have rebuild both versions (3.1.9.2 and 3.2.0) of qbittorrent application with latest compatible releases (0.16.18 and 1.0.2) of libtorrent library.

Both disk image files ready for installation in Mac OS 10.9.5 are available for download at Dropbox site together with the two shell script files (build-libtorrent, build-qbittorrent) and a configuration file (macxconf.pri.autotools) for building everything (make sure you have installed Xcode/Command Line Tools and MacPorts with required Unix packages first).

./build-libtorrent -t libtorrent-0_16_18
./build-qbittorrent -t release-3.1.9.2

./build-libtorrent -t libtorrent-1_0_2
./build-qbittorrent -t master

Dropbox site: https://www.dropbox.com/sh/45qkagvurvxh3tp/UX0Ni-BVK3

littletree76

  • Member
  • **
  • Posts: 67
  • Karma: +3/-0
    • View Profile
Compiling new release 3.1.10
« Reply #62 on: September 28, 2014, 02:15:00 AM »

Today I have attempted compilation of new release 3.1.10 (released 7 days ago). Note there is oversight in build script build-qbittorrent which does not cater for three-digit release number (3.1.x instead of 3.1.x.x). I have updated the shell script and uploaded to Dropbox site for public access. So make sure you have downloaded following three files from the Dropbox site before attempting to compile the new release: build-libtorrent, build-qbittorrent and macxconfig.pri.autotools

Once the three files have been downloaded to a common folder, issue following commands in Terminal application for fully automated compilation (again Xcode and MacPorts and required Unix packages must be installed first, see my earlier posts in this thread. I am using Xcode 6.0.1, MacPorts 2.3.1 in Mac OS 10.9.5 without issue).

./build-libtorrent -t libtorrent-0_16_18
./build-qbittorrent -t release-3.1.10

Unfortunately there are some incompatibilities in source code when you try to compile them in Mac OS X environment (see last 50 lines of make.log file after compilation as shown below), awaiting maintainer to fix these issues before I can attempt to compile again hopefully within next week. Complete make.log file is attached with this note for members to download and provide some enlightenments.

If you really have to compile qbittorrent in Mac OX (10.9.5) right now, you may try with the latest alpha version 3.2.0 as follows (note support for different version of libtorrent library). Alternatively you may just download the resultant disk image file qbittorrent-master.dmg I have just uploaded to Dropbox site for immediate installation in Mac OS 10.9.5.

./build-libtorrent -t libtorrent-1_0_2
./build-qbittorrent -t master

I haven't encounter any serious bug in using the alpha version 3.2.0 of qbittorrent application yet but if you do please let the maintainer know about it for rectification in source code.

Code: [Select]
Wangs-iMac:~/project/qbittorrent$ tail -50 make.log
misc.cpp:140:7: error: reference to overloaded function could not be resolved; did you mean to call it?
  if (sleep)
      ^~~~~
/usr/include/unistd.h:475:3: note: possible target for call
         sleep(unsigned int) __DARWIN_ALIAS_C(sleep);
         ^
/usr/local/include/libtorrent/thread.hpp:59:22: note: possible target for call
        TORRENT_EXPORT void sleep(int milliseconds);
                            ^
fs_utils.cpp:378:15: warning: 'FSFindFolder' is deprecated: first deprecated in OS X 10.8 [-Wdeprecated-declarations]
  OSErr err = FSFindFolder(kUserDomain, kApplicationSupportFolderType, false, &ref);
              ^
/System/Library/Frameworks/CoreServices.framework/Frameworks/CarbonCore.framework/Headers/Folders.h:286:1: note: 'FSFindFolder' has been explicitly marked deprecated here
FSFindFolder(
^
fs_utils.cpp:383:7: warning: 'FSRefMakePath' is deprecated: first deprecated in OS X 10.8 [-Wdeprecated-declarations]
  if (FSRefMakePath(&ref, reinterpret_cast<UInt8 *>(ba.data()), ba.size()) == noErr)
      ^
/System/Library/Frameworks/CoreServices.framework/Frameworks/CarbonCore.framework/Headers/Files.h:4086:18: note: 'FSRefMakePath' has been explicitly marked deprecated here
extern OSStatus  FSRefMakePath(const FSRef *ref, UInt8 *path, UInt32 pathBufferSize)     __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_0, __MAC_10_8, __IPHONE_NA, __IPHONE_NA);
                 ^
fs_utils.cpp:405:15: warning: 'FSFindFolder' is deprecated: first deprecated in OS X 10.8 [-Wdeprecated-declarations]
  OSErr err = FSFindFolder(kUserDomain, kCachedDataFolderType, false, &ref);
              ^
/System/Library/Frameworks/CoreServices.framework/Frameworks/CarbonCore.framework/Headers/Folders.h:286:1: note: 'FSFindFolder' has been explicitly marked deprecated here
FSFindFolder(
^
fs_utils.cpp:410:7: warning: 'FSRefMakePath' is deprecated: first deprecated in OS X 10.8 [-Wdeprecated-declarations]
  if (FSRefMakePath(&ref, reinterpret_cast<UInt8 *>(ba.data()), ba.size()) == noErr)
      ^
/System/Library/Frameworks/CoreServices.framework/Frameworks/CarbonCore.framework/Headers/Files.h:4086:18: note: 'FSRefMakePath' has been explicitly marked deprecated here
extern OSStatus  FSRefMakePath(const FSRef *ref, UInt8 *path, UInt32 pathBufferSize)     __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_0, __MAC_10_8, __IPHONE_NA, __IPHONE_NA);
                 ^
misc.cpp:141:5: error: use of undeclared identifier 'EventToSend'
    EventToSend = kAESleep;
    ^
misc.cpp:143:5: error: use of undeclared identifier 'EventToSend'
    EventToSend = kAEShutDown;
    ^
misc.cpp:142:3: warning: add explicit braces to avoid dangling else [-Wdangling-else]
  else
  ^
misc.cpp:159:47: error: use of undeclared identifier 'EventToSend'
  error = AECreateAppleEvent(kCoreEventClass, EventToSend, &targetDesc,
                                              ^
1 warning and 4 errors generated.
make[1]: *** [misc.o] Error 1
make[1]: *** Waiting for unfinished jobs....
4 warnings generated.
make: *** [sub-src-make_default] Error 2
« Last Edit: September 28, 2014, 03:12:17 AM by littletree76 »

littletree76

  • Member
  • **
  • Posts: 67
  • Karma: +3/-0
    • View Profile
Successful compilation for latest release 3.1.10
« Reply #63 on: October 06, 2014, 03:41:30 AM »

Necessary fixes have just been committed into branch v3_1_x of qbittorrent source tree. I have modified build script build-qbittorrent to include branch beside release tag of source tree so that users can compile latest source code with necessary fixes incorporated as follows:

./build-libtorrent -t libtorrent-0_16_18
./build-qbittorrent -b v3_1_x

Take note command line option t for tag and option b for branch. Once these fixes have been released with tag 3.1.10, you should be able to compile qbittorrent application as follows to produce disk image file qbittorrent-release-3.1.10.dmg for installation in Mac OS X.

./build-libtorrent -t libtorrent-0-16-18
./build-qbittorrent -t release-3.1.10

I have done just that to produce new disk image file: qbittorrent-v3_1_x.dmg ready for installation in Mac OS 10.9.5. Both build scripts (libtorrent and qbittorrent) and the disk image files have been uploaded to Dropbox site for free download.

https://www.dropbox.com/sh/45qkagvurvxh3tp/UX0Ni-BVK3
« Last Edit: October 06, 2014, 03:46:42 AM by littletree76 »

littletree76

  • Member
  • **
  • Posts: 67
  • Karma: +3/-0
    • View Profile
Mac OS 10.10 Yosemite with Xcode/Command Line Tools 6.1
« Reply #64 on: October 18, 2014, 10:56:17 AM »

Few hours after Apple announced availability of Mac OS 10.10 Yosemite at Mac App Store for free upgrade in the Apple event, I upgraded Mac OS 10.9.5 on my iMac. Today I also upgraded Xcode/Command Line Tools from version 6.0.1 to latest version 6.1. There are few commits in source code of libtorrent (branch version 1.0.3 available) and qbittorrent to be picked up as well.

Unfortunately compiling Alpha version 3.2.0 qbittorrent with branch version 1.0.3 of libtorrent failed with following error messages in make log file:

/usr/bin/clang++ -headerpad_max_install_names -arch x86_64 -Xarch_x86_64 -mmacosx-version-min=10.10 -o qbittorrent.app/Contents/MacOS/qbittorrent qtsingleapplication.o qtlocalpeer.o qbtsession.o qtorrenthandle.o torrentspeedmonitor.o alertdispatcher.o torrentstatistics.o torrentmodel.o shutdownconfirm.o httpserver.o httpconnection.o httprequestparser.o httpresponsegenerator.o btjson.o prefjson.o httpheader.o httprequestheader.o httpresponseheader.o json_parser.o json_scanner.o parser.o serializer.o qtracker.o options_imp.o preferences.o lineedit.o propertieswidget.o peerlistwidget.o trackerlist.o proptabbar.o downloadedpiecesbar.o pieceavailabilitybar.o searchengine.o searchtab.o engineselectdlg.o rss_imp.o rsssettingsdlg.o feedlistwidget.o rssmanager.o rssfeed.o rssfolder.o rssarticle.o automatedrssdownloader.o rssdownloadrule.o rssdownloadrulelist.o cookiesdlg.o rssfile.o rssparser.o torrentcreatordlg.o torrentcreatorthread.o geoipmanager.o powermanagement.o main.o downloadthread.o scannedfoldersmodel.o misc.o fs_utils.o smtp.o dnsupdater.o mainwindow.o ico.o transferlistwidget.o torrentcontentmodel.o torrentcontentmodelitem.o torrentcontentmodelfolder.o torrentcontentmodelfile.o torrentcontentfiltermodel.o sessionapplication.o torrentimportdlg.o executionlog.o previewselect.o iconprovider.o updownratiodlg.o loglistwidget.o addnewtorrentdialog.o autoexpandabledialog.o statsdialog.o messageboxraised.o statussortfilterproxymodel.o qmacapplication.o programupdater.o moc_qtsingleapplication.o moc_qtlocalpeer.o moc_qbtsession.o moc_bandwidthscheduler.o moc_torrentspeedmonitor.o moc_filterparserthread.o moc_alertdispatcher.o moc_torrentstatistics.o moc_torrentmodel.o moc_shutdownconfirm.o moc_httpserver.o moc_httpconnection.o moc_qtracker.o moc_options_imp.o moc_advancedsettings.o moc_preferences.o moc_lineedit.o moc_propertieswidget.o moc_peerlistwidget.o moc_proplistdelegate.o moc_trackerlist.o moc_downloadedpiecesbar.o moc_peerlistdelegate.o moc_peerlistsortmodel.o moc_peeraddition.o moc_trackersadditiondlg.o moc_pieceavailabilitybar.o moc_proptabbar.o moc_searchengine.o moc_searchtab.o moc_engineselectdlg.o moc_pluginsource.o moc_searchlistdelegate.o moc_supportedengines.o moc_searchsortmodel.o moc_rss_imp.o moc_rsssettingsdlg.o moc_feedlistwidget.o moc_rssmanager.o moc_rssfeed.o moc_rssfolder.o moc_rssarticle.o moc_automatedrssdownloader.o moc_cookiesdlg.o moc_rssparser.o moc_torrentcreatordlg.o moc_torrentcreatorthread.o moc_geoipmanager.o moc_powermanagement.o moc_downloadthread.o moc_filesystemwatcher.o moc_scannedfoldersmodel.o moc_qinisettings.o moc_smtp.o moc_dnsupdater.o moc_mainwindow.o moc_transferlistwidget.o moc_transferlistdelegate.o moc_transferlistfilterswidget.o moc_transferlistsortmodel.o moc_torrentcontentmodel.o moc_torrentcontentfiltermodel.o moc_deletionconfirmationdlg.o moc_statusbar.o moc_reverseresolution.o moc_speedlimitdlg.o moc_about_imp.o moc_previewselect.o moc_previewlistdelegate.o moc_downloadfromurldlg.o moc_trackerlogin.o moc_sessionapplication.o moc_torrentimportdlg.o moc_executionlog.o moc_updownratiodlg.o moc_loglistwidget.o moc_addnewtorrentdialog.o moc_autoexpandabledialog.o moc_statsdialog.o moc_messageboxraised.o moc_statussortfilterproxymodel.o moc_qmacapplication.o moc_programupdater.o qrc_icons.o qrc_lang.o qrc_about.o qrc_webui.o qrc_lineeditimages.o qrc_search.o qrc_geoip.o   -F/opt/local/Library/Frameworks -F/opt/local/lib  -L/opt/local/lib -L/usr/local/lib -ltorrent-rasterbar -lz -lboost_system-mt -framework Carbon -framework IOKit -F/opt/local/Library/Frameworks -F/opt/local/lib -framework QtXml -framework QtCore -framework QtGui -framework QtNetwork
Undefined symbols for architecture x86_64:
  "libtorrent::base32decode(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&)", referenced from:
      misc::magnetUriToHash(QString const&) in misc.o
  "libtorrent::has_parent_path(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&)", referenced from:
      TorrentImportDlg::on_browseContentBtn_clicked() in torrentimportdlg.o
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make[1]: *** [qbittorrent.app/Contents/MacOS/qbittorrent] Error 1
make: *** [sub-src-make_default] Error 2

So I have to revert back to release tag version 1.0.2 of libtorrent to compile with source code of latest version 3.2.0 qbittorrent application. Followings are what I have done to upgrade MacPorts to match with new Mac OS X and to proceed with the compilation.

-- To install latest version 6.1 of Command Line Tools (for compiler, linker etc):
Issue this command "xcode-select --install" in Terminal application and click on Install button when prompted with popup.

-- Download right version of package file from following website to upgrade MacPorts from version 2.3.1 (for Mac OS Mavericks) to version 2.3.2 (for Mac OS Yosemite).
https://www.macports.org/install.php

-- Once new MacPorts is in place, issue following commands in Terminal application to upgrade the rest of MacPorts components and all Unix third-party packages (take some time to complete):
sudo port selfupdate
sudo port upgrade outdated
sudo port uninstall inactive

-- Compile qbittorrent application with right combinations of versions for source code of qbittorrent application and libtorrent library with build scripts.

For release version 3.1.10 of qbittorrent:

./build-libtorrent -b RC_0_16                (latest branch version)
./qbittorrent -b v3_1_x                          (latest branch version)

For Alpha version 3.2.0 of qbittorrent:

./build-libtorrent -t libtorrent-1_0_2       (latest tag release version)
./qbittorrent -b master                           (latest alpha version)

Note I have updated both build scripts to change command line option for master/truck version from t (for tag release) to b (for branch release) as now both scripts must cater to branch releases and strictly speaking master/truck version has to be considered as branch of source tree but not tag release. Previously both scripts catered to only tag but not branch releases.

All updated build scripts and resultant disk image files have been uploaded to usual Dropbox site for free download: https://www.dropbox.com/sh/45qkagvurvxh3tp/UX0Ni-BVK3
Take note this is probably the last time I compile for Mac OS 10.9.x Mavericks platform (disk image files in mavericks folder in the Dropbox site), you have to compile on your own with the two build scripts and macxconf.pri.autotools configuration file for any future releases of libtorrent/qbittorrent in the old Mac OS 10.9.x Mavericks environment. I will continue to build future versions of qbittorrent application in new Mac OS 10.10.x Yosemite environment and place them in yosemite folder in the Dropbox site.

It is definitely worth to upgrade from Mavericks to Yosemite when your Mac hardware can support the new Mac OS X, every operation become snappier with eye pleasing icon/theme. Over short period of time, Apple will iron out those trivial issues with the new Mac OS X.


Nemo

  • qBittorrent Forum
  • Administrator
  • Forum addict
  • *****
  • Posts: 1518
  • Karma: +94/-0
    • View Profile
Re: Compiling latest qBittorrent with MacPorts package manager
« Reply #65 on: October 18, 2014, 05:02:50 PM »
Thanks for your time and efforts mate.
Forum Rules and Guidelines

Forum Admin.
Dutch & Turkish Translator.




littletree76

  • Member
  • **
  • Posts: 67
  • Karma: +3/-0
    • View Profile
Lastet builds for release version 3.1.11 and alpha version 3.2.0
« Reply #66 on: October 27, 2014, 09:35:23 AM »

Both versions have been compiled successfully in Mac OS 10.10 and tested in Mac OS 10.10 Yosemite and previous Mac OS 10.9.5 Mavericks without issue. Thus there is no need for different builds between these two versions of Mac OS X and all old builds have been removed from my Dropbox site and the latest builds have been uploaded for free download.

These builds are linked statically as self-contained application thus no extra library installation is required for execution. Just drag the application file from mounted disk image to the Applications folder and then run it just like any other applications.

MrGreg

  • Member
  • **
  • Posts: 44
  • Karma: +2/-0
    • View Profile
Re: Compiling latest qBittorrent with MacPorts package manager
« Reply #67 on: October 30, 2014, 05:41:27 AM »
Hi Littletree,

So does this mean you have successfully built Alpha version 3.2.0 qbittorrent with branch version 1.0.3 of libtorrent? Or is your latest alpha release based on libtorrent 1.0.2? Thanks...

littletree76

  • Member
  • **
  • Posts: 67
  • Karma: +3/-0
    • View Profile
Lastet builds for release version 3.1.11 and alpha version 3.2.0
« Reply #68 on: October 30, 2014, 05:51:12 AM »

Libraries used in compiling latest version of qbittorrent application:

Alpha version 3.2.0 (source not compatible with branch version 1.0.3 of libtorrent library yet).
libtorrent - release version 1.0.2
boost  - 1.56
qt-mac - 4.86

Release version 3.1.11 (source not compatible with any version of libtorrent above 1.x ).
libtorrent - branch version 0.16.18 (with latest fixes implemented)
boost - 1.56
qt-mac - 4.86
« Last Edit: October 30, 2014, 05:53:33 AM by littletree76 »

Nemo

  • qBittorrent Forum
  • Administrator
  • Forum addict
  • *****
  • Posts: 1518
  • Karma: +94/-0
    • View Profile
Re: Compiling latest qBittorrent with MacPorts package manager
« Reply #69 on: October 30, 2014, 09:08:28 PM »
Thanks littletree76.
Forum Rules and Guidelines

Forum Admin.
Dutch & Turkish Translator.




littletree76

  • Member
  • **
  • Posts: 67
  • Karma: +3/-0
    • View Profile
New builds for both 3.1.11 and 3.2.0 versions
« Reply #70 on: November 06, 2014, 03:36:02 PM »

I have recompiled both versions (3.2.0 and 3.1.11) in freshly installed Mac OS 10.10 Yosemite environment (because iMac crashed by booting into safe mode and 4TB data migration to new LaCie RAID storage connected to the iMac) with latest Xcode 6.1 and only tag release versions of libtorrent (1.0.2 and 0.16.18 respectively to versions of qbittorrent application). The resultant disk image files for direct installation (they are statically linked thus no library installation required) are available at usual Dropbox site.

Both versions have been tested in Mac OS 10.10 Yosemite on my mid-2011 iMac and Mac OS 10.9.5 Mavericks on mid-2012 Macbook pro (borrowed from colleague in office with standard Mac OS 10.9.5 installation) and with my test torrent (available at the Dropbox site as well) with very good download bandwidth (10 MiB/sec for 100 Mbps broadband Internet connection) and without any issues. Thus just make sure that users received the same disk image files as in the Dropbox site.

https://www.dropbox.com/sh/45qkagvurvxh3tp/UX0Ni-BVK3

For those users who are still using Mac OS X older than 10.9.x version (two generations away mainly because their rather old Mac hardwares do not support newer Mac OS X) , if the pre-compiled qbittorrent application does not work then they have to compile with the two build scripts also available at the Dropbox site. Of course you have to install Xcode or Command Line Tools and MacPorts first before running the two build scripts as follows:

-- Xcode or Command Line Tools
Download latest Xcode from Mac App Store or Apple developer site (with free account registration) for any older versions. To install Command Line Tools without the huge Xcode installation, just issue following command in Terminal application (Apple Darwin Unix):
xcode-select --install

--MacPorts Unix package manager for porting any required third-party Unix packages for compilation.
Download readily available installer (correspond to your Mac OS X version) from following site and follow instructions on display to install. Once installed port command will be available for execution in Apple Darwin Unix environment. After MacPorts installation is done, issue command "sudo port selfupdate" to update the port map.
https://www.macports.org/install.php

-- Porting of all required third-party Unix packages.
Issue following command line in Terminal application as super user to transfer raw source files for compilation on your Mac (it takes some time for such number of packages and note libtorrent package is not required since it has been handled by build-libtorrent shell script as follows).
sudo port install qt4-mac boost pkgconfig subversion ccache

-- Run the build scripts to build libtorrent library and qbittorrent application in Unix environment on your Mac.
./build-libtorrent -t libtorrent-0_16_18 for qbittorrent 3.1.11
or:
./build-libtorrent -t libtorrent-1_0_2 for qbittorrent 3.2.0
followed by:
./build-qbittorrent -t release-3.1.11 for qbittorrent 3.1.11
or:
./build-qbittorrent -b master for qbittorrent 3.2.0

If your are using Hackintosh (hacked Mac OS X installed on PC machine) or other non-standard Mac OS X installations, then probably you can forget about qbittorrent application when the precompiled versions and the build scripts do not work on your Mac (I do not know how to fix your problem).

littletree76

  • Member
  • **
  • Posts: 67
  • Karma: +3/-0
    • View Profile
Re: Compiling latest qBittorrent with MacPorts package manager
« Reply #71 on: January 17, 2015, 11:20:03 AM »
Finally first project for my new job is coming to end and I can find time to pick up where I left off for qbittorrent.

Today I have attempted compilation with all lastest versions of libtorrent-rasterbar, boost and qbittorrent using latest release of Xcode 6.1.1 and updated Macports 2.3.3. Since libtorrent-rasterbar 1.0.3 has been released in Macports system, I have reverted from former version hosted in the SVN site: svn.code.sf.net to the Macports version in my build-qbittorrent script. So the build script build-libtorrent is no longer needed for this build.

Mac OS 10.10.1
Xcdoe or Command Line Tools - 6.1.1
Macports - 2.3.3
qt4-mac - 4.8.6 (installed through Macports)
boost - 1.57 (installed through Macports)
libtorrent-rasterbar - 1.0.3 (installed through Macports)
qbittorrent - 3.2.0 (checked out from github.com/qbittorrent/qBittorrent on 17-Jan-2015)

There is a problem in configure script bundled with the checked out trunk (master) version of qbittorrent. Particularly in this script, the sed command processes argument list wrongly and variable QBT_CONF_EXTRA_CFLAGS has been set with entirely wrong value. As such the automatic configuration process aborts and no Makefile is generated. Nevertheless this problem has been circumvented in my build-qbittorrent script temporarily until permanent fix is released. The configuration process able to proceed with proper Makefile generated. This was the biggest problem encountered by those who have attempted qbittorrent compilation with my build-qbittorrent script.

However after make command is initiated in build-qbittorrent script to proceed with final compilation, following error occurs and remedy can only be done in source code by the maintainer. The complete make file (error happens from line 142 onward) is attached with this post for reference. I suppose this is a trivial font issue to be corrected in code for Mac OS version.

Code: [Select]
/usr/bin/clang++ -c -pipe -DTORRENT_USE_OPENSSL -DBOOST_ASIO_HASH_MAP_BUCKETS=1021 -DBOOST_EXCEPTION_DISABLE -DBOOST_ASIO_ENABLE_CANCELIO -DBOOST_ASIO_DYN_LINK -                   DTORRENT_LINKING_SHARED -I/opt/local/include/libtorrent -g -O2 -O2 -arch x86_64 -Xarch_x86_64 -mmacosx-version-min=10.10 -Wall -W -DWITH_GEOIP_EMBEDDED -DQT_NO_DEBUG_OUTPUT -      DVERSION_MAJOR=3 -DVERSION_MINOR=2 -DVERSION_BUGFIX=0 -DVERSION_BUILD=0 -DVERSION=\"v3.2.0alpha\" -DQT_NO_CAST_TO_ASCII -DQT_USE_FAST_CONCATENATION -DQT_USE_FAST_OPERATOR_PLUS -   DBOOST_FILESYSTEM_VERSION=2 -DQT_NO_DEBUG -DQT_XML_LIB -DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_CORE_LIB -DQT_SHARED -I/opt/local/share/qt4/mkspecs/macx-g++ -I. -I. -I/opt/local/Library/Frameworks/QtCore.framework/Versions/4/Headers -I/opt/local/Library/Frameworks/QtNetwork.framework/Versions/4/Headers -I/opt/local/Library/Frameworks/QtGui.framework/Versions/4/   Headers -I/opt/local/Library/Frameworks/QtXml.framework/Versions/4/Headers -I/usr/include/openssl -I/usr/include -I/opt/local/include/boost -I. -Iqtsingleapp -Iqtlibtorrent -      Iwebui -Iwebui/qjson -Itracker -Ipreferences -Ilineedit/src -Iproperties -Isearchengine -Irss -Itorrentcreator -Igeoip -Ipowermanagement -I/opt/local/Library/Frameworks/QtXml.     framework/Versions/4/Headers -I/opt/local/Library/Frameworks/QtGui.framework/Versions/4/Headers -I/opt/local/Library/Frameworks/QtNetwork.framework/Versions/4/Headers -I/opt/local/Library/Frameworks/QtCore.framework/Versions/4/Headers -I/opt/local/include -I. -F/opt/local/Library/Frameworks -F/opt/local/lib -o application.o application.cpp
/usr/bin/clang++ -c -pipe -DTORRENT_USE_OPENSSL -DBOOST_ASIO_HASH_MAP_BUCKETS=1021 -DBOOST_EXCEPTION_DISABLE -DBOOST_ASIO_ENABLE_CANCELIO -DBOOST_ASIO_DYN_LINK -                   DTORRENT_LINKING_SHARED -I/opt/local/include/libtorrent -g -O2 -O2 -arch x86_64 -Xarch_x86_64 -mmacosx-version-min=10.10 -Wall -W -DWITH_GEOIP_EMBEDDED -DQT_NO_DEBUG_OUTPUT -      DVERSION_MAJOR=3 -DVERSION_MINOR=2 -DVERSION_BUGFIX=0 -DVERSION_BUILD=0 -DVERSION=\"v3.2.0alpha\" -DQT_NO_CAST_TO_ASCII -DQT_USE_FAST_CONCATENATION -DQT_USE_FAST_OPERATOR_PLUS -   DBOOST_FILESYSTEM_VERSION=2 -DQT_NO_DEBUG -DQT_XML_LIB -DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_CORE_LIB -DQT_SHARED -I/opt/local/share/qt4/mkspecs/macx-g++ -I. -I. -I/opt/local/Library/Frameworks/QtCore.framework/Versions/4/Headers -I/opt/local/Library/Frameworks/QtNetwork.framework/Versions/4/Headers -I/opt/local/Library/Frameworks/QtGui.framework/Versions/4/   Headers -I/opt/local/Library/Frameworks/QtXml.framework/Versions/4/Headers -I/usr/include/openssl -I/usr/include -I/opt/local/include/boost -I. -Iqtsingleapp -Iqtlibtorrent -      Iwebui -Iwebui/qjson -Itracker -Ipreferences -Ilineedit/src -Iproperties -Isearchengine -Irss -Itorrentcreator -Igeoip -Ipowermanagement -I/opt/local/Library/Frameworks/QtXml.     framework/Versions/4/Headers -I/opt/local/Library/Frameworks/QtGui.framework/Versions/4/Headers -I/opt/local/Library/Frameworks/QtNetwork.framework/Versions/4/Headers -I/opt/local/Library/Frameworks/QtCore.framework/Versions/4/Headers -I/opt/local/include -I. -F/opt/local/Library/Frameworks -F/opt/local/lib -o mainwindow.o mainwindow.cpp
/usr/bin/clang++ -c -pipe -DTORRENT_USE_OPENSSL -DBOOST_ASIO_HASH_MAP_BUCKETS=1021 -DBOOST_EXCEPTION_DISABLE -DBOOST_ASIO_ENABLE_CANCELIO -DBOOST_ASIO_DYN_LINK -                   DTORRENT_LINKING_SHARED -I/opt/local/include/libtorrent -g -O2 -O2 -arch x86_64 -Xarch_x86_64 -mmacosx-version-min=10.10 -Wall -W -DWITH_GEOIP_EMBEDDED -DQT_NO_DEBUG_OUTPUT -      DVERSION_MAJOR=3 -DVERSION_MINOR=2 -DVERSION_BUGFIX=0 -DVERSION_BUILD=0 -DVERSION=\"v3.2.0alpha\" -DQT_NO_CAST_TO_ASCII -DQT_USE_FAST_CONCATENATION -DQT_USE_FAST_OPERATOR_PLUS -   DBOOST_FILESYSTEM_VERSION=2 -DQT_NO_DEBUG -DQT_XML_LIB -DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_CORE_LIB -DQT_SHARED -I/opt/local/share/qt4/mkspecs/macx-g++ -I. -I. -I/opt/local/Library/Frameworks/QtCore.framework/Versions/4/Headers -I/opt/local/Library/Frameworks/QtNetwork.framework/Versions/4/Headers -I/opt/local/Library/Frameworks/QtGui.framework/Versions/4/   Headers -I/opt/local/Library/Frameworks/QtXml.framework/Versions/4/Headers -I/usr/include/openssl -I/usr/include -I/opt/local/include/boost -I. -Iqtsingleapp -Iqtlibtorrent -      Iwebui -Iwebui/qjson -Itracker -Ipreferences -Ilineedit/src -Iproperties -Isearchengine -Irss -Itorrentcreator -Igeoip -Ipowermanagement -I/opt/local/Library/Frameworks/QtXml.     framework/Versions/4/Headers -I/opt/local/Library/Frameworks/QtGui.framework/Versions/4/Headers -I/opt/local/Library/Frameworks/QtNetwork.framework/Versions/4/Headers -I/opt/local/Library/Frameworks/QtCore.framework/Versions/4/Headers -I/opt/local/include -I. -F/opt/local/Library/Frameworks -F/opt/local/lib -o ico.o ico.cpp
application.cpp:50:9: error: incomplete type 'QFont' named in nested name specifier
        QFont::insertSubstitution(".Lucida Grande UI", "Lucida Grande");
        ^~~~~~~
/opt/local/include/QtCore/qmetatype.h:319:7: note: forward declaration of 'QFont'
class QFont;
      ^     
1 error generated.
make[1]: *** [application.o] Error 1
make[1]: *** Waiting for unfinished jobs....
make: *** [sub-src-make_default] Error 2
« Last Edit: January 17, 2015, 11:21:41 AM by littletree76 »

Rainmaker

  • Member
  • **
  • Posts: 35
  • Karma: +2/-0
    • View Profile
Re: Compiling latest qBittorrent with MacPorts package manager
« Reply #72 on: July 21, 2015, 07:51:47 AM »
I'm running Yosemite 10.10.4 and tried to compile the latest v3.2.1 from source. I followed the guide in the Wiki (over at Github) for using MacPorts but kept getting error2 messages on make. I then tried to follow the Brew instructions and that fails too. I then combed through this thread to try to glean some hints but got nowhere. :(

I eventually tried to run your scripts but it won't recognise 3_2_x and even when trying to run for trunk it says it can only build on version 3.1.x onwards. ARGH!  :o I've compiled and built 3.2.1 from source on Debian without issues and I'd love to build it for my MacBook Pro too. Windows gets new versions instantly but we're always waiting around for someone to hopefully build Linux and Mac apps. I'm happy to do them myself if only I could crack how.

Can anyone kindly offer some advice? I'm pulling out my hair!

ignas2526

  • Newbie
  • *
  • Posts: 16
  • Karma: +0/-0
    • View Profile
Re: Compiling latest qBittorrent with MacPorts package manager
« Reply #73 on: July 27, 2015, 04:47:57 PM »
Any luck with compiling version 3.2.1 on the mac?

Rainmaker

  • Member
  • **
  • Posts: 35
  • Karma: +2/-0
    • View Profile
Re: Compiling latest qBittorrent with MacPorts package manager
« Reply #74 on: July 27, 2015, 06:03:19 PM »
Any luck with compiling version 3.2.1 on the mac?

Not from me, but I did try a few more times. I'm a noob though (I'm only used to Linux). Hopefully littletree76 or one of the other gurus will help us out in time. We have to remember this is a community effort and nobody's getting paid for their time.  8)