Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add OpenBSD support #189

Closed
aedaniloff opened this issue Nov 29, 2024 · 5 comments
Closed

Add OpenBSD support #189

aedaniloff opened this issue Nov 29, 2024 · 5 comments

Comments

@aedaniloff
Copy link

  1. For actual OpenBSD release (7.6) "meson-setup.sh build" returns an error:
Check usable header "sys/event.h" : NO

src/meson.build:11:6: ERROR: Problem encountered: Couldn't determine notify implementation. Please set it with -Dnotify-implementation=<inotify or kqueue> when creating the builddir.

Adding "-Dnotify-implementation=kqueue" to meson-setup.sh script fix this issue, build and compile works fine.

  1. "meson install" puts man page file j4-dmenu-desktop.1 to "/usr/local/share/man" folder, but for OpenBSD this path is not default for man pages, so "man j4-dmenu-desktop" shows nothing. For OpenBSD the default path for man pages is "/usr/local/man".
@meator
Copy link
Collaborator

meator commented Nov 29, 2024

You can use standard Meson flags to override manpage location. To do this, set up the builddir as follows:

meson setup -Dprefix=/usr -Dmandir=local/man --buildtype=release build

Use

meson install --dry-run

in the builddir to see where will the files be put before installing j4-dmenu-desktop to your system. You can also invoke ninja uninstall (if you're using ninja) to uninstall j4-dmenu-desktop.

About the first issue: please post the <builddir>/meson-logs/meson-log.txt file of the failed builddir here. Are you really able to compile and run j4-dmenu-desktop when you set -Dnotify-implementation=kqueue? j4-dmenu-desktop should fail if you lack the sys/event.h header file.

@aedaniloff
Copy link
Author

aedaniloff commented Nov 29, 2024

You can use standard Meson flags to override manpage location.

Thank you, I'll keep it in mind.

please post the /meson-logs/meson-log.txt file of the failed builddir here

Two logfiles attached: with error and without error (after -Dnotify-implementation=kqueue was set).
meson-log-with-error.txt
meson-log-without-error.txt

Are you really able to compile and run j4-dmenu-desktop when you set -Dnotify-implementation=kqueue? j4-dmenu-desktop should fail if you lack the sys/event.h header file.

Yes, I have successfully compiled and run j4-meny-desktop, for now I don't have any problems with it, works fine. And I have sys/event.h file in my default OpenBSD install:

$ locate sys/event.h
/usr/include/sys/event.h
/usr/src/lib/libc/hidden/sys/event.h
/usr/src/sys/sys/event.h

@meator
Copy link
Collaborator

meator commented Nov 29, 2024

@aedaniloff Does the following patch fix the issue for you? fix-openbsd.patch.txt

Also, are you getting any compiler warnings when compiling j4-dmenu-desktop (with/without the patch)?

@aedaniloff
Copy link
Author

Yes, this patch completely fix the issue with "meson-setup.sh build". Thank you!

Also, are you getting any compiler warnings when compiling j4-dmenu-desktop (with/without the patch)?

Only one warning on "meson install" step:

[5/7] Compiling C++ object subprojects/Catch2-3.7.1/src/catch2/libCatch2.a.p/meson-generated_Catch2-unity0.cpp.o
In file included from subprojects/Catch2-3.7.1/src/catch2/libCatch2.a.p/Catch2-unity0.cpp:75:
/home/alexd/j4-dmenu-desktop/build/../subprojects/Catch2-3.7.1/src/catch2/catch_approx.cpp:19:6: warning: unused function 'marginComparison' [-Wunused-function]
bool marginComparison(double lhs, double rhs, double margin) {
     ^
1 warning generated.

With or without the patch - warning is the same, no diffs.

@meator meator closed this as completed in a0f79e8 Nov 29, 2024
@meator
Copy link
Collaborator

meator commented Nov 29, 2024

Thanks for your feedback! The issue should be fixed in develop now. I also plan to release r3.2 on the first of December, so the fix will be released swiftly.

I try to support BSDs well, but I personally don't use them, and testing j4-dmenu-desktop through a VM can be complicated. I currently conduct testing for FreeBSD only, which worked without problems (because the header resolution is a bit different there). I have tried to set up OpenBSD on a VM, but it doesn't detect my keyboard (my FreeBSD VM also isn't perfect, my mouse doesn't work there, but I don't require it, I guess I'm not very lucky when it comes to these sorts of stuff).

The sys/event.h header is required for live desktop file detection mechanism of j4-dmenu-desktop. When j4-dmenu-desktop is used with --wait-on, j4-dmenu-desktop can detect when desktop files are added/deleted/updated and update its internal database. In contrast to Linux notify implementation, kqueue notify implementation checks for updates every minute, so it can have some delay.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants