Your message dated Tue, 31 Dec 2013 12:03:50 +0000
with message-id <e1vxy34-0002lm...@franck.debian.org>
and subject line Bug#733632: fixed in mpv 0.3.0-2
has caused the Debian Bug report #733632,
regarding mpv: FTBFS on mips/mipsel/powerpc/sparc: undefined reference to 
`__sync_add_and_fetch_8'
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact ow...@bugs.debian.org
immediately.)


-- 
733632: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=733632
Debian Bug Tracking System
Contact ow...@bugs.debian.org with problems
--- Begin Message ---
Package: mpv
Version: 0.3.0-1
Severity: serious
Tags: upstream patch
Justification: fails to build from source (but built successfully in the past)

mpv fails to build from source on mips/mipsel/powerpc/sparc with the
following error message:

| [243/243] linking -> build/mpv
| common/msg.c.10.o: In function `mp_msg_update_msglevels':
| /«PKGBUILDDIR»/build/../common/msg.c:243: undefined reference to 
`__sync_add_and_fetch_8'
| collect2: error: ld returned 1 exit status
| Waf: Leaving directory `/«PKGBUILDDIR»/build'
| Build failed

The problem is that the new version of mpv tries to uses 64-bit GCC
legacy atomic builtins [1], which are not all available on all
architectures.

The solution to this problem is to use the new GCC atomics, similar
to the C11 ones [2]. For that you need GCC 4.8, which is unfortunately
not the default on all architectures, and to link with libatomic. The
later library provides a fallback implementation if a given atomic bultin
is not available natively, which is usually the case for 64-bit atomics
on 32-bit platforms.

The patch below implements that and should fix the problem, though I
have only tested it on mips so far.

[1] http://gcc.gnu.org/onlinedocs/gcc/_005f_005fsync-Builtins.html
[2] http://gcc.gnu.org/onlinedocs/gcc/_005f_005fatomic-Builtins.html

--- mpv-0.3.0/debian/control
+++ mpv-0.3.0/debian/control
@@ -45,7 +45,8 @@
  pkg-config,
  python,
  python-docutils,
- yasm
+ yasm,
+ gcc-4.8
 Standards-Version: 3.9.5
 Homepage: http://mpv.io/
 Vcs-Git: git://anonscm.debian.org/pkg-multimedia/mpv.git
--- mpv-0.3.0/debian/patches/04_gcc-atomic.diff
+++ mpv-0.3.0/debian/patches/04_gcc-atomic.diff
@@ -0,0 +1,21 @@
+--- mpv-0.3.0/compat/atomics.h
++++ mpv-0.3.0/compat/atomics.h
+@@ -20,4 +20,4 @@
+ // time. We only support a full memory barrier.
+ 
+ #define mp_memory_barrier()           __sync_synchronize()
+-#define mp_atomic_add_and_fetch(a, b) __sync_add_and_fetch(a, b)
++#define mp_atomic_add_and_fetch(a, b) __atomic_fetch_add(a, b, 
__ATOMIC_SEQ_CST)
+--- mpv-0.3.0/wscript
++++ mpv-0.3.0/wscript
+@@ -104,6 +104,10 @@ main_dependencies = [
+         'deps': [ 'pthreads' ],
+         'func': check_cc(lib='rt')
+     }, {
++        'name': 'libatomic',
++        'desc': 'linking with -latomic',
++        'func': check_cc(lib='atomic')
++    }, {
+         'name': '--iconv',
+         'desc': 'iconv',
+         'func': check_iconv,
--- mpv-0.3.0/debian/patches/series
+++ mpv-0.3.0/debian/patches/series
@@ -1,3 +1,4 @@
 01_desktop-path.patch
 02_fix-config-path.patch
 03_waf.patch
+04_gcc-atomic.diff
--- mpv-0.3.0/debian/rules
+++ mpv-0.3.0/debian/rules
@@ -1,5 +1,7 @@
 #!/usr/bin/make -f
 
+export CC=gcc-4.8
+
 %:
        dh $@
 

-- System Information:
Debian Release: jessie/sid
  APT prefers unstable
  APT policy: (500, 'unstable')
Architecture: mips (mips64)

Kernel: Linux 3.2.0-4-5kc-malta
Locale: LANG=fr_FR.UTF-8, LC_CTYPE=fr_FR.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/bash

--- End Message ---
--- Begin Message ---
Source: mpv
Source-Version: 0.3.0-2

We believe that the bug you reported is fixed in the latest version of
mpv, which is due to be installed in the Debian FTP archive.

A summary of the changes between this version and the previous one is
attached.

Thank you for reporting the bug, which will now be closed.  If you
have further comments please address them to 733...@bugs.debian.org,
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
pp.
Alessandro Ghedini <gh...@debian.org> (supplier of updated mpv package)

(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing ftpmas...@ftp-master.debian.org)


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Format: 1.8
Date: Tue, 31 Dec 2013 12:38:24 +0100
Source: mpv
Binary: mpv
Architecture: source amd64
Version: 0.3.0-2
Distribution: unstable
Urgency: medium
Maintainer: Debian Multimedia Maintainers 
<pkg-multimedia-maintain...@lists.alioth.debian.org>
Changed-By: Alessandro Ghedini <gh...@debian.org>
Description: 
 mpv        - video player based on MPlayer/mplayer2
Closes: 733632
Changes: 
 mpv (0.3.0-2) unstable; urgency=medium
 .
   * Enable ALSA on Linux only (should fix FTBFS on kfreebsd)
   * Add 04_use-atomic-not-sync.patch to fix FTBFS on mips, powerpc and sparc
     (Closes: #733632)
   * Explicitly use gcc-4.8 on powerpc and sparc
   * Use waf verbose output (shows build commands)
Checksums-Sha1: 
 d027faae121fcd0d8b853edb13c26a4a226e76e0 2640 mpv_0.3.0-2.dsc
 0d71009822f5ee6cd528301a8d925a91f29dc0bb 110136 mpv_0.3.0-2.debian.tar.gz
 cfeb0829d5d0047ad981606d489bff204cf0b9be 646014 mpv_0.3.0-2_amd64.deb
Checksums-Sha256: 
 8683563206edceebbd89e465b544b60b6769b99eb0a03f6d96e4afdde10c535e 2640 
mpv_0.3.0-2.dsc
 850255caa3b1b44a4b73771d6b8d976037d44347046005ca6f17cadde0d099df 110136 
mpv_0.3.0-2.debian.tar.gz
 38455b51a0ff20b22c67c6fb4d2676985c1b743236ee3014f9f72e2ab06dcb05 646014 
mpv_0.3.0-2_amd64.deb
Files: 
 97c08603555d8963b7da1487bfa42dc3 2640 video optional mpv_0.3.0-2.dsc
 5c00c3a907e5e59e73748308d45b619a 110136 video optional 
mpv_0.3.0-2.debian.tar.gz
 a18b52306937d0bcf76143addb6b6603 646014 video optional mpv_0.3.0-2_amd64.deb

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.15 (GNU/Linux)

iQIcBAEBAgAGBQJSwq5dAAoJEK+lG9bN5XPLdSMP/icSvvaFZoDeJKetsSNMrCDP
N8FK7Cnm5WXfZR1pIdqd8fl00qmOxAa7ByNtWcXfnRqGtz8snKAl5wG57fcQPhFL
Oenn1BNhCbF3NWnjctcaKXvv4Ae+e2RNC8BiheU5Q3c3kDJ27wfz7S0EDbcnGFHN
01mH9imhJBeFNZMZzibMx+6SRH1Xs6GRBtdrN2HTAowBe+oobMuMje4987bCnLX4
Zd4yuktRy9M9IA+gX0F0LwaFQk9pY5qhZbO3Mai9CXW7m8sq68mKUEI8BcrLoSuU
1Gdm//rmNDb7MGLmT1kuHkPymmE7SOfaLrn7MGiJgVWrSSw0UCZdmutqd1410Dlb
71tWxB/hvtAnQt2WDFiXYzYS2xG4nkbKc4l0oBjFpcHm03Vok7TvtA8BvMQuKDym
hBQCqikbJT3oOdcgNPSmVA9vSBstucWPZTHBI9315SBgULl6tsjwju+WDL6Kb/6T
IH4ZW/5dw2na+JSYqEeTgVaOeNgArLhY5VTYG0dxJp4Kp88cT6uuz4v/1rlNT1cN
sCxZAnHw7FSd0TGwMnYcvXE7BQ76Ck3Qx9MrgNFsnZC50ZGcIoIBU60VOYaOZoNI
l50EY/XRq9CFe0w17zV+WNPQyjWactrml4NjxLgbdplWsqKA8RiaaB5C8IogKQc3
UypSQKPDmrrftLXc8VRG
=pqpU
-----END PGP SIGNATURE-----

--- End Message ---

Reply via email to