sidevesh / Luminance

A simple GTK application to control brightness of displays including external displays supporting DDC/CI
GNU General Public License v3.0
91 stars 4 forks source link

"symbol lookup error" on Ubuntu 22.04.4 #26

Closed alexislefebvre closed 1 month ago

alexislefebvre commented 1 month ago

When I use the .deb package, the software crashes immediately:

$ sudo dpkg --install ~/luminance-1.1.0.deb
[…]
dpkg: dependency problems prevent configuration of luminance:
 luminance depends on libddcutil4; however:
  Package libddcutil4 is not installed.
[…]
$ sudo apt install libddcutil4
[…]
$ sudo dpkg --install ~/luminance-1.1.0.deb
[…]
Setting up luminance (1.1.0) ...
[…]
$ com.sidevesh.Luminance
com.sidevesh.Luminance: symbol lookup error: com.sidevesh.Luminance: undefined symbol: adw_about_dialog_set_developers, version LIBADWAITA_1_0
sidevesh commented 1 month ago

I was having build issues getting the app to build on ubuntu-latest image in GitHub Actions, ubuntu-latest is based on 22.04 too, the issue went away when I moved it to ubuntu 24.04, my guess is the libadwaita version on 22.04 is too old but I am not sure since I don't have any ubuntu running machines, If someone can test the app on 24.04 then that would help, also if you can try building the app on your ubuntu 22.04 setup based on the instructions in README then we might be able to figure out the issue

manueldeljesus commented 1 month ago

I can confirm that Luminance runs in a Distrobox machine with Ubuntu 24.04.

My host OS is Debian 12.

CaptainMorgan12 commented 1 month ago

Having the same issue Ubuntu 23.10, but waiting until August to upgrade to 24.04 since I have had upgrade issues on my MacPro 2013 trashcan, I am trying to control the brightness of my Apple Thunderbolt display (which used to work on older Ubuntu versions, but for some reason was removed).

Also running:

com.sidevesh.Luminance -l com.sidevesh.Luminance: symbol lookup error: com.sidevesh.Luminance: undefined symbol: adw_about_dialog_set_developers, version LIBADWAITA_1_0

sidevesh commented 1 month ago

@alexislefebvre @CaptainMorgan12 can you tell me what is the version of libadwaita you have installed after upgrading it to the latest version ?

alexislefebvre commented 1 month ago

I was having build issues getting the app to build on ubuntu-latest image in GitHub Actions, ubuntu-latest is based on 22.04 too, the issue went away when I moved it to ubuntu 24.04, my guess is the libadwaita version on 22.04 is too old but I am not sure since I don't have any ubuntu running machines, If someone can test the app on 24.04 then that would help, also if you can try building the app on your ubuntu 22.04 setup based on the instructions in README then we might be able to figure out the issue

I tried to build it from source, there is one error and no binary has been created:

$ sudo apt install gcc libglib2.0-dev libgtk-4-dev libadwaita-1-dev libddcutil-dev
[…]
$ git clone --recurse-submodules https://github.com/sidevesh/Luminance.git
[…]
$ cd Luminance
$ ./build.sh
In file included from src/main.c:18:
src/./ui/screens/no_displays.c: In function ‘get_no_displays_screen’:
src/./ui/screens/no_displays.c:39:3: warning: implicit declaration of function ‘gtk_css_provider_load_from_string’; did you mean ‘gtk_css_provider_load_from_file’? [-Wimplicit-function-declaration]
   39 |   gtk_css_provider_load_from_string(button_css_provider, "button {padding-left: 12px;padding-right: 12px;padding-top: 4px;padding-bottom: 4px;}");
      |   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      |   gtk_css_provider_load_from_file
In file included from src/main.c:20:
src/./ui/window.c: In function ‘_open_about_dialog_and_close_popover’:
src/./ui/window.c:30:9: error: unknown type name ‘AdwDialog’; did you mean ‘GtkDialog’?
   30 |         AdwDialog *about_dialog = adw_about_dialog_new();
      |         ^~~~~~~~~
      |         GtkDialog
$ ls -l build/
total 0
alexislefebvre commented 1 month ago

@alexislefebvre @CaptainMorgan12 can you tell me what is the version of libadwaita you have installed after upgrading it to the latest version ?

$ apt-cache policy libadwaita-1-0
libadwaita-1-0:
  Installed: 1.1.7-0ubuntu0.22.04.1
  Candidate: 1.1.7-0ubuntu0.22.04.1
$ apt-cache policy libadwaita-1-dev
libadwaita-1-dev:
  Installed: 1.1.7-0ubuntu0.22.04.1
  Candidate: 1.1.7-0ubuntu0.22.04.1
sidevesh commented 1 month ago

yeah, the libadwaita version is too old on 22.04, there won't be anything I can do in that case, unless it's possible to upgrade libadwaita somehow

sidevesh commented 1 month ago

I would suggest sticking to the pre 1.1.0 version that uses gtk3, no features have been changed or added in 1.1.0 anyways except gtk4 and libadwaita.

alexislefebvre commented 1 month ago

Thanks for the feedback.

Upgrade from 22.04 to 24.04 should start in August 2024 https://help.ubuntu.com/community/NobleUpgrades so this incompatibility will not be an issue anymore in 2 months.

CaptainMorgan12 commented 1 month ago

Ubuntu 23.10 has the following libadwaita installed:

pt-cache policy libadwaita-1-0
libadwaita-1-0:
  Installed: 1.4.0-1ubuntu1
  Candidate: 1.4.0-1ubuntu1
  Version table:
 *** 1.4.0-1ubuntu1 500
        500 http://ca.archive.ubuntu.com/ubuntu mantic/main amd64 Packages
        100 /var/lib/dpkg/status

Is 1.4.0 also too old here?

sidevesh commented 1 month ago

Yeah, 1.5.0 is required