Bug#555538: snd - FTBFS: error: Seems like an unsupported hardware for jack.

Adrian Knoth adi at drcomp.erfurt.thur.de
Tue Nov 10 13:07:38 UTC 2009


On Tue, Nov 10, 2009 at 10:09:27AM +0100, Bastian Blank wrote:

> >   environs...............: s390-ibm-linux-gnu gcc

> > audio.c:7056:2: error: #error "Seems like an unsupported hardware
> > for jack. Please contact k.s.matheussen at notam02.no"

Oh no, they use inline-asm for atomic ops. With the current source, the
package can only be built on x86, amd64 and powerpc(64).

You'd end up with FTBFS on sparc, mipsel and all other CPUs.

We had the same problem with FFADO, see e.g.

   http://subversion.ffado.org/ticket/197


The generic solution is the use gcc builtins. This requires gcc-4.1 or
newer and at least some kind of underlying hardware atomic ops:

   http://gcc.gnu.org/onlinedocs/gcc-4.1.2/gcc/Atomic-Builtins.html


So you could replace (patch) the code in audio.c:7056 with

  static inline void __attribute__ ((__unused__)) atomic_add(volatile
int* __mem, int __val)
{
     __sync_add_and_fetch (__mem, __val);
}


or if the target doesn't support __sync_add_and_fetch, mimic it via
compare-and-swap:

static inline void __attribute__ ((__unused__)) atomic_add(volatile int*
__mem, int __val)
{
    int actual;
    do {
        actual = *__mem;
    } while (! __sync_bool_compare_and_swap (__mem, actual, actual + __val));
}


However, I don't think somebody would ever use snd, jack and the lot on
s390, so an easier approach would be to limit the libjack-dev dependency
to amd64, i386 and powerpc.


Probably the best approach would be to ignore jack here and simply use
pulseaudio for all. If not talking about pro audio, pulseaudio seems to
be the sensible default across distros (Ubuntu, Fedora, opensuse
following right now)


HTH


-- 
mail: adi at thur.de  	http://adi.thur.de	PGP/GPG: key via keyserver





More information about the pkg-multimedia-maintainers mailing list