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 #79

Merged
merged 3 commits into from
Feb 24, 2024
Merged

Add OpenBSD Support #79

merged 3 commits into from
Feb 24, 2024

Conversation

LainLayer
Copy link
Contributor

Minor nob modifications to support compiling on OpenBSD.
Hot reloading seems to work, so does rendering.

The audio when playing an audio file sounds very slowed down, too bad, I don't know how to fix it. Everything else works :)

- OpenBSD apparently provided -ldl by default, no need to link with it
- The X11 library location needed to be explicitly specified
@LainLayer
Copy link
Contributor Author

It seems the messed up audio is a general Raylib/miniaudio phenomena on OpenBSD and not a fault in the musializer code. Considering no one cares about OpenBSD, it will likely take a while until it is fixed. Until then it at least compiles and runs.

@ismagilli
Copy link
Contributor

ismagilli commented Feb 23, 2024

On FreeBSD dl* functions live in libc. On linux ld* functions placed in a separate library (libdl). I think the situation with OpenBSD is similar to the situation with FreeBSD. Possible solution: ln -s /usr/lib/libc.so /usr/lib/libdl.so as root. @LainLayer It seems to me that it is better to use the same implementation of nob on linux and BSD, put the -ldl flag in a separate call to the nob_cmd_append function and wrap it in ifdef-endif. And maybe rename target from LINUX to UNIX.

BSD detection (see boost/bsd.hpp):

#if defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__) || defined(__DragonFly__)
// Your code here...
#endif

@ismagilli
Copy link
Contributor

Note that this is only MY opinion. It is better to wait rexim reply.

@rexim rexim merged commit 18b45e6 into tsoding:master Feb 24, 2024
4 checks passed
@rexim
Copy link
Member

rexim commented Feb 24, 2024

@ismagilli I was thinking about making a more general POSIX builder sort of speak. But I'll do it myself later.

Thank you for the contribution guys!

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

Successfully merging this pull request may close these issues.

3 participants