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

FreeBSD: numba/np/ufunc/workqueue.c:30:10: fatal error: 'alloca.h' file not found #6037

Closed
karolyi opened this issue Jul 26, 2020 · 1 comment
Labels

Comments

@karolyi
Copy link
Contributor

karolyi commented Jul 26, 2020

So after fixing the FreeBSD build in llvmlite, I get a somewhat weird message upon trying to install numba.

The compilation error is:

numba/np/ufunc/workqueue.c:30:10: fatal error: 'alloca.h' file not found

Upon searching for alloca.h, I found a similar file in /usr/local/include/glib-2.0/glib/galloca.h.

Any suggestions?

@karolyi
Copy link
Contributor Author

karolyi commented Jul 26, 2020

Okay, so the FreeBSD ports (compiling numba from the source) includes a diff to workqueue.c:

--- numba/npyufunc/workqueue.c.orig     2018-11-14 22:14:35 UTC
+++ numba/npyufunc/workqueue.c
@@ -19,7 +19,11 @@ race condition.
 /* PThread */
 #include <pthread.h>
 #include <unistd.h>
+#if defined(__FreeBSD__)
+#include <stdlib.h>
+#else
 #include <alloca.h>
+#endif
 #define NUMBA_PTHREAD
 #endif

Please add this to workqueue.c so it can compile effortlessly on FreeBSD.

@sklam sklam added the bug label Jul 27, 2020
@sklam sklam added this to the Numba 0.52 RC milestone Jul 27, 2020
@sklam sklam closed this as completed in d6909e4 Sep 9, 2020
sklam added a commit that referenced this issue Sep 9, 2020
Closes #6037, fixing FreeBSD compilation
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants