pkgsrc-Bugs archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
pkg/53305: [patch] Fix audio/pulseaudio build with glibc 2.27
>Number: 53305
>Category: pkg
>Synopsis: [patch] Fix audio/pulseaudio build with glibc 2.27
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: pkg-manager
>State: open
>Class: change-request
>Submitter-Id: net
>Arrival-Date: Tue May 22 13:35:00 +0000 2018
>Originator: nia
>Release: current
>Organization:
>Environment:
Linux zenbook 4.16.9-1-ARCH #1 SMP PREEMPT Thu May 17 02:10:09 UTC 2018 x86_64 GNU/Linux
>Description:
PulseAudio defines a symbol that conflicts with a new symbol introduced with glibc 2.27. This checks for the existence of the symbol in the C library and avoids defining it twice if found, fixing the build.
This is based on the following upstream commit: https://github.com/pulseaudio/pulseaudio/commit/dfb0460fb4743aec047cdf755a660a9ac2d0f3fb
which will be included with the next stable release of pulseaudio.
>How-To-Repeat:
>Fix:
Index: distinfo
===================================================================
RCS file: /cvsroot/pkgsrc/audio/pulseaudio/distinfo,v
retrieving revision 1.63
diff -u -r1.63 distinfo
--- distinfo 2 Oct 2017 19:21:15 -0000 1.63
+++ distinfo 22 May 2018 13:17:46 -0000
@@ -5,10 +5,11 @@
SHA512 (pulseaudio-11.1.tar.xz) = 8863d8d7aede0d9a4d158e84e7bece91747c335f9ac98c7b21fafe76b762f8817e1125307aa46e561e540d2c40525e91f51a55ec34ac55d58fd5980199856a7a
Size (pulseaudio-11.1.tar.xz) = 1648924 bytes
SHA1 (patch-aa) = d99611639f360bb274a2a24636a3cce122cb10fc
-SHA1 (patch-configure.ac) = ceb209d48d7e484b21c2f00282b32440dafee7d5
+SHA1 (patch-configure.ac) = ec7b610376aa3504dc9244de83e3d7d053819ee3
SHA1 (patch-src_Makefile.am) = debe40be5d1155f6cb0d5ae90119dece4e090b02
SHA1 (patch-src_modules_module-detect.c) = f202194b03a2023959d772392d58297f963f0ada
SHA1 (patch-src_modules_oss_module-oss.c) = 399ac178ae832619253ce8dd985edbed23db86e7
+SHA1 (patch-src_pulsecore_memfd-wrappers.h) = e39b3bff363bb5f8a4f21f879d56cd6f3df460ac
SHA1 (patch-src_pulsecore_mix__neon.c) = 6f6d33d38024d65045d637d48276e1ba92b81342
SHA1 (patch-src_pulsecore_svolume__mmx.c) = c34d153e3bfdb812eb7bd70fa330a9ec674c2dc2
SHA1 (patch-src_pulsecore_svolume__sse.c) = 47c97c1af947133f2a7b330aed38792bb0e7ef09
Index: patches/patch-configure.ac
===================================================================
RCS file: /cvsroot/pkgsrc/audio/pulseaudio/patches/patch-configure.ac,v
retrieving revision 1.9
diff -u -r1.9 patch-configure.ac
--- patches/patch-configure.ac 8 Sep 2017 02:27:44 -0000 1.9
+++ patches/patch-configure.ac 22 May 2018 13:17:46 -0000
@@ -7,8 +7,10 @@
* Install default config files in example directory; pkgsrc config
file framework will install them in the right place.
* Avoid hardcoded SDK paths on Darwin.
+* Check for memfd_create instead of assuming libc does not define it.
+ (Will be included in next release after 11.1)
---- configure.ac.orig 2016-06-22 06:53:09.000000000 +0000
+--- configure.ac.orig 2017-09-05 10:46:23.000000000 +0000
+++ configure.ac
@@ -21,7 +21,7 @@
@@ -27,7 +29,17 @@
os_is_linux=1
;;
freebsd*)
-@@ -1041,7 +1040,7 @@ AS_IF([test "x$HAVE_DBUS" = "x1"], AC_DE
+@@ -607,6 +606,9 @@ AS_IF([test "x$enable_memfd" = "xyes" &&
+ [AC_MSG_ERROR([*** Your Linux kernel does not support memfd shared memory.
+ *** Use linux v3.17 or higher for such a feature.])])
+
++AS_IF([test "x$HAVE_MEMFD" = "x1"],
++ AC_CHECK_FUNCS([memfd_create]))
++
+ AC_SUBST(HAVE_MEMFD)
+ AM_CONDITIONAL([HAVE_MEMFD], [test "x$HAVE_MEMFD" = x1])
+ AS_IF([test "x$HAVE_MEMFD" = "x1"], AC_DEFINE([HAVE_MEMFD], 1, [Have memfd shared memory.]))
+@@ -1031,7 +1033,7 @@ AS_IF([test "x$HAVE_DBUS" = "x1"], AC_DE
PA_MACHINE_ID="${sysconfdir}/machine-id"
AX_DEFINE_DIR(PA_MACHINE_ID, PA_MACHINE_ID, [D-Bus machine-id file])
@@ -36,7 +48,7 @@
AX_DEFINE_DIR(PA_MACHINE_ID_FALLBACK, PA_MACHINE_ID_FALLBACK,
[Fallback machine-id file])
-@@ -1364,9 +1363,9 @@ fi
+@@ -1330,9 +1332,9 @@ fi
PA_SYSTEM_RUNTIME_PATH="${localstatedir}/run/pulse"
AX_DEFINE_DIR(PA_SYSTEM_RUNTIME_PATH, PA_SYSTEM_RUNTIME_PATH, [System runtime dir])
@@ -48,7 +60,7 @@
AX_DEFINE_DIR(PA_SYSTEM_STATE_PATH, PA_SYSTEM_STATE_PATH, [System state dir])
PA_BINARY=${bindir}/pulseaudio${EXEEXT}
-@@ -1378,8 +1377,9 @@ AX_DEFINE_DIR(PACTL_BINARY, PACTL_BINARY
+@@ -1344,8 +1346,9 @@ AX_DEFINE_DIR(PACTL_BINARY, PACTL_BINARY
AC_SUBST(PA_SOEXT, [.so])
AC_DEFINE(PA_SOEXT, [".so"], [Shared object extension])
Index: patches/patch-src_pulsecore_memfd-wrappers.h
===================================================================
RCS file: patches/patch-src_pulsecore_memfd-wrappers.h
diff -N patches/patch-src_pulsecore_memfd-wrappers.h
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ patches/patch-src_pulsecore_memfd-wrappers.h 22 May 2018 13:17:46 -0000
@@ -0,0 +1,30 @@
+$NetBSD$
+
+If glibc provides memfd_create, pulseaudio must not define it,
+otherwise building fails due to conflict between the two implementations
+of the same function.
+
+memfd_create is included in >=glibc-2.27.
+
+Bug: https://bugs.freedesktop.org/show_bug.cgi?id=104733
+Commit: https://github.com/pulseaudio/pulseaudio/commit/dfb0460fb4743aec047cdf755a660a9ac2d0f3fb
+
+--- src/pulsecore/memfd-wrappers.h.orig 2016-08-23 12:50:11.000000000 +0000
++++ src/pulsecore/memfd-wrappers.h
+@@ -20,7 +20,7 @@
+ License along with PulseAudio; if not, see <http://www.gnu.org/licenses/>.
+ ***/
+
+-#ifdef HAVE_MEMFD
++#if defined(HAVE_MEMFD) && !defined(HAVE_MEMFD_CREATE)
+
+ #include <sys/syscall.h>
+ #include <fcntl.h>
+@@ -63,6 +63,6 @@ static inline int memfd_create(const cha
+ #define F_SEAL_WRITE 0x0008 /* prevent writes */
+ #endif
+
+-#endif /* HAVE_MEMFD */
++#endif /* HAVE_MEMFD && !HAVE_MEMFD_CREATE */
+
+ #endif
Home |
Main Index |
Thread Index |
Old Index