Closed barracuda156 closed 4 months ago
You need to apply Apple/llvm.patch
in order for notekit to build. The homebrew package does this automatically.
You need to apply
Apple/llvm.patch
in order for notekit to build. The homebrew package does this automatically.
@sp1ritCS Thank you, will try that. The patch is only needed if building with Clang, not with GCC, right?
UPD. Clang build works now, thank you. I will try if it is needed with GCC.
@sp1ritCS Builds on Sonoma, but segfaults:
svacchanda@43-42 files % /opt/local/bin/notekit
(process:18440): glibmm-CRITICAL **: 04:38:14.328: Class::register_derived_type(): base_query.type_name is NULL.
WARNING: Could not create default base path '/Users/svacchanda/.local/share/notekit'. Falling back to current working directory.
== This is notekit, built at Thu Mar 14 09:08:54 2024. ==
Detected paths:
Default notes path: notesbase
Resource path: .
JSON config path: /Users/svacchanda/.config/notekit
(notekit:18440): GLib-GIO-CRITICAL **: 04:38:14.525: g_settings_new_full: assertion 'schema != NULL' failed
zsh: segmentation fault /opt/local/bin/notekit
Did I do something wrong here? Only that patch being applied.
This is caused by
(notekit:18440): GLib-GIO-CRITICAL **: 04:38:14.525: g_settings_new_full: assertion 'schema != NULL' failed
.
Which means it's unable to find the gsettings schema. It shoud automatically get installed in the right location when doing ninja install, but maybe not on osx. Maybe check if (and where) it gets installed and that glib-compile-schemas was invoked in the right directory.
Are you just attempting to build NoteKit by itself (maybe try the meson devenv), or are you attempting to package it? (in this case you might need to run glib-compile-schemas as install scriptlet)
Note: notekit also looks up the schema in it's resources dir, which in your case falls back to .
so it insn't installed correctly.
@sp1ritCS I am writing a port for it for MacPorts.
Here what gets installed:
a ./opt
a ./opt/local
a ./opt/local/bin
a ./opt/local/share
a ./opt/local/share/icons
a ./opt/local/share/applications
a ./opt/local/share/metainfo
a ./opt/local/share/glib-2.0
a ./opt/local/share/notekit
a ./opt/local/share/notekit/sourceview
a ./opt/local/share/notekit/data
a ./opt/local/share/notekit/data/toolbar.glade
a ./opt/local/share/notekit/data/preferences.glade
a ./opt/local/share/notekit/data/default_config.json
a ./opt/local/share/notekit/data/stylesheet.css
a ./opt/local/share/notekit/data/icons
a ./opt/local/share/notekit/data/fonts
a ./opt/local/share/notekit/data/fonts/Charter Bold.otf
a ./opt/local/share/notekit/data/fonts/Charter license.txt
a ./opt/local/share/notekit/data/fonts/Charter Bold Italic.otf
a ./opt/local/share/notekit/data/fonts/Charter Regular.otf
a ./opt/local/share/notekit/data/fonts/Charter Italic.otf
a ./opt/local/share/notekit/data/icons/hicolor
a ./opt/local/share/notekit/data/icons/hicolor/index.theme
a ./opt/local/share/notekit/data/icons/hicolor/scalable
a ./opt/local/share/notekit/data/icons/hicolor/scalable/emblems
a ./opt/local/share/notekit/data/icons/hicolor/scalable/emblems/large-pen-symbolic.svg
a ./opt/local/share/notekit/data/icons/hicolor/scalable/emblems/pick-color-symbolic.svg
a ./opt/local/share/notekit/data/icons/hicolor/scalable/emblems/maximize-symbolic.svg
a ./opt/local/share/notekit/data/icons/hicolor/scalable/emblems/maximize.svg
a ./opt/local/share/notekit/data/icons/hicolor/scalable/emblems/minimize.svg
a ./opt/local/share/notekit/data/icons/hicolor/scalable/emblems/medium-pen-symbolic.svg
a ./opt/local/share/notekit/data/icons/hicolor/scalable/emblems/pen-tool-symbolic.svg
a ./opt/local/share/notekit/data/icons/hicolor/scalable/emblems/small-pen-symbolic.svg
a ./opt/local/share/notekit/data/icons/hicolor/scalable/emblems/minimize-symbolic.svg
a ./opt/local/share/notekit/data/icons/hicolor/scalable/emblems/select-symbolic.svg
a ./opt/local/share/notekit/data/icons/hicolor/scalable/emblems/text-symbolic.svg
a ./opt/local/share/notekit/data/icons/hicolor/scalable/emblems/eraser-tool-symbolic.svg
a ./opt/local/share/notekit/sourceview/markdownlisting.lang
a ./opt/local/share/notekit/sourceview/language.rng
a ./opt/local/share/notekit/sourceview/markdown.lang
a ./opt/local/share/notekit/sourceview/language.dtd
a ./opt/local/share/notekit/sourceview/classic.xml
a ./opt/local/share/notekit/sourceview/markdown.lang.in
a ./opt/local/share/notekit/sourceview/language2.rng
a ./opt/local/share/notekit/sourceview/notekit.xml
a ./opt/local/share/notekit/sourceview/markdown-basic.lang
a ./opt/local/share/notekit/sourceview/def.lang
a ./opt/local/share/notekit/sourceview/styles.rng
a ./opt/local/share/glib-2.0/schemas
a ./opt/local/share/glib-2.0/schemas/com.github.blackhole89.notekit.gschema.xml
a ./opt/local/share/metainfo/com.github.blackhole89.notekit.metainfo.xml
a ./opt/local/share/applications/com.github.blackhole89.notekit.desktop
a ./opt/local/share/icons/hicolor
a ./opt/local/share/icons/hicolor/128x128
a ./opt/local/share/icons/hicolor/scalable
a ./opt/local/share/icons/hicolor/scalable/apps
a ./opt/local/share/icons/hicolor/scalable/apps/com.github.blackhole89.notekit.svg
a ./opt/local/share/icons/hicolor/128x128/apps
a ./opt/local/share/icons/hicolor/128x128/apps/com.github.blackhole89.notekit.png
a ./opt/local/bin/notekit
So yeah, it looks in a wrong directory for some reason.
@sp1ritCS Perhaps it installs in a standard Unix way, but the code arbitrarily assumes app bundle?
UPD. Ah, that’s why, search paths are wrong: https://github.com/blackhole89/notekit/blob/ff37a8b9115bd3a023ca8c6d80ad923af8d9df8f/README.md?plain=1#L92
UPD2. Fixing the path in mainwindow did not fix the issue on its own. Will look into this further.
Okay, fixed, should have called explicitly
post-activate {
system "${prefix}/bin/gtk-update-icon-cache-3.0 -f -t ${prefix}/share/icons/hicolor"
system "${prefix}/bin/update-desktop-database ${prefix}/share/applications"
system "${prefix}/bin/glib-compile-schemas ${prefix}/share/glib-2.0/schemas"
}
@sp1ritCS Okay, done: https://ports.macports.org/port/notekit/details
Builds and works on PowerPC :) Here I destroy some random README: