Open Nocturna22 opened 10 months ago
I know. I installed all of that. The problem is the appindicator3-0.1.
humanity@0-Milky-Way:~/Desktop/g510s-0.0.3$ sudo apt install libappindicator3-dev
Package lists are read... Done
Dependency tree is built... Done
Status information is read in... Done
Note: "libayatana-appindicator3-dev" is selected instead of "libappindicator3-dev".
libayatana-appindicator3-dev is already the latest version (0.5.92-1).
0 updated, 0 newly installed, 0 to be removed and 0 not updated.```
https://packages.ubuntu.com/jammy/libappindicator3-dev
It's available for every active release of Ubuntu.
It's no longer available in debian trixie. Debian trixie has replaced it with https://packages.debian.org/trixie/libayatana-appindicator3-1
As of bullseye, libappinditactor3-1 was showing as a transitional package: https://packages.debian.org/bullseye/libappindicator3-1
Strange that it is still provided in current Ubuntu, likely for this reason.
And, historically Debian has been against this type of migration for this exact reason. (This is why they still provide libusb 0.1 and libusb 1.0 instead of compat)
Either way, if there are dependency or compiler issues that result from the transition of one package to another, where said package is marked as "provided-by" the transitioned package, the bug lies against the newly transitioned package.
Unfortunately, I work upwards of 60 hours a week and I don't have the time to remedy this.
Patches, however, would be welcomed.
I'm willing to give it a try. I've never written straight C before (Mostly python these days, with very limited C++ about 20 years ago), so I would like some feedback as I go along. I have had to make some changes to libg15 as well, all in the debian folder, mostly updates to match the current debian version of libg15.
Changes thus far:
With g510s, libayatana-appindicator does not currently create a '/usr/lib/x86_64-linux-gnu/pkgconfig/libayatana-appindicator*.pc' so I've added the directory directly in the Makefile.
Currently the build fails at the last build step of the Makefile with:
cc -fcommon -Wall g510s.o g510s-clock.o g510s-config.o g510s-keys.o g510s-list.o g510s-misc.o g510s-net.o g510s-signals.o g510s-threads.o -o g510s -lg15 -lg15render -lpthread -rdynamic `pkg-config --libs gtk+-3.0` -I/usr/include/libayata
na-appindicator3-0.1
/usr/bin/ld: g510s.o: in function `main':
g510s.c:(.text+0x1474): undefined reference to `app_indicator_new'
/usr/bin/ld: g510s.c:(.text+0x1494): undefined reference to `app_indicator_set_attention_icon'
/usr/bin/ld: g510s.c:(.text+0x14c3): undefined reference to `app_indicator_set_menu'
/usr/bin/ld: g510s.c:(.text+0x1e3e): undefined reference to `app_indicator_set_status'
/usr/bin/ld: g510s.c:(.text+0x1e54): undefined reference to `app_indicator_set_status'
/usr/bin/ld: g510s-threads.o: in function `key_function':
g510s-threads.c:(.text+0x3ff): undefined reference to `app_indicator_set_status'
/usr/bin/ld: g510s-threads.c:(.text+0x50a): undefined reference to `app_indicator_set_status'
/usr/bin/ld: g510s-threads.c:(.text+0x604): undefined reference to `app_indicator_set_status'
collect2: error: ld returned 1 exit status
make: *** [Makefile:31: g510s] Error 1
In general I don't like to submit "Work In Progress" patches, but I also would like feedback as I go. How would you like to handle this?
I will add, my current solution adjusting the makefile feels 'hackish' and I don't really like it. I haven't thought of a better solution yet.
For the Debian package, I would just use their package and patch it. There is only one change between mine and the upstream, which corrects the buffer length to prevent double pressing keys.
The build issue is either that you need to #include
the header for libayatana or that it doesn't provide those functions.
In the latter case you could comment them out (if possible) or replace them with relevant functions that it provides.
The proper way to do so would be to #ifdef HAVE_AYATANA
or the like. I'd just get it to work and then figure out a proper solution.
Seems like it's present so it's probably not being included properly.
Try pkg-config --libs gtk+-3.0 libayatana-appindicator3-0.1
(errors at linking)
Thank you! I got it to build, at least using make. It turns out, that debian is not very consistent with the libayatana- packages. for libayatana-ido3 installs 'libayatana-ido3.pc'. For libayatana-appindicator3 it install 'ayatana-appindicator3*.pc' (No leading 'lib') so I didn't think they provided that file. Once I found it, using that instead of my hackish solution helped things work.
dpkg-buildpackage fails. I'm running that down along with a couple other bugs.
Hello, it's me again. I've just tried again and got the same error... Is there anything I can do to fix it? :)
Is your problem solved using the branch from gderber?
git clone --single-branch --branch bugfix/appindicator https://github.com/gderber/g510s.git
cd g510s
make
git clone --single-branch --branch bugfix/appindicator https://github.com/gderber/g510s.git cd g510s make
Yes, thanks, I was there too... But I'm having a different problem right now and I don't know if it's my fault, so I deleted the last post. I don't know if I installed libg15 correctly, because I get the following error with the commands you wrote:
(base) humanity@0-Milky-Way:~$ git clone --single-branch --branch bugfix/appindicator https://github.com/gderber/g510s.git
cd g510s
make
Klone nach 'g510s'...
remote: Enumerating objects: 82, done.
remote: Counting objects: 100% (15/15), done.
remote: Compressing objects: 100% (11/11), done.
remote: Total 82 (delta 6), reused 9 (delta 4), pack-reused 67
Empfange Objekte: 100% (82/82), 66.19 KiB | 1.95 MiB/s, fertig.
Löse Unterschiede auf: 100% (29/29), fertig.
cc -fcommon -Wall `pkg-config --cflags gtk+-3.0 ayatana-appindicator3-0.1` -c g510s.c -o g510s.o
cc -fcommon -Wall -c g510s-clock.c -o g510s-clock.o
cc -fcommon -Wall -c g510s-config.c -o g510s-config.o
g510s-config.c: In function ‘check_dir’:
g510s-config.c:144:17: warning: the comparison will always evaluate as ‘false’ for the address of ‘home_path’ will never be NULL [-Waddress]
144 | if (home_path == NULL) {
| ^~
g510s-config.c:137:8: note: ‘home_path’ declared here
137 | char home_path[255];
| ^~~~~~~~~
g510s-config.c:150:39: warning: argument to ‘sizeof’ in ‘strncpy’ call is the same expression as the source; did you mean to use the size of the destination? [-Wsizeof-pointer-memaccess]
150 | strncpy(full_path, home_path, sizeof(home_path));
| ^
g510s-config.c: In function ‘load_config’:
g510s-config.c:174:17: warning: the comparison will always evaluate as ‘false’ for the address of ‘home_path’ will never be NULL [-Waddress]
174 | if (home_path == NULL) {
| ^~
g510s-config.c:167:8: note: ‘home_path’ declared here
167 | char home_path[255];
| ^~~~~~~~~
g510s-config.c:180:39: warning: argument to ‘sizeof’ in ‘strncpy’ call is the same expression as the source; did you mean to use the size of the destination? [-Wsizeof-pointer-memaccess]
180 | strncpy(full_path, home_path, sizeof(home_path));
| ^
g510s-config.c:181:39: warning: argument to ‘sizeof’ in ‘strncat’ call is the same expression as the source; did you mean to use the size of the destination? [-Wsizeof-pointer-memaccess]
181 | strncat(full_path, file_name, sizeof(file_name));
| ^
g510s-config.c: In function ‘save_config’:
g510s-config.c:205:17: warning: the comparison will always evaluate as ‘false’ for the address of ‘home_path’ will never be NULL [-Waddress]
205 | if (home_path == NULL) {
| ^~
g510s-config.c:198:8: note: ‘home_path’ declared here
198 | char home_path[255];
| ^~~~~~~~~
g510s-config.c:211:39: warning: argument to ‘sizeof’ in ‘strncpy’ call is the same expression as the source; did you mean to use the size of the destination? [-Wsizeof-pointer-memaccess]
211 | strncpy(full_path, home_path, sizeof(home_path));
| ^
g510s-config.c:212:39: warning: argument to ‘sizeof’ in ‘strncat’ call is the same expression as the source; did you mean to use the size of the destination? [-Wsizeof-pointer-memaccess]
212 | strncat(full_path, file_name, sizeof(file_name));
| ^
cc -fcommon -Wall -c g510s-keys.c -o g510s-keys.o
cc -fcommon -Wall -c g510s-list.c -o g510s-list.o
cc -fcommon -Wall -c g510s-misc.c -o g510s-misc.o
cc -fcommon -Wall -c g510s-net.c -o g510s-net.o
g510s-net.c: In function ‘g15_recv’:
g510s-net.c:222:9: warning: ‘memset’ used with length equal to number of elements without multiplication by element size [-Wmemset-elt-size]
222 | memset(msgbuf, 0, 20);
| ^~~~~~
cc -fcommon -Wall `pkg-config --cflags gtk+-3.0` -c g510s-signals.c -o g510s-signals.o
cc -fcommon -Wall `pkg-config --cflags ayatana-appindicator3-0.1` -c g510s-threads.c -o g510s-threads.o
cc -fcommon -Wall g510s.o g510s-clock.o g510s-config.o g510s-keys.o g510s-list.o g510s-misc.o g510s-net.o g510s-signals.o g510s-threads.o -o g510s -lg15 -lg15render -lpthread -rdynamic `pkg-config --libs gtk+-3.0 ayatana-appindicator3-0.1`
/usr/bin/ld: g510s.o: in function `main':
g510s.c:(.text+0x287): undefined reference to `setupLibG15'
/usr/bin/ld: g510s.c:(.text+0x2ba): undefined reference to `setupLibG15'
/usr/bin/ld: g510s-threads.o: in function `key_function':
g510s-threads.c:(.text+0x438): undefined reference to `setupLibG15'
/usr/bin/ld: g510s-threads.c:(.text+0x46b): undefined reference to `setupLibG15'
/usr/bin/ld: g510s-threads.c:(.text+0x532): undefined reference to `setupLibG15'
/usr/bin/ld: g510s-threads.o:g510s-threads.c:(.text+0x565): more undefined references to `setupLibG15' follow
collect2: error: ld returned 1 exit status
make: *** [Makefile:31: g510s] Fehler 1
Right, setupLibG15
is defined in libg15.h
And I just built the branch, it builds but I can't confirm function at the moment.
Is there anything i can do, to test things out? 😊
In what regard?
Were you able to get it built?
If so, do you have a functional tray icon? I had no tray icon but my assumption is that is related to KDE, so a solution that supports both GNOME and KDE would be required.
I wont have time to investigate how it works under modern GNOME for several days though.
Unfortunately, I did not get it installed. I installed libg15 and libg15.h was copied to '/usr/include'.
With the make command on g510s, libg15.h is also included. But now when it wants to do setupLibG15, I get the error that it is an undefined reference...
I'm on KDE rn. No pressure, i have time :)
Alright, the problem you're having is that Debian/Ubuntu ported libg15 to libusb 1.0.
You want/need my libg15 anyway, as it resolves the double key press issue that is present on G510/G510s.
You can snag the packages via direct download from the my PPA listed in the README.md (or build it from source).
However, tray icons are not being drawn on KDE or GNOME/Ubuntu Desktop. Besides that everything appears functional.
I see no need to port to libusb 1.0 as libusb 0.1 is still available from what I can tell and it "just works."
Alright, the problem you're having is that Debian/Ubuntu ported libg15 to libusb 1.0.
You want/need my libg15 anyway, as it resolves the double key press issue that is present on G510/G510s.
You can snag the packages via direct download from the my PPA listed in the README.md (or build it from source).
However, tray icons are not being drawn on KDE or GNOME/Ubuntu Desktop. Besides that everything appears functional.
I see no need to port to libusb 1.0 as libusb 0.1 is still available from what I can tell and it "just works."
Hey, that worked. I didn't know I could just do it like that. I downloaded libg15 and libg15-dev from your PPA and installed them via the package manager. I thought this project would also use the display, but color is okay 😅.
Icons seem to work on KDE Plasma X11
EDIT: O there is a clock file in the Project. So it does not display a clock on my Display. That might be a bug..
Yes, without additional screens it has only the built in clock. You should have a clock display.
Screen data is sent over a socket on port 15550.
You could use wireshark to see the data its sending, if it exists.
Hello, i got some serious Problems.
There are more dependency problems. I managed to fix them all, just to let the compile fail once again. So i deleted everything. Above is the first error without modifying anything.
This is the latest error i got, after trying hard to fix the problem.:
Now i don't know further.