-
Notifications
You must be signed in to change notification settings - Fork 20
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
Version 0.0.95 fails to compile on FreeBSD #105
Comments
Through some blind prodding I got it to compile: I don't know if gbsplay really works that way, because I only have a remote shell account and can't test it properly. We'll then have to find out how to set that flag automatically - or even better, what to do so we don't have to set it at all. I think we need some BSD expertise here. |
That worked. I'll further test the functionality. |
From what I can tell, |
See also kcat/openal-soft#4 (comment) May help with #105
Unfortunately dfa1f23 didn't solve the issue. See: Adding See: |
I've tried to make a minimal broken example that we can include in our configure script to eg. detect if using Unfortunately I could not get an example that does not compile. This compiles cleanly when just called as #include <sys/soundcard.h>
#include <stdio.h>
int main(int argc, char **argv) {
snd_capabilities capabilites;
printf("%ld\n", sizeof(capabilites));
return 0;
} The I have also found out that |
I have bisected the code and found the culprit: Commit fad6a3e introduces the POSIX-enablement flags GBSCFLAGS := -D_XOPEN_SOURCE=500 -D_POSIX_C_SOURCE=200809L which seem to disable |
We now have a CI pipeline that is able to reproduce this very bug and thus fails 😉 |
@mmitch Big thanks for sorting out the FreeBSD issue with GBSplay. Really appreciate your effort! Having a FreeBSD pipeline is an awesome bonus! |
The FreeBSD build was broken because special typedefs like `u_long` and `u_char` weren't known when including `sys/soundcard.h` during compile. When we introduced some strict POSIX/C11 flags with commit fad6a3e, this seems to have disabled the __BSD_VISIBLE flag on FreeBSD which made these typedefs disappear (there is a `#if __BSD_VISIBLE` guard in `sys/types.h`). We don't know the reason for disabling `__BSD_VISIBLE` (perhaps it is along the line of "if you want POSIX, you don't get BSD enhancements") and we don't know if there are adverse side-effects to manually enabling `__BSD_VISIBLE`, but for now it works. If anybody has deeper understanding of this and a better way to fix this, please speak up :) This fixes issue #105. (n.b.: `sys/soundcard.h` contains two sound systems: AIO and OSS. The missing typedefs are only used for AIO while we only need OSS. So if that header file would have been split into two seperate files, we would not have run into this problem. The OSS part should work fine with the POSIX/C11 flags without setting `__BSD_VISIBLE`.)
The FreeBSD build was broken because special typedefs like `u_long` and `u_char` weren't known when including `sys/soundcard.h` during compile. When we introduced some strict POSIX/C11 flags with commit fad6a3e, this seems to have disabled the __BSD_VISIBLE flag on FreeBSD which made these typedefs disappear (there is a `#if __BSD_VISIBLE` guard in `sys/types.h`). We don't know the reason for disabling `__BSD_VISIBLE` (perhaps it is along the line of "if you want POSIX, you don't get BSD enhancements") and we don't know if there are adverse side-effects to manually enabling `__BSD_VISIBLE`, but for now it works. If anybody has deeper understanding of this and a better way to fix this, please speak up :) This fixes issue #105. (n.b.: `sys/soundcard.h` contains two sound systems: AIO and OSS. The missing typedefs are only used for AIO while we only need OSS. So if that header file would have been split into two seperate files, we would not have run into this problem. The OSS part should work fine with the POSIX/C11 flags without setting `__BSD_VISIBLE`.)
The FreeBSD build was broken because special typedefs like `u_long` and `u_char` weren't known when including `sys/soundcard.h` during compile. When we introduced some strict POSIX/C11 flags with commit fad6a3e, this seems to have disabled the __BSD_VISIBLE flag on FreeBSD which made these typedefs disappear (there is a `#if __BSD_VISIBLE` guard in `sys/types.h`). We don't know the reason for disabling `__BSD_VISIBLE` (perhaps it is along the line of "if you want POSIX, you don't get BSD enhancements") and we don't know if there are adverse side-effects to manually enabling `__BSD_VISIBLE`, but for now it works. If anybody has deeper understanding of this and a better way to fix this, please speak up :) This fixes issue #105. (n.b.: `sys/soundcard.h` contains two sound systems: AIO and OSS. The missing typedefs are only used for AIO while we only need OSS. So if that header file would have been split into two seperate files, we would not have run into this problem. The OSS part should work fine with the POSIX/C11 flags without setting `__BSD_VISIBLE`.)
@ehaupt Could you please test it? |
I think we'll do another release then, even if it breaks our habit of multiple years going by between releases… |
Trying to compile version
0.0.95
I get:Including
<sys/types.h>
does not help.Full build log
The text was updated successfully, but these errors were encountered: