<html>
    <head>
      <base href="https://bugs.freedesktop.org/">
    </head>
    <body><table border="1" cellspacing="0" cellpadding="8">
        <tr>
          <th>Bug ID</th>
          <td><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - sparc64 is not properly detected as 64 bit due to incorrect architecture mapping"
   href="https://bugs.freedesktop.org/show_bug.cgi?id=95432">95432</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>sparc64 is not properly detected as 64 bit due to incorrect architecture mapping
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>PulseAudio
          </td>
        </tr>

        <tr>
          <th>Version</th>
          <td>unspecified
          </td>
        </tr>

        <tr>
          <th>Hardware</th>
          <td>SPARC
          </td>
        </tr>

        <tr>
          <th>OS</th>
          <td>Linux (All)
          </td>
        </tr>

        <tr>
          <th>Status</th>
          <td>NEW
          </td>
        </tr>

        <tr>
          <th>Severity</th>
          <td>normal
          </td>
        </tr>

        <tr>
          <th>Priority</th>
          <td>medium
          </td>
        </tr>

        <tr>
          <th>Component</th>
          <td>core
          </td>
        </tr>

        <tr>
          <th>Assignee</th>
          <td>pulseaudio-bugs@lists.freedesktop.org
          </td>
        </tr>

        <tr>
          <th>Reporter</th>
          <td>glaubitz@physik.fu-berlin.de
          </td>
        </tr>

        <tr>
          <th>QA Contact</th>
          <td>pulseaudio-bugs@lists.freedesktop.org
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>lennart@poettering.net
          </td>
        </tr></table>
      <p>
        <div>
        <pre>Created <span class=""><a href="attachment.cgi?id=123794" name="attach_123794" title="[PATCH] pulsecore: Fix incorrect architecture mapping on sparc64.">attachment 123794</a> <a href="attachment.cgi?id=123794&action=edit" title="[PATCH] pulsecore: Fix incorrect architecture mapping on sparc64.">[details]</a></span> <a href='page.cgi?id=splinter.html&bug=95432&attachment=123794'>[review]</a>
[PATCH] pulsecore: Fix incorrect architecture mapping on sparc64.

Hello!

While debugging build problems of Firefox on sparc64 in Debian [1], I
discovered that one of the reasons the build is failing is an incorrect
detection of the architecture due to the wrong assumption that gcc defines
__sparc64__ on sparc64.

However, this is not correct as can be easily verified:

root@landau:~# echo | gcc -E -dM - |grep __sparc64__
root@landau:~# echo | gcc -E -dM - |grep __sparc__
#define __sparc__ 1
root@landau:~# echo | gcc -E -dM - |grep __arch64__
#define __arch64__ 1
root@landau:~# uname -m
sparc64
root@landau:~# dpkg --print-architecture
sparc64
root@landau:~#

I have discovered the same problem in systemd, too, and have already opened a
pull request to fix the problem [2]. The attached patch fixes the bug for
pulseaudio.

This particular bug might the reason why pulseaudio's testsuite fails on
sparc64 with [3]:

FAIL: once-test
===============

Running suite(s): Once
0%: Checks: 1, Failures: 1, Errors: 0
tests/once-test.c:74:F:once:once_test:0: Assertion
'pthread_setaffinity_np(pthread_self(), sizeof(mask), &mask) == 0' failed
FAIL once-test (exit status: 1)

Cheers,
Adrian

<span class="quote">> [1] <a href="https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=824449">https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=824449</a>
> [2] <a href="https://github.com/systemd/systemd/pull/3274">https://github.com/systemd/systemd/pull/3274</a>
> [3] <a href="https://buildd.debian.org/status/fetch.php?pkg=pulseaudio&arch=sparc64&ver=8.0-3&stamp=1461452303">https://buildd.debian.org/status/fetch.php?pkg=pulseaudio&arch=sparc64&ver=8.0-3&stamp=1461452303</a></span ></pre>
        </div>
      </p>


      <hr>
      <span>You are receiving this mail because:</span>

      <ul>
          <li>You are the QA Contact for the bug.</li>
          <li>You are the assignee for the bug.</li>
      </ul>
    </body>
</html>