Closed umlaeute closed 4 years ago
Thanks. Can you point out which usage of <sys/sysctl.h>
causes problems?
afaik, the entire file sys/sysctl.h
will not be available if you have glibc>=2.32 installed.
so any use will just result in a FTBFS.
I don't see really problematic cases here: that https://github.com/grame-cncm/faust/search?q=sysctl.h&unscoped_q=sysctl.h
Do you see any?
this seems to be an unconditional include (not protected by an HAVE_SYS_SYSCTL_H
guard) on linux systems.
if the file is not there i expect this to fail. (but haven't tested)
but if course i don't really know which files are actually used in which contexts.
if i remove sys/sysctl.h
from my filesystem, i can still compile faust itself.
but i have no idea if using faust might trigger the inclusion of (e.g.) scheduler.cpp
(with whatever options)
a well, here goes:
$ sudo find /usr/include/ -path "*sys/sysctl.h" -delete
$ faust2jackconsole --scheduler lowCut.dsp
lowCut.dsp.cpp:17567:10: fatal error: sys/sysctl.h: No such file or directory
17567 | #include <sys/sysctl.h>
| ^~~~~~~~~~~~~~
compilation terminated.
if i remove the #include <sys/sysctl.h>
line form scheduler.cpp
, the compilation succeeds.
i guess the include is really only needed on __APPLE__
, where you call sysctlbyname()
.
i don't know about llvm-dsp-multi.h
(and won't investigate further, as i think you know the code better than me)
Right. Should be fixed in https://github.com/grame-cncm/faust/commit/1b907100c7d87f5a149af4d67941ac35cf7b917f
just noticed that faust
doesn't even compile on GNU/Hurd, because of this line: https://github.com/grame-cncm/faust/blob/8e766001e2f1341e07a3f80fe944701c84362461/compiler/generator/tools.cpp#L88-L91
is there any specific reason to include sys/sysctl.h
here? it doesn't seem to be used at all.
@sletz should i open a separate (new) ticket?
Probably a typo,#include <sys/sysctl.h>
removed on my local version. Will push soon.
actually you will need to include a header file for the definition of size_t
.
so you could just replace the includes:
--- faust-2.30.5.orig/compiler/generator/tools.cpp
+++ faust-2.30.5/compiler/generator/tools.cpp
@@ -87,7 +87,7 @@ size_t cache_line_size()
#else
#warning Unrecognized platform
-#include <sys/sysctl.h>
+#include <cstddef>
size_t cache_line_size()
{
return 0;
OK, thanks.
Forwarding a bug that was reported against the Debian package, but which i believe is of general concern:
Version 2.32 of glibc will not ship the
sysctl()
function and the<sys/sysctl.h>
header any more.sysctl
itself has been deprecated in Linux and will be removed. faust is using it, so will start FTBFS when distributions switch to glibc-2.32.glibc-2.32 was released last week, so i guess problems will start to appear sooner rather than later.