cassidyjames / ideogram

Insert emoji anywhere in elementary OS, even in non-native apps
https://cassidyjames.com
GNU General Public License v3.0
92 stars 19 forks source link

Errors running ninja test #55

Open rothgar opened 3 years ago

rothgar commented 3 years ago

I'm trying to compile ideogram inside an elementary container but getting errors.

I cloned the repo and got into a clean elementary OS container

docker run -it -v $PWD:/srv elementary/docker bash -l

Then made sure deps were installed

apt install libgtk-3-dev meson valac

and

meson build --prefix=/usr

Then I cd into build directory and run ninja test and get the following error

[1/6] Compiling Vala source ../src/Application.vala ../src/MainWindow.vala ../src/Settings/CustomShortcutSettings.vala.                   
FAILED: com.github.cassidyjames.ideogram@exe/src/Application.c com.github.cassidyjames.ideogram@exe/src/MainWindow.c com.github.cassidyjam
es.ideogram@exe/src/Settings/CustomShortcutSettings.c                                                                                     
valac -C --debug --debug --pkg posix --pkg x11 --pkg glib-2.0 --color=always --directory com.github.cassidyjames.ideogram@exe --basedir ..
/ --gresources=../data/gresource.xml ../src/Application.vala ../src/MainWindow.vala ../src/Settings/CustomShortcutSettings.vala           
../src/Application.vala:22.25-22.27: error: The symbol `Gtk' could not be found                                                           
public class Ideogram : Gtk.Application {                                                                                                 
                        ^^^                                                                                                               
../src/MainWindow.vala:22.27-22.29: error: The symbol `Gtk' could not be found
public class MainWindow : Gtk.Window {
                          ^^^
../src/MainWindow.vala:23.13-23.15: error: The symbol `Gtk' could not be found
    private Gtk.Entry entry;
            ^^^
../src/MainWindow.vala:26.24-26.26: error: The symbol `Gtk' could not be found
    public MainWindow (Gtk.Application application) {
                       ^^^
../src/MainWindow.vala:110.9-110.11: error: The symbol `Gdk' could not be found
        Gdk.ModifierType modifiers;
        ^^^
../src/Settings/CustomShortcutSettings.vala:12.12-12.24: error: The type name `GLib.Settings' could not be found
    static GLib.Settings settings; 
           ^^^^^^^^^^^^^
../src/Settings/CustomShortcutSettings.vala:44.12-44.24: error: The type name `GLib.Settings' could not be found
    static GLib.Settings? get_relocatable_schema_settings (string relocatable_schema) {
           ^^^^^^^^^^^^^
../src/Settings/CustomShortcutSettings.vala:125.41-125.53: error: The type name `GLib.Settings' could not be found
    private static void apply_settings (GLib.Settings asettings) {
                                        ^^^^^^^^^^^^^
Compilation failed: 8 error(s), 0 warning(s)

Is there a step I'm missing?

cassidyjames commented 3 years ago

@rothgar oh man, my instructions are out of date here. I am no longer using ninja for tests, and instead run them in CI on GitHub. I'm not sure about those specific errors, but you should just be able to run ninja to build it instead of running ninja test.

rothgar commented 3 years ago

Thanks for the follow up. I should have tried that :facepalm:

It builds the binary with just a couple warnings

/srv/build# ninja install                                                                                                                  
[6/11] Compiling Vala source ../src/Application.vala ../src/MainWindow.vala ../src/Settings/CustomShortcutSettings.vala.                                     
../src/Settings/CustomShortcutSettings.vala:17.9-17.23: warning: field `CustomShortcutSettings.CustomShortcut.shortcut' never used                           
        string shortcut;                                                                                                                                     
        ^^^^^^^^^^^^^^^                                                                                                                                      
../src/Settings/CustomShortcutSettings.vala:19.9-19.33: warning: field `CustomShortcutSettings.CustomShortcut.relocatable_schema' never used                 
        string relocatable_schema;                                                                                                                           
        ^^^^^^^^^^^^^^^^^^^^^^^^^                                                                                                                            
Compilation succeeded - 2 warning(s) 

of course that binary has some problems when I transfer it outside of the container (I'm trying to run it on Ubuntu)

The window opens (looks clipped) image and I get this error at startup.

(com.github.cassidyjames.ideogram:768377): dconf-WARNING **: 16:40:01.810: unable to open file '/etc/dconf/db/local': Failed to map /etc/dconf/db/local' /etc/dconf/db/local': mmap() failed: No such device; expect degraded performance

I'm guessing the clipping comes from the fact that I couldn't find a compatible libgtk-3-dev library in Ubuntu so it's building off an elementary library and the fact that the full install command didn't run on my laptop. Copying an emoji doesn't save to my clipboard either. :cry:

On my laptop if I cd inside the build directory (built within the container) I'm able to run

sudo MESON_INSTALL_PREFIX=/usr/ python3 ../meson/post_install.py

Which looks successful and copies the files based on what I saw in the script but I still get the same errors.

Maybe I'll try hacking on it later. I wasn't able to do a mason build from my laptop because of missing dependencies. I tried finding compatible ubuntu package names and removing the requirements in meson.build but builds still failed.

This honestly looks like a great app and I'd be more than happy to pay you for it because it's one of the few things I miss from macOS with rocket. Sadly work doesn't let me use elementary.

cassidyjames commented 3 years ago

@rothgar ah interesting! The clipping issue might be stylesheet-related; you can ensure you have the elementary OS Juno stylesheet installed, and then run Ideogram with GTK_THEME=elementary (you can patch that into the .desktop if you're so inclined).

rothgar commented 3 years ago

:cry: Installed the theme and still get the clipping and emoji copy doesn't work.

We don't have to keep this issue open as I know Ubuntu isn't supported. at least now I have something that can build so if I play with the code I can know when I break it.