b4j4 / indicator-kdeconnect

AppIndicator for KDE Connect
GNU Lesser General Public License v2.1
372 stars 37 forks source link

error compiling in Debian stretch #128

Closed miguemoya closed 6 years ago

miguemoya commented 6 years ago

Hi, when I try to compile in Debian stretch, I get the error

/indicator-kdeconnect/src/kdeconnectsend/KDEConnectSend.vala:41.4-41.12: error: The name free' does not exist in the context ofGtk.TreeIter' iter.free(); ^^^^^^^^^ libgtk-3-dev --> 3.22.11-1

Thank you very much !!

b4j4 commented 6 years ago

Tell me the Version of Vala

miguemoya commented 6 years ago

Hi: valac --> 0.34.7-1

Thank's !!

b4j4 commented 6 years ago

Your vala is very old, maybe that's the problem, i recomend you to one of the realeased source, or update your vala version.

bomjic commented 6 years ago

Hey. I have vala version 0.36.14

$ vala --version
Vala 0.36.14

It's a new LTS version (May 22, 2018: Vala 0.36.14 released [src] (Long-term Support)) but when I try to compile it on Ubuntu 16.04 I still get

[ 75%] Generating src/kdeconnectsend/KDEConnectSend.c;src/Device.c;src/utils/Pair.c;src/utils/Dialogs.c
warning: --save-temps has no effect when -C or --ccode is set
/tmp/kdeconnect/indicator-kdeconnect/src/kdeconnectsend/KDEConnectSend.vala:42.4-42.12: error: The name `free' does not exist in the context of `Gtk.TreeIter'
                        iter.free();
                        ^^^^^^^^^
Compilation failed: 1 error(s), 1 warning(s)

What might be the problem?

THS-on commented 6 years ago

valac version 0.34.7 is the newest in Debian stable and currently there is no backport available. This commit breaks building it under Debian 9: https://github.com/Bajoja/indicator-kdeconnect/commit/6ba430d5a39924802274f0ea1e2ba59e0ed7e00c

You can disable building kdeconnect-send and it will build fine on Debian

bomjic commented 6 years ago

Well, I've added vala repo in my Ubuntu so I have the latest LTS version. Concerning disable of kdeconnect-send building, I'm not familiar neither with cmake, nor with vala syntaxis and I don't know how to disable kdeconnect-send. Then what will it lead to if I disable it? What functionality will I miss?

THS-on commented 6 years ago

You just commend out this section of CMakeLists.txt with #. https://github.com/Bajoja/indicator-kdeconnect/blob/1634e547f05b5339cae819039d0b9af5e1fa0581/CMakeLists.txt#L77-L92

kdeconnect-send is a standalone tool for sending files from your desktop to your device.

bomjic commented 6 years ago

Hmm, I've built it without kdeconnect-send, it starts but when I try to connect my device I get this error

** Message: Device.vala:557: GDBus.Error:org.freedesktop.DBus.Error.ServiceUnknown: The name org.kde.kdeconnect was not provided by any .service files Could not find module 'kcm_kdeconnect'. See kcmshell5 --list for the full list of modules.

and this kind of errors as well

** Message: Device.vala:353: GDBus.Error:org.freedesktop.DBus.Error.UnknownMethod: No such method 'isTrusted' in interface 'org.kde.kdeconnect.device' at object path '/modules/kdeconnect/devices/9b071bcdda2de621' (signature '') ** Message: Device.vala:467: GDBus.Error:org.freedesktop.DBus.Error.UnknownMethod: No such method 'hasPairingRequests' in interface 'org.kde.kdeconnect.device' at object path '/modules/kdeconnect/devices/9b071bcdda2de621' (signature '')

b4j4 commented 6 years ago

Hi @bomjic, The first problem is your valac version, you can try to upgrade it. The secound one is probably your kdeconnect version.

bomjic commented 6 years ago

@Bajoja hey. I've already been telling that I have the latest LTS version of vala

# valac --version
Vala 0.36.14

and I have been compiling indicator-kdeconnect from the current master branch, the only thing I've changed is CMakeLists.txt to compile it without kdeconnect-send

/tmp/kdeconnect/indicator-kdeconnect# git status
On branch master
Your branch is up-to-date with 'origin/master'.
Changes not staged for commit:
  (use "git add <file>..." to update what will be committed)
  (use "git checkout -- <file>..." to discard changes in working directory)

        modified:   CMakeLists.txt

no changes added to commit (use "git add" and/or "git commit -a")
alhimik8 commented 6 years ago

Hi, I have the same issue. Linux Mint 18.3 Vala 0.36.15

/tmp/git/indicator-kdeconnect/src/kdeconnectsend/KDEConnectSend.vala:42.4-42.12: error: The name `free' does not exist in the context of `Gtk.TreeIter'
            iter.free();
            ^^^^^^^^^
Compilation failed: 1 error(s), 1 warning(s)
CMakeFiles/kdeconnect-send.dir/build.make:106: recipe for target 'kdeconnect-send_valac.stamp' failed
make[2]: *** [kdeconnect-send_valac.stamp] Error 1
CMakeFiles/Makefile2:234: recipe for target 'CMakeFiles/kdeconnect-send.dir/all' failed
make[1]: *** [CMakeFiles/kdeconnect-send.dir/all] Error 2
Makefile:127: recipe for target 'all' failed
make: *** [all] Error 2

Also, the latest version from ppa starts, but shows me "Device Reachable but not Trusted". Device already is paired successfully but indicator does not show me any information from it when i click to see charge level e.t.c.. "kcmshell5 kcm_kdeconnect" works normal anyway.

baddwin commented 6 years ago

same here in openSUSE Leap 15

/home/badwi/Public/indicator-kdeconnect/src/kdeconnectsend/KDEConnectSend.vala:42.4-42.12: error: The name `free' does not exist in the context of `Gtk.TreeIter'      
                        iter.free();
                        ^^^^^^^^^
Compilation failed: 1 error(s), 1 warning(s)
make[2]: *** [CMakeFiles/kdeconnect-send.dir/build.make:107: kdeconnect-send_valac.stamp] Fehler 1                                                                     
make[1]: *** [CMakeFiles/Makefile2:253: CMakeFiles/kdeconnect-send.dir/all] Fehler 2                                                                                   
make: *** [Makefile:130: all] Fehler 2

Public/indicator-kdeconnect/build  master ✔                                                                           12d  ⍉
▶ valac --version
Vala 0.38.8
SolidCore-IA commented 6 years ago

I was able to compile and its running all good except I cant send SMS from my computer. Nothing opens when I click the "send sms" from the indicator tray icon. Also, the tray icon I notice will disappear after a period of time, but then I cant access the menu to send a file or find my device. I would have to pick up my phone to get the tray icon to show. Any way to change this? *running debian 9.5 stable and i3 window manager. kdeconnect v1.0.1-1+b2

*output below when I complied -- checking for a minimum Vala version of 0.20 -- found Vala, version 0.34.7 -- GSettings schemas will be installed locally. -- GSettings shemas will be compiled. -- GSettings schemas will be installed into /usr/local/share/glib-2.0/schemas/ -- Configuring done -- Generating done -- Build files have been written to: /home/manny/Desktop/dev/kdeindi/indicator-kdeconnect CMakeFiles/indicator-kdeconnect-settings.dir/build.make:91: warning: overriding recipe for target 'src/utils/Dialogs.c' CMakeFiles/indicator-kdeconnect-settings.dir/build.make:64: warning: ignoring old recipe for target 'src/utils/Dialogs.c' CMakeFiles/indicator-kdeconnect-settings.dir/build.make:91: warning: overriding recipe for target 'src/utils/Dialogs.c' CMakeFiles/indicator-kdeconnect-settings.dir/build.make:64: warning: ignoring old recipe for target 'src/utils/Dialogs.c' [ 5%] Building C object CMakeFiles/indicator-kdeconnect-settings.dir/src/settings/Settings.c.o [ 11%] Building C object CMakeFiles/indicator-kdeconnect-settings.dir/src/utils/Dialogs.c.o [ 17%] Linking C executable indicator-kdeconnect-settings [ 29%] Built target indicator-kdeconnect-settings [ 35%] Building C object CMakeFiles/indicator-kdeconnect.dir/src/Constants.c.o [ 41%] Building C object CMakeFiles/indicator-kdeconnect.dir/src/main.c.o [ 47%] Building C object CMakeFiles/indicator-kdeconnect.dir/src/Device.c.o [ 52%] Building C object CMakeFiles/indicator-kdeconnect.dir/src/KDEConnectManager.c.o [ 58%] Building C object CMakeFiles/indicator-kdeconnect.dir/src/DeviceIndicator.c.o [ 64%] Building C object CMakeFiles/indicator-kdeconnect.dir/src/FirstTimeWizard.c.o [ 70%] Building C object CMakeFiles/indicator-kdeconnect.dir/src/StartupManager.c.o [ 76%] Building C object CMakeFiles/indicator-kdeconnect.dir/src/utils/Pair.c.o [ 82%] Building C object CMakeFiles/indicator-kdeconnect.dir/src/utils/Dialogs.c.o [ 88%] Building C object CMakeFiles/indicator-kdeconnect.dir/src/utils/InOut.c.o [ 94%] Linking C executable indicator-kdeconnect [100%] Built target indicator-kdeconnect /home/manny/Desktop/dev/kdeindi/indicator-kdeconnect/po/ru_RU.po: 53 translated messages. [100%] Built target generate-indicator-kdeconnect-ru_RU-gmo /home/manny/Desktop/dev/kdeindi/indicator-kdeconnect/po/zh_Hant.po: 53 translated messages. [100%] Built target generate-indicator-kdeconnect-zh_Hant-gmo /home/manny/Desktop/dev/kdeindi/indicator-kdeconnect/po/zh_Hans.po: 51 translated messages, 2 fuzzy translations. [100%] Built target generate-indicator-kdeconnect-zh_Hans-gmo /home/manny/Desktop/dev/kdeindi/indicator-kdeconnect/po/fa.po: 53 translated messages. [100%] Built target generate-indicator-kdeconnect-fa-gmo /home/manny/Desktop/dev/kdeindi/indicator-kdeconnect/po/hr.po: 53 translated messages. [100%] Built target generate-indicator-kdeconnect-hr-gmo /home/manny/Desktop/dev/kdeindi/indicator-kdeconnect/po/nl.po: 53 translated messages. [100%] Built target generate-indicator-kdeconnect-nl-gmo /home/manny/Desktop/dev/kdeindi/indicator-kdeconnect/po/de.po: 53 translated messages. [100%] Built target generate-indicator-kdeconnect-de-gmo /home/manny/Desktop/dev/kdeindi/indicator-kdeconnect/po/pl.po: 53 translated messages. [100%] Built target generate-indicator-kdeconnect-pl-gmo /home/manny/Desktop/dev/kdeindi/indicator-kdeconnect/po/id.po: 41 translated messages, 12 untranslated messages. [100%] Built target generate-indicator-kdeconnect-id-gmo /home/manny/Desktop/dev/kdeindi/indicator-kdeconnect/po/sl.po: 53 translated messages. [100%] Built target generate-indicator-kdeconnect-sl-gmo /home/manny/Desktop/dev/kdeindi/indicator-kdeconnect/po/pt_PT.po: 53 translated messages. [100%] Built target generate-indicator-kdeconnect-pt_PT-gmo /home/manny/Desktop/dev/kdeindi/indicator-kdeconnect/po/ca.po: 53 translated messages. [100%] Built target generate-indicator-kdeconnect-ca-gmo /home/manny/Desktop/dev/kdeindi/indicator-kdeconnect/po/es.po: 53 translated messages. [100%] Built target generate-indicator-kdeconnect-es-gmo /home/manny/Desktop/dev/kdeindi/indicator-kdeconnect/po/he.po: 53 translated messages. [100%] Built target generate-indicator-kdeconnect-he-gmo /home/manny/Desktop/dev/kdeindi/indicator-kdeconnect/po/fr.po: 53 translated messages. [100%] Built target generate-indicator-kdeconnect-fr-gmo /home/manny/Desktop/dev/kdeindi/indicator-kdeconnect/po/cs.po: 53 translated messages. [100%] Built target generate-indicator-kdeconnect-cs-gmo /home/manny/Desktop/dev/kdeindi/indicator-kdeconnect/po/it.po: 53 translated messages. [100%] Built target generate-indicator-kdeconnect-it-gmo /home/manny/Desktop/dev/kdeindi/indicator-kdeconnect/po/be.po: 53 translated messages. [100%] Built target generate-indicator-kdeconnect-be-gmo /home/manny/Desktop/dev/kdeindi/indicator-kdeconnect/po/nl_BE.po: 53 translated messages. [100%] Built target generate-indicator-kdeconnect-nl_BE-gmo /home/manny/Desktop/dev/kdeindi/indicator-kdeconnect/po/hu.po: 53 translated messages. [100%] Built target generate-indicator-kdeconnect-hu-gmo /home/manny/Desktop/dev/kdeindi/indicator-kdeconnect/po/lt.po: 53 translated messages. [100%] Built target generate-indicator-kdeconnect-lt-gmo /home/manny/Desktop/dev/kdeindi/indicator-kdeconnect/po/pt_BR.po: 53 translated messages. [100%] Built target generate-indicator-kdeconnect-pt_BR-gmo /home/manny/Desktop/dev/kdeindi/indicator-kdeconnect/po/sr.po: 53 translated messages. [100%] Built target generate-indicator-kdeconnect-sr-gmo /home/manny/Desktop/dev/kdeindi/indicator-kdeconnect/po/nb_NO.po: 53 translated messages. [100%] Built target generate-indicator-kdeconnect-nb_NO-gmo /home/manny/Desktop/dev/kdeindi/indicator-kdeconnect/po/el.po: 53 translated messages. [100%] Built target generate-indicator-kdeconnect-el-gmo [100%] Built target update-gmo Install the project... -- Install configuration: "" -- Installing: /usr/local/bin/indicator-kdeconnect -- Installing: /usr/local/bin/indicator-kdeconnect-settings -- Installing: /usr/local/share/indicator-kdeconnect/Sms.py -- Installing: /usr/local/share/applications/indicator-kdeconnect.desktop -- Installing: /usr/local/share/applications/indicator-kdeconnect-settings.desktop -- Installing: /usr/local/share/contractor/kdeconnect.contract -- Installing: /usr/local/share/nautilus-python/extensions/kdeconnect-send-nautilus.py -- Installing: /usr/local/share/nemo-python/extensions/kdeconnect-send-nemo.py -- Installing: /usr/local/share/caja-python/extensions/kdeconnect-send-caja.py -- Installing: /usr/local/share/Thunar/sendto/kdeconnect-send-thunar.desktop gtk-update-icon-cache: Failed to open file /usr/local/share/icons/.icon-theme.cache : No such file or directory -- Updated icon cache in /usr/local/share/icons -- Installing: /usr/local/share/glib-2.0/schemas/com.bajoja.indicator-kdeconnect.gschema.xml -- Compiling GSettings schemas -- Installing: /usr/local/share/indicator-kdeconnect/indicator.jpg -- Installing: /usr/local/share/indicator-kdeconnect/startup.jpg -- Installing: /usr/local/share/metainfo/com.bajoja.indicator-kdeconnect.appdata.xml -- Installing: /usr/local/share/locale/be/LC_MESSAGES/indicator-kdeconnect.mo -- Installing: /usr/local/share/locale/ca/LC_MESSAGES/indicator-kdeconnect.mo -- Installing: /usr/local/share/locale/cs/LC_MESSAGES/indicator-kdeconnect.mo -- Installing: /usr/local/share/locale/de/LC_MESSAGES/indicator-kdeconnect.mo -- Installing: /usr/local/share/locale/el/LC_MESSAGES/indicator-kdeconnect.mo -- Installing: /usr/local/share/locale/es/LC_MESSAGES/indicator-kdeconnect.mo -- Installing: /usr/local/share/locale/fa/LC_MESSAGES/indicator-kdeconnect.mo -- Installing: /usr/local/share/locale/fr/LC_MESSAGES/indicator-kdeconnect.mo -- Installing: /usr/local/share/locale/he/LC_MESSAGES/indicator-kdeconnect.mo -- Installing: /usr/local/share/locale/hr/LC_MESSAGES/indicator-kdeconnect.mo -- Installing: /usr/local/share/locale/hu/LC_MESSAGES/indicator-kdeconnect.mo -- Installing: /usr/local/share/locale/id/LC_MESSAGES/indicator-kdeconnect.mo -- Installing: /usr/local/share/locale/it/LC_MESSAGES/indicator-kdeconnect.mo -- Installing: /usr/local/share/locale/lt/LC_MESSAGES/indicator-kdeconnect.mo -- Installing: /usr/local/share/locale/nb_NO/LC_MESSAGES/indicator-kdeconnect.mo -- Installing: /usr/local/share/locale/nl/LC_MESSAGES/indicator-kdeconnect.mo -- Installing: /usr/local/share/locale/nl_BE/LC_MESSAGES/indicator-kdeconnect.mo -- Installing: /usr/local/share/locale/pl/LC_MESSAGES/indicator-kdeconnect.mo -- Installing: /usr/local/share/locale/pt_BR/LC_MESSAGES/indicator-kdeconnect.mo -- Installing: /usr/local/share/locale/pt_PT/LC_MESSAGES/indicator-kdeconnect.mo -- Installing: /usr/local/share/locale/ru_RU/LC_MESSAGES/indicator-kdeconnect.mo -- Installing: /usr/local/share/locale/sl/LC_MESSAGES/indicator-kdeconnect.mo -- Installing: /usr/local/share/locale/sr/LC_MESSAGES/indicator-kdeconnect.mo -- Installing: /usr/local/share/locale/zh_Hans/LC_MESSAGES/indicator-kdeconnect.mo

premek commented 6 years ago

I had to update to debian Buster (testing) because of this.

SolidCore-IA commented 6 years ago

@premek To fix the compiling issue?

premek commented 6 years ago

@premek To fix the compiling issue?

yes

b4j4 commented 6 years ago

That's is kind of complicated, Debian users have to comment the line of code that reference 'iter.free()', but on the main source I can't, to avoid memory leak