Philip-Scott / Notes-up

Markdown notes editor & manager
GNU General Public License v2.0
621 stars 47 forks source link

Error compiling the app #349

Closed elacalle closed 4 years ago

elacalle commented 4 years ago

Expected Behavior

Compile and install the application

Current Behavior

I compile the app following the steps, but it prints this error:

libmarkdown.vapi:44.2-44.31: error: Inline allocated array as field requires to have fixed length
    public char markdown_version[];
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
/var/tmp/pamac-build-ernesto/notes-up/src/Notes-up-2.0.2/src/Services/Image.vala:84.9-84.70: warning: unhandled error `GLib.Error'
        var file_info = file.query_info ("*", FileQueryInfoFlags.NONE);
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
/var/tmp/pamac-build-ernesto/notes-up/src/Notes-up-2.0.2/src/Services/Image.vala:115.13-115.82: warning: unhandled error `GLib.FileError'
            GLib.FileUtils.get_contents (file.get_path (), out data_raw, out size);
            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
/var/tmp/pamac-build-ernesto/notes-up/src/Notes-up-2.0.2/src/Plugins/PageLink.vala:57.20-65.14: warning: unhandled error `GLib.RegexError'
/var/tmp/pamac-build-ernesto/notes-up/src/Notes-up-2.0.2/src/Plugins/PageLink.vala:27.17-27.60: warning: unhandled error `GLib.RegexError'
        regex = new Regex ("<page\\s([0-9]+)\\s([^>]{1,})>");
                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
/var/tmp/pamac-build-ernesto/notes-up/src/Notes-up-2.0.2/src/Widgets/Viewer.vala:72.13-72.23: warning: `null' incompatible with return type `Gtk.Widget'
            return null;
            ^^^^^^^^^^^
/var/tmp/pamac-build-ernesto/notes-up/src/Notes-up-2.0.2/src/Services/WordWrapper.vala:33.50-33.98: warning: unhandled error `GLib.RegexError'
        WordWrapper.starting_whitespaces_regex = new Regex ("^(\\s)+", RegexCompileFlags.EXTENDED);
                                                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
/var/tmp/pamac-build-ernesto/notes-up/src/Notes-up-2.0.2/src/Services/WordWrapper.vala:34.48-34.96: warning: unhandled error `GLib.RegexError'
        WordWrapper.ending_whitespaces_regex = new Regex ("(\\s)+$", RegexCompileFlags.EXTENDED);
                                               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
/var/tmp/pamac-build-ernesto/notes-up/src/Notes-up-2.0.2/src/GranitePatches/SourceList.vala:1516.62-1516.91: warning: Granite.StyleClass.SOURCE_LIST has been deprecated since 0.4.2. Use Granite.STYLE_CLASS_SOURCE_LIST
/var/tmp/pamac-build-ernesto/notes-up/src/Notes-up-2.0.2/src/Widgets/Editor.vala:311.9-311.31: warning: Gtk.Widget.override_font has been deprecated since 3.16
Command-line option `--thread` is deprecated and will be ignored
Compilation failed: 1 error(s), 17 warning(s)
make[2]: *** [CMakeFiles/com.github.philip-scott.notes-up.dir/build.make:105: src/Main.c] Error 1
make[2]: se sale del directorio '/var/tmp/pamac-build-ernesto/notes-up/src/Notes-up-2.0.2/build'
make[1]: *** [CMakeFiles/Makefile2:138: CMakeFiles/com.github.philip-scott.notes-up.dir/all] Error 2
make[1]: se sale del directorio '/var/tmp/pamac-build-ernesto/notes-up/src/Notes-up-2.0.2/build'
make: *** [Makefile:130: all] Error 2

Steps to Reproduce (for bugs)

Your Environment (for bugs)

Drulex commented 4 years ago

Same here on 5.4.18-1-MANJARO

elacalle commented 4 years ago

Same here on 5.4.18-1-MANJARO

I achieved install it using the flatpak package instead compiling it:

https://flathub.org/apps/details/com.github.philip_scott.notes-up

Drulex commented 4 years ago

Same here on 5.4.18-1-MANJARO

I achieved install it using the flatpak package instead compiling it:

https://flathub.org/apps/details/com.github.philip_scott.notes-up

FYI Although I know absolutely nothing about Vala, I added an arbitrary size to that public char markdown_version[] buffer and the compiler seems to be happy. The app now compiles.

image

Justinzobel commented 4 years ago

Any update on this one? I'm also getting the same.

Philip-Scott commented 4 years ago

@Drulex Ha! Nice hack to go around this issue :smile: I'll push that as a fix, thanks :)

Philip-Scott commented 4 years ago

Fixed in 248c94feb79d6e4467bb0f9614bc0a1e2846f79c

Justinzobel commented 4 years ago

@Philip-Scott any chance of a version bump for this fix?