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

[Build] nob build fails for macOS with "undeclared function 'kill'" #110

Closed
jgabaut opened this issue May 11, 2024 · 0 comments
Closed

[Build] nob build fails for macOS with "undeclared function 'kill'" #110

jgabaut opened this issue May 11, 2024 · 0 comments

Comments

@jgabaut
Copy link
Contributor

jgabaut commented May 11, 2024

The latest additions cause the nob build to fail on macOS.

Since I noticed a TODO in the source about checking the build for macOS, I went ahead and did so, and can confirm that commit 070b88ce can build and run correctly on Darwin kernel 23.4.0 arm64.

Then, I checked the subsequent commit c8486721, and it seems to still build fine.

The first commit that breaks is 1d229d93.

This commit introduces this line:

if (cancel) kill(pid, SIGKILL);

The workflow fails with:

./src/ffmpeg_linux.c:102:17: error: call to undeclared function 'kill'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]

From my searches, defining _POSIX_C_SOURCE as a high enough value should ensure this does not happen, and it needs to be defined before any other definition.

Alas, I haven't been able to fix it.

Maybe it should be passed as a definition to the compiler instead, if there is no clear path to defining it first. Or it may be a red herring.

Edit: it seems _POSIX_C_SOURCE is not needed, but including signal.h is required from clang or something...
I opened #111 to add the line.

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 a pull request may close this issue.

2 participants