Bug#667653: mpg123 FTBFS on armhf

Miguel Colon debian.micove at gmail.com
Sat Apr 7 02:27:07 UTC 2012


> As mpg123 upstream it would be cool to get note of such issues without
> having to look for them in the debian bts. Having some bot subscribe
> and post to mpg123-devel at lists.sourceforge.net would be splendit; but if
> that is too troublesome, sending an info to maintainer at mpg123.org would
> be just as fine (using the generic address in case I vanish in future).
> But perhaps I overlooked a generic way to subscribe an address to all
> future reports.

Hello:

I have not tried it myself but I think this is what you are asking for:
http://www.debian.org/doc/manuals/developers-reference/resources.html#pkg-tracking-system

Section 4.10.1 explains the subscribe and the keyword options. I would
filter out some of them since it would be too verbose IMO.

> Second: There is no inline assembly in mpg123. The file at hand
> (layer3.c) is plain C all around. So, without further data, I must
> assume that this is a bug in gcc that is worked around by adding -marm.
> You might consider asking gcc folks about this.

I had some free time so I looked into this.

The armhf architecture defaults to -mthumb instead of -marm and:
1) --with-cpu=arm_nofpu it fails with -mthumb and works with -marm
(-DOPT_ARM -DREAL_IS_FIXED)
2) --with-cpu=neon it works with both. (-DOPT_NEON -DREAL_IS_FLOAT)

This lead me to believe that it was most likely related to -DOPT_ARM.

I saw that layer3.c includes "#include "mpg123lib_intern.h" and that
in that file there is a block:

#  elif defined(OPT_ARM)
/* for arm */
#   define REAL_MUL_ASM(x, y, radix) \
<snip>

I patched this file by basically doing
-#  elif defined(OPT_ARM)
+#  elif defined(OxxxxxPT_ARxxxxxM)

Without the patch it FTBFS but with the patch it builds.

Looking at the ASM code it seems that these 2 asm block use PRE-UAL
ARM syntax which only work in ARM and not thumb. The newer UAL syntax
works with both. Here is a link that mentions some of the changes:
http://infocenter.arm.com/help/index.jsp?topic=/com.arm.doc.dui0204j/Cjagjjbc.html


Attached is a patch to really fix this and the orr problem with a
header inside the patch explaining the changes. Using -marm was really
a workaround to hide the problem but not a real solution to this and
disabled all the advantages of using -mthumb.

Reference for thumb2 instructions:
http://infocenter.arm.com/help/topic/com.arm.doc.qrc0001m/QRC0001_UAL.pdf

Hope this helps,
Miguel
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0005-thumbs2.patch
Type: application/octet-stream
Size: 1578 bytes
Desc: not available
URL: <http://lists.alioth.debian.org/pipermail/pkg-multimedia-maintainers/attachments/20120406/50032459/attachment.obj>


More information about the pkg-multimedia-maintainers mailing list