This forum has been archived. All content is frozen. Please use KDE Discuss instead.

[How to] Compile 3.2beta1 under Ubuntu-Intrepid (gnome)

Tags: None
(comma "," separated)
anne_on_a_moose
Registered Member
Posts
28
Karma
0
OS
I had some trouble getting everything to work properly with the new release and Intrepid so I thought I'd share a "how-to" step-by-step for any other noobs in the audience.

1. open a terminal

2.
Code: Select all
sudo apt-get install ktorrent
(this step is only necessary if you run gnome instead of kde4. It will install all the pretty icons and make sure it looks right when running under gnome)

3.
Code: Select all
sudo apt-get install build-essential

4.
Code: Select all
sudo apt-get install automake

5.
Code: Select all
sudo apt-get build-dep ktorrent

6.
Code: Select all
sudo apt-get install libboost-dev

7.
Code: Select all
sudo aptitude install kdepimlibs5-dev

8.
Code: Select all
sudo apt-get install libgmp3-dev

9.
Code: Select all
sudo apt-get install libqca2-dev

10.
Code: Select all
sudo gedit /usr/share/kde4/apps/cmake/modules/KDELibsDependenciesInternal.cmake
(replace 'gedit' with your text editor- kate, etc)

11. **NOTE** This step is likely not needed anymore as the bug has been fixed in recent releases of kde4.2+)

change:
SET("solid_LIB_DEPENDS" "general;/usr/lib/libQtCore.so;general;/usr/lib/libQtDBus.so;general;/usr/lib/libQtXml.so;general;/usr/lib/libQtGui.so;general;/build/buildd/kde4libs-4.1.2/obj-i486-linux-gnu/lib/libkdecore.so;")

to:
SET("solid_LIB_DEPENDS" "general;/usr/lib/libQtCore.so;general;/usr/lib/libQtDBus.so;general;/usr/lib/libQtXml.so;general;/usr/lib/libQtGui.so;general;/usr/lib/libkdecore.so;")


change:
SET("solid_LIB_DEPENDS" "/usr/lib/libQtCore.so;/usr/lib/libQtDBus.so;/usr/lib/libQtXml.so;/usr/lib/libQtGui.so;/build/buildd/kde4libs-4.1.2/obj-i486-linux-gnu/lib/libkdecore.so;")

to:
SET("solid_LIB_DEPENDS" "/usr/lib/libQtCore.so;/usr/lib/libQtDBus.so;/usr/lib/libQtXml.so;/usr/lib/libQtGui.so;/usr/lib/libQtGui.so;general;/usr/lib/libkdecore.so;")

(see this post about the bug dealt with by the above changes if your curious about it)

12.
download and extract the source to your home folder.

13.
Code: Select all
cd ktorrent-3.2beta1

14.
Code: Select all
mkdir build

15.
Code: Select all
cd build

16.
Code: Select all
cmake -DCMAKE_INSTALL_PREFIX=$(kde4-config --prefix) ..

**note** if you get the following error:
Code: Select all
CMake Error at /usr/share/kde4/apps/cmake/modules/FindMsgfmt.cmake:22 (message):
 Could NOT find msgfmt program
it can be remedied by entering
Code: Select all
 sudo apt-get install gettext
and running step 15 again.
17.
Code: Select all
make -j4

18.
Code: Select all
sudo make install


**note**

to get rid of the annoying "kwallet launcher" and "httpcachecleaner" popups: create a file called "klaunchrc" with the following text:

[FeedbackStyle]
TaskbarButton=false

and move it to: ~/.kde/share/config/klaunchrc
(thanks to the poster here, I modified their suggestions to fit with this tutorial)

Last edited by anne_on_a_moose on Tue Mar 03, 2009 6:40 pm, edited 9 times in total.
coj
Registered Member
Posts
13
Karma
0

Sun Nov 23, 2008 2:16 pm
Thank you for providing this detail, I thought I was going mad trying to get v3.x.x working.

Could this topic be made a sticky?
anne_on_a_moose
Registered Member
Posts
28
Karma
0
OS

Sun Nov 23, 2008 3:14 pm
No problem, it's obviously a bit more involved than usual (mostly due to things on Intrepid's side) so I thought that sharing in the pain would be nice.

I absolutely love this software and would hate for anyone not to use it simply because they had a hard time compiling it.

Plus, I am absolutely worthless with code so I felt I should contribute about the only way I can.
MoDaX
Registered Member
Posts
241
Karma
0
OS

Sun Nov 23, 2008 5:58 pm
coj wrote:Could this topic be made a sticky?

Just because Ubuntu ships with broken kdelibs5-dev, the topic does not need to become sticky in KTorrent forum.
coj
Registered Member
Posts
13
Karma
0

Sun Nov 23, 2008 10:04 pm
MoDaX wrote:
coj wrote:Could this topic be made a sticky?

Just because Ubuntu ships with broken kdelibs5-dev, the topic does not need to become sticky in KTorrent forum.


So Ubuntu has a problem, therefore Ktorrent has a problem, which means people will go elsewhere or just give up, which seems rather sad.

Following your logic maybe the following should be removed from the download page:

"People on Mac OS X who have trouble compiling should try the following:

configure --prefix=/sw
sed -i -e 's/^whole_archive_flag_spec=.*/whole_archive_flag_spec=""/g;'
libtool
make
sudo make install

Thanks to Borre Gaup for bringing this to our attention. The problem is also explained here, other software might have the same problem.
"

Not everyone is a developer or full time linux guru, some are just users and with helpful posts on how to compile applications (irrespective of what is at fault) spreads the knowledge, rather than hammering search engines not getting any answers.

Last edited by coj on Sun Nov 23, 2008 10:52 pm, edited 2 times in total.
coj
Registered Member
Posts
13
Karma
0

Sun Nov 23, 2008 10:17 pm
ctarwater wrote:No problem, it's obviously a bit more involved than usual (mostly due to things on Intrepid's side) so I thought that sharing in the pain would be nice.

I absolutely love this software and would hate for anyone not to use it simply because they had a hard time compiling it.

Plus, I am absolutely worthless with code so I felt I should contribute about the only way I can.


Not as worthless as me :lol: Thanks again.
MoDaX
Registered Member
Posts
241
Karma
0
OS

Sun Nov 23, 2008 10:51 pm
coj wrote:So Ubuntu has a problem, therefore Ktorrent has a problem, which means people will go elsewhere or just give up, which seems rather sad.

Not everyone is a developer or full time linux guru, some are just users and with helpful posts on how to compile applications (irrespective of what is at fault) spreads the knowledge, rather than hammering search engines not getting any answers.

If Ubuntu has a problem, report it to them so they actually fix it but do not blame ktorrent for that. It is fine that you come for help. But some steps in that tutorial are to workaround ubuntu brokeness and might confuse users of other distros. Therefore, in my opinion, making this one a sticky would confuse people using other distros even more.
coj
Registered Member
Posts
13
Karma
0

Sun Nov 23, 2008 10:55 pm
I never blamed Ktorrent, merely looking for a solution that would get Ktorrent working.

Edited:
As pointed out above this is a known bug with Ubuntu - https://bugs.launchpad.net/ubuntu/+sour ... bug/299164 and proposed to be fixed in KDE 4.1.3
Lozbrown
Registered Member
Posts
1
Karma
0

Sun Dec 07, 2008 2:17 pm
I followed this procedure but unfortunately one of the commands fails.
Code: Select all
loz@gravity:~/ktorrent-3.2beta1/build$ cmake -DCMAKE_INSTALL_PREFIX=$(kde4-config --prefix) ..
-- Found Qt-Version 4.4.3 (using /usr/bin/qmake)
-- Found X11: /usr/lib/libX11.so
-- Found Threads: TRUE
-- Found Automoc4: /usr/bin/automoc4
-- Found Perl: /usr/bin/perl
-- Found KDE 4.1 include dir: /usr/include
-- Found KDE 4.1 library dir: /usr/lib
-- Found KDE4 kconfig_compiler preprocessor: /usr/bin/kconfig_compiler
-- Found automoc4: /usr/bin/automoc4
-- Found Strigi
-- Found Strigi: /usr/lib/libstreams.so
-- Strigi API is pre-screwup check, need 'char'
-- Could not find OPTIONAL package Plasma
-- Building KTorrent with DHT support (-DENABLE_DHT_SUPPORT=false to disable)
-- Building logviewer plugin (-DENABLE_LOGVIEWER_PLUGIN=false to disable)
-- Building infowidget plugin (-DENABLE_INFOWIDGET_PLUGIN=false to disable)
--    Compiling GeoIP support directly into InfoWidget plugin
-- Building upnp plugin (-DENABLE_UPNP_PLUGIN=false to disable)
-- Building search plugin (-DENABLE_SEARCH_PLUGIN=false to disable)
-- Building webinterface plugin (-DENABLE_WEBINTERFACE_PLUGIN=false to disable)
-- Building scanfolder plugin (-DENABLE_SCANFOLDER_PLUGIN=false to disable)
-- Building ipfilter plugin (-DENABLE_IPFILTER_PLUGIN=false to disable)
-- Building stats plugin (-DENABLE_STATS_PLUGIN=false to disable)
-- Building bwscheduler plugin (-DENABLE_BWSCHEDULER_PLUGIN=false to disable)
-- Building mediaplayer plugin (-DENABLE_MEDIAPLAYER_PLUGIN=false to disable)
-- Building scripting plugin (-DENABLE_SCRIPTING_PLUGIN=false to disable)
-- Building syndication plugin (-DENABLE_SYNDICATION_PLUGIN=false to disable)
CMake Error at /usr/share/kde4/apps/cmake/modules/FindKdepimLibs.cmake:98 (message):
  Could NOT find a kdepimlibs installation in /usr/include.

  Please build and install kdepimlibs first.
Call Stack (most recent call first):
  plugins/syndication/CMakeLists.txt:1 (find_package)


-- Configuring incomplete, errors occurred!
loz@gravity:~/ktorrent-3.2beta1/build$


Anyone have any suggestions what I'm doing wrong or how I can fix this?
Its a shame no-one has set a PPA repository for the development builds.
MoDaX
Registered Member
Posts
241
Karma
0
OS

Sun Dec 07, 2008 2:36 pm
aptitude install kdepimlibs5-dev
anne_on_a_moose
Registered Member
Posts
28
Karma
0
OS

Fixed

Sun Dec 07, 2008 5:00 pm
Right, sorry about that, updated the steps in the first post.
ukdoc
Registered Member
Posts
10
Karma
0

Thu Dec 11, 2008 1:44 pm
I followed these instructions to the letter. I get the following error:

Code: Select all

xxx@ubuntu:~/Downloads/kt/ktorrent-3.1.5/build$ cmake -DCMAKE_INSTALL_PREFIX=$(kde4-config --prefix) ..
-- Found Qt-Version 4.4.3 (using /usr/bin/qmake)
-- Found X11: /usr/lib/libX11.so
-- Found Automoc4: /usr/bin/automoc4
-- Found Perl: /usr/bin/perl
-- Found KDE 4.1 include dir: /usr/include
-- Found KDE 4.1 library dir: /usr/lib
-- Found KDE4 kconfig_compiler preprocessor: /usr/bin/kconfig_compiler
-- Found automoc4: /usr/bin/automoc4
CMake Error at /usr/share/kde4/apps/cmake/modules/FindPackageHandleStandardArgs.cmake:53 (MESSAGE):
  Could not find REQUIRED package GMP
Call Stack (most recent call first):
  /usr/share/kde4/apps/cmake/modules/FindGMP.cmake:21 (FIND_PACKAGE_HANDLE_STANDARD_ARGS)
  CMakeLists.txt:4 (find_package)


-- Configuring done



I've googled for the GMP problem to see if it's a generic thing but couldn't find anything useful.

Anyone help? Need to upgrade from 3.1.2 because ktorrent just keeps closing down unexpectedly. I leave it on overnight then it's gone without trace!
stoeptegel
Registered Member
Posts
1075
Karma
0

Thu Dec 11, 2008 2:32 pm
You probably need something along the line of libgmp3-dev. This package is needed for the country flags.
George
Moderator
Posts
5421
Karma
1

Thu Dec 11, 2008 5:14 pm
stoeptegel wrote:You probably need something along the line of libgmp3-dev. This package is needed for the country flags.


No actually gmp is to do big number arithmetic, which is used for encryption.
ukdoc
Registered Member
Posts
10
Karma
0

Thu Dec 11, 2008 6:03 pm
stoeptegel wrote:You probably need something along the line of libgmp3-dev.


Yes, I did. I also had to install libqca2-dev.

Now I have new ktorrent fully working and it appears to be speeding along without any significant problems so far, touch wood!


Bookmarks



Who is online

Registered users: Bing [Bot], Evergrowing, Google [Bot]