edits made to make build work on centos 7
To make pipewire build on CentOS 7, I had to hack a bit in the code. I'm not claiming they are bugs. I'd just like to share my findings and hope something useful may come from it.
Also I'd like to thank @gkiagia for helping me on #Freenode with getting pipewire build.
I couldn't find a build option to disable video support, is there one? Where can I find a full list of build options? I was expecting something in INSTALL.md.
diff -ruw pipewire-0.3.24/src/examples/meson.build pipewire-0.3.24_patched/src/examples/meson.build
--- pipewire-0.3.24/src/examples/meson.build 2021-03-18 14:50:04.000000000 +0100
+++ pipewire-0.3.24_patched/src/examples/meson.build 2021-03-25 14:41:40.201948727 +0100
@@ -1,24 +1,3 @@
-executable('video-src',
- 'video-src.c',
- c_args : [ '-D_GNU_SOURCE' ],
- install : installed_tests_enabled,
- install_dir : join_paths(installed_tests_execdir, 'examples'),
- dependencies : [pipewire_dep, mathlib],
-)
-executable('video-src-alloc',
- 'video-src-alloc.c',
- c_args : [ '-D_GNU_SOURCE' ],
- install : installed_tests_enabled,
- install_dir : join_paths(installed_tests_execdir, 'examples'),
- dependencies : [pipewire_dep, mathlib],
-)
-executable('video-src-reneg',
- 'video-src-reneg.c',
- c_args : [ '-D_GNU_SOURCE' ],
- install : installed_tests_enabled,
- install_dir : join_paths(installed_tests_execdir, 'examples'),
- dependencies : [pipewire_dep, mathlib],
-)
executable('audio-src',
'audio-src.c',
c_args : [ '-D_GNU_SOURCE' ],
This header seems to be missing and gcc-11.2 complained about it.
diff -ruw pipewire-0.3.24/src/pipewire/impl-core.c pipewire-0.3.24_patched/src/pipewire/impl-core.c
--- pipewire-0.3.24/src/pipewire/impl-core.c 2021-03-18 14:50:04.000000000 +0100
+++ pipewire-0.3.24_patched/src/pipewire/impl-core.c 2021-03-25 14:10:58.308151271 +0100
@@ -22,6 +22,8 @@
* DEALINGS IN THE SOFTWARE.
*/
+#include <fcntl.h>
+
#include "config.h"
#include <unistd.h>
Another "is there a switch for this?" situation.
diff -ruw pipewire-0.3.24/src/pipewire/mem.c pipewire-0.3.24_patched/src/pipewire/mem.c
--- pipewire-0.3.24/src/pipewire/mem.c 2021-03-18 14:50:04.000000000 +0100
+++ pipewire-0.3.24_patched/src/pipewire/mem.c 2021-03-25 14:40:49.619674543 +0100
@@ -57,7 +57,7 @@
return syscall(SYS_memfd_create, name, flags);
}
-#define HAVE_MEMFD_CREATE 1
+#define HAVE_MEMFD_CREATE 0
#endif
#ifdef __FreeBSD__