Cannot cmake kde-connect
Asked Answered
Z

5

5

I am trying to install kde-connect following this. Although my kubuntu version is 14.04, I wanted to compile them so that I can have the latest version. But when I followed the instructions to compile, i get the following error.

-- Found Qt-Version 5.2.1 (using /usr/bin/qmake)
CMake Error: The following variables are used in this project, but they are set to NOTFOUND.
Please set them or make sure they are set and tested correctly in the CMake files:
QT_QT_INCLUDE_DIR
   used as include directory in directory /home/vinaychandra/Downloads/t/CMakeFiles/CMakeTmp

CMake Error: Internal CMake error, TryCompile configure of cmake failed

CMake Error at /usr/share/kde4/apps/cmake/modules/FindKDE4Internal.cmake:1311 (message):
  Unable to compile a basic Qt application.  Qt has not been found correctly.
Call Stack (most recent call first):
  /usr/share/cmake-2.8/Modules/FindKDE4.cmake:95 (find_package)
  CMakeLists.txt:7 (find_package)

Please point out how to correct this.

I have tried giving -DQT_QT_INCLUDE_DIR=/usr/share/qt4/ then it tells that You must build your code with position independent code if Qt was built with -reduce-relocations.

Zagazig answered 9/10, 2014 at 19:16 Comment(4)
Just as a matter of interest, which are the advantage of the newer versions? I'm using KDE-connect, too - installed from the ubuntu software resporitories and I'm very content with the tool.Tetracaine
There are more features in the latest version (0.7.2) when compared to that available in the Ubuntu Repositories(0.5)Zagazig
Same problem here, I've tried to install - same error. I can't help you - sorry. But the answer might be worth knowing...Tetracaine
You can try to use -fPIC.Laux
J
7

Your cmake by default uses a different QT version. So, you must explicitly tell him which version of QT he have to use for this job.

This one

-DQT_QT_INCLUDE_DIR=/usr/share/qt4/

Is wrong because you mustn't give QT position explicitly. All you need is to use the right qmake. So, give'em this flag and you'll be happy!

-DQT_QMAKE_EXECUTABLE=/usr/bin/qmake-qt4
Junno answered 7/3, 2015 at 21:46 Comment(2)
Dont forget to remove all files from the build directory before running the command again, otherwise it wont work, since the CMakeCache.txt is already generated.Lambdoid
@Lambdoid Isn't it obvious?Junno
W
1

Since most of kde applications are not ported to Qt5, you need Qt4.x for building kdeconnect(don't know x, mine is 4.8.6). Also Qt4 installer is not available (I think !), so you have to build it also from source. Building Qt4 is quite easy, just download the source and run the usual commands.

After building it, it qmake name will be qmake-qt4 in /usr/bin. So for building kdeconnect, first run its cmake, then a Cmaketextcache.txt file will form. In that change the path of qmake (i.e somewhere written /usr/bin/qmake to /usr/bin/qmake-qt4) and also the path of qt include dir to (I think /usr/include/qt5 to /usr/include/qt4), and run the cmake again.

If some packages are missing, then you have to install it. But with the above changes, you will get a make file to install it.

Wispy answered 3/11, 2014 at 9:38 Comment(0)
W
0

Unfortunately, the cited documentation is lagging behind the current state of kdeconnect. I ran into similar problems but I managed to solve them by installing the following required packages from the Kubuntu repositories:

sshfs
libfakekey-dev
libxtst-dev
libqca2-dev
libqjson-dev

I trust these are all of them. I installed kdeconnect from the latest git commit and it seems to run fine.

Wed answered 22/10, 2014 at 13:27 Comment(0)
S
0

This answer comes a bit late, but this is the first Google search result for the question. In systems with qtchooser (Kubuntu, Ubuntu at least), this can be fixed by running first:

    export QT_SELECT=qt4

This makes all of the Qt build tools to default to the Qt4 version instead of Qt5. You can check which Qt version is active by running:

    qmake --version
Subtotal answered 25/4, 2015 at 9:26 Comment(0)
D
0
  1. Try kde connect install on ubuntu: https://fazlerabbi37.github.io/blogs/install_kde_connect_in_ubuntu_18.04.html (in 18.04 & 19.04 it works with simple sudo apt install kdeconnect
  2. Install kde connect on android device (google play store is where I installed from)
  3. Invoke kde connect from desktop
  4. Invoke kde connect from android and search device.
  5. Your ubuntu will be found / initiating a search from desktop results in android phone pulled up for pairing
  6. Accept pairing request
  7. Provide access to folders
  8. Try clicking on a video/image file for transfer
  9. I could see the new file transferring in /Downloads folder of desktop
  10. allowing/disallowing desktop to access sms, notifications etc are now a choice

Note: Pl treat this with pinch of salt. This appears very simple, effective for a main reason it worked for me in no time.

Determinate answered 4/9, 2019 at 5:3 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.