pkgsrc-Bugs archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: pkg/49416: pkgsrc/audio/pulseaudio build failure on NetBSD/arm 6.1.5
The following reply was made to PR pkg/49416; it has been noted by GNATS.
From: Izumi Tsutsui <tsutsui%ceres.dti.ne.jp@localhost>
To: gnats-bugs%NetBSD.org@localhost
Cc: tsutsui%ceres.dti.ne.jp@localhost
Subject: Re: pkg/49416: pkgsrc/audio/pulseaudio build failure on NetBSD/arm
6.1.5
Date: Sat, 29 Nov 2014 01:33:51 +0900
> CCLD pactl
> /usr/obj.evbarm/pkgsrc/audio/pulseaudio/work.arm/.buildlink/lib/libjson-c.so: undefined reference to `__sync_val_compare_and_swap_4'
> Makefile:6088: recipe for target 'pacat' failed
As the log message said, this is not pulseaudio problem
but textproc/json-c atomic op problem.
textproc/json-c/patches/patch-linkhash.c is incomplete.
The following dumb patch works around.
---
$NetBSD: patch-linkhash.c,v 1.1 2014/05/10 04:09:41 pho Exp $
- GCC < 4.1 does not have atomic builtins.
- use NetBSD native atomic_ops(3)
TODO: This check should really be moved to configure.ac.
--- linkhash.c.orig 2014-04-11 00:41:08.000000000 +0000
+++ linkhash.c
@@ -21,6 +21,10 @@
# include <endian.h> /* attempt to define endianness */
#endif
+#if defined(__NetBSD__)
+# include <sys/atomic.h>
+#endif
+
#include "random_seed.h"
#include "linkhash.h"
@@ -405,7 +409,9 @@
int seed;
/* we can't use -1 as it is the unitialized sentinel */
while ((seed = json_c_get_random_seed()) == -1);
-#if defined __GNUC__
+#if defined(__NetBSD__)
+ atomic_cas_uint((unsigned int *)&random_seed, -1, seed);
+#elif defined __GNUC__ && __GNUC__ >= 4 && __GNUC_MINOR__ >= 1
__sync_val_compare_and_swap(&random_seed, -1, seed);
#elif defined _MSC_VER
InterlockedCompareExchange(&random_seed, seed, -1);
---
Izumi Tsutsui
Home |
Main Index |
Thread Index |
Old Index