CRUX-ARM : Home

Home :: Documentation :: Download :: Development :: Community :: Ports :: Packages :: Bugs :: Links :: About :: Donors
Attached to Project: CRUX-ARM
Opened by Victor Martinez - 2011-05-26
Last edited by Victor Martinez - 2017-03-01

FS#7 - mpg123: problem building

Report:

/bin/sh ../../libtool –tag=CC –mode=compile gcc -DHAVE_CONFIG_H -I. -I../../src -I../../src -I../../src/libmpg123 -DOPT_ARM -DREAL_IS_FIXED -O2 -fomit-
frame-pointer -funroll-all-loops -finline-functions -ffast-math -O2 -march=armv7-a -mfpu=vfpv3-d16 -mthumb -MT layer3.lo -MD -MP -MF .deps/layer3.Tpo -c -o l
ayer3.lo layer3.c
libtool: compile: gcc -DHAVE_CONFIG_H -I. -I../../src -I../../src -I../../src/libmpg123 -DOPT_ARM -DREAL_IS_FIXED -O2 -fomit-frame-pointer -funroll-all-loops
-finline-functions -ffast-math -O2 -march=armv7-a -mfpu=vfpv3-d16 -mthumb -MT layer3.lo -MD -MP -MF .deps/layer3.Tpo -c layer3.c -fPIC -DPIC -o .libs/layer3
.o
/tmp/cckBsykf.s: Assembler messages:
/tmp/cckBsykf.s:2839: Error: shift must be constant – `orr fp,fp,r7,lsl sl’ /tmp/cckBsykf.s:2868: Error: shift must be constant – `orr fp,fp,r7,lsl sl’ /tmp/cckBsykf.s:3071: Error: shift must be constant – `orr r5,r5,r7,lsl sl’ /tmp/cckBsykf.s:3268: Error: shift must be constant – `orr r6,r6,r7,lsl sl’ /tmp/cckBsykf.s:3290: Error: shift must be constant – `orr r6,r6,r7,lsl sl’ /tmp/cckBsykf.s:3313: Error: shift must be constant – `orr r6,r6,r7,lsl sl’ /tmp/cckBsykf.s:3336: Error: shift must be constant – `orr fp,fp,r4,lsl r5’ /tmp/cckBsykf.s:3358: Error: shift must be constant – `orr fp,fp,r3,lsl r5’ /tmp/cckBsykf.s:4653: Error: shift must be constant – `orr sl,sl,r7,lsl r8’ /tmp/cckBsykf.s:4864: Error: shift must be constant – `orr sl,sl,r7,lsl r8’ /tmp/cckBsykf.s:4893: Error: shift must be constant – `orr r7,r7,r8,lsl sl’ /tmp/cckBsykf.s:5105: Error: shift must be constant – `orr sl,sl,r5,lsl r7’ /tmp/cckBsykf.s:5155: Error: shift must be constant – `orr sl,sl,r5,lsl r7’ /tmp/cckBsykf.s:5179: Error: shift must be constant – `orr sl,sl,r7,lsl r8’ /tmp/cckBsykf.s:5326: Error: shift must be constant – `orr sl,sl,r3,lsl r5’ /tmp/cckBsykf.s:5350: Error: shift must be constant – `orr sl,sl,r3,lsl r4’ make[3]: * [layer3.lo] Error 1
make[3]: Leaving directory `/nfs/crux/efikamx/work/src/mpg123-1.13.3/src/libmpg123’ make[2]:
* [all-recursive] Error 1
make[2]: Leaving directory `/nfs/crux/efikamx/work/src/mpg123-1.13.3/src’ make[1]: * [all] Error 2
make[1]: Leaving directory `/nfs/crux/efikamx/work/src/mpg123-1.13.3/src’ make:
* [all-recursive] Error 1
======⇒ ERROR: Building ‘/nfs/crux/efikamx/pkg/mpg123#1.13.3-1.pkg.tar.gz’ failed.

Closed by  Victor Martinez
Wednesday, 01 March 2017, 01:58 GMT
Reason for closing:  Won't implement
acrux commented on Wednesday, 01 June 2011, 22:27 GMT

i did a different port on ppc:
http://cruxppc.org/viewvc/opt/branches/2.7/mpg123/Pkgfile?revision=2339&view=markup on ARM it could be –with-cpu=neon

acrux commented on Wednesday, 01 June 2011, 22:28 GMT

if [ "`cat /proc/cpuinfo | grep neon`" != "" ]; then
CONF="–with-cpu=neon"; else
CONF="–with-cpu=generic_fpu"
fi

acrux commented on Thursday, 02 June 2011, 23:27 GMT

this port works on efikamx:

build() {

      cd $name-$version
      export CFLAGS="-mcpu=cortex-a8 -mthumb -mfpu=neon -O3"
      ./configure --prefix=/usr --build=$MACHTYPE \
              --with-optimization=3 --with-cpu=neon \
              --mandir=/usr/man --with-gnu-ld \
              --with-module-suffix=.so \
              --with-audio=alsa,oss,dummy \
              --with-default-audio=alsa
  make
  make DESTDIR=$PKG install

}

thus it seems to need -mfpu=neon as CFLAGS to build –with-cpu=neon .

acrux commented on Friday, 03 June 2011, 00:01 GMT

root@201:~# cat /etc/rc.modules
#!/bin/bash
#
# /etc/rc.modules: module initialization script
#

/sbin/depmod -a

/sbin/modprobe snd-soc-imx-ssi
/sbin/modprobe snd-soc-imx-3stack-sgtl5000

# End of file

root@201:~# mpg123 -vv /mnt/10-ITuoiOcchiSonoPieniDiSale.mp3
Trying output module alsa.
Using default module dir: /usr/lib/mpg123
Module dir: /usr/lib/mpg123
Module path: ./output_alsa.so
Output module 'alsa' chosen.
High Performance MPEG 1.0/2.0/2.5 Audio Player for Layers 1, 2 and 3

      version 1.13.3; written and copyright by Michael Hipp and others
      free software (LGPL/GPL) without any warranty but with best wishes

Decoder: NEON

Audio driver: alsa
Audio device: <none>
Audio capabilities:
(matrix of [S]tereo or [M]ono support for sample format and rate in Hz)

     |  s16  |  u16  |  s32  |  u32  |  s24  |  u24  |  f32  |  s8   |  u8   | ulaw  | alaw  |

——|——-|——-|——-|——-|——-|——-|——-|——-|——-|——-|——-|

8000 |  M/S  |  M/S  |  M/S  |  M/S  |  M/S  |  M/S  |  M/S  |  M/S  |  M/S  |  M/S  |  M/S  |

11025 | M/S | M/S | M/S | M/S | M/S | M/S | M/S | M/S | M/S | M/S | M/S |
12000 | M/S | M/S | M/S | M/S | M/S | M/S | M/S | M/S | M/S | M/S | M/S |
16000 | M/S | M/S | M/S | M/S | M/S | M/S | M/S | M/S | M/S | M/S | M/S |
22050 | M/S | M/S | M/S | M/S | M/S | M/S | M/S | M/S | M/S | M/S | M/S |
24000 | M/S | M/S | M/S | M/S | M/S | M/S | M/S | M/S | M/S | M/S | M/S |
32000 | M/S | M/S | M/S | M/S | M/S | M/S | M/S | M/S | M/S | M/S | M/S |
44100 | M/S | M/S | M/S | M/S | M/S | M/S | M/S | M/S | M/S | M/S | M/S |
48000 | M/S | M/S | M/S | M/S | M/S | M/S | M/S | M/S | M/S | M/S | M/S |

playlist in normal order:
/mnt/10-ITuoiOcchiSonoPieniDiSale.mp3

Directory: /mnt/
Playing MPEG stream 1 of 1: 10-ITuoiOcchiSonoPieniDiSale.mp3 ...
Note: ID3v2.3 rev 0 tag of 40361 bytes
Note: Xing/Lame/Info header detected
Title: I Tuoi Occhi Sono Pieni di Sale
Artist: Costanza & Rino Gaetano featuring Riccardo Sinigallia
Comment: to the sea inside Album: Sonic Diary
Year: 2008 Genre: Slow/Melodic
MPEG 1.0, Layer: III, Freq: 44100, mode: Joint-Stereo, modext: 0, BPF : 365
Channels: 2, copyright: No, original: Yes, CRC: No, emphasis: 0.
Bitrate: VBR Extension value: 0
Frame# 989 [ 6588], Time: 00:25.83 [02:52.09], RVA: off, Vol: 100(100)

acrux commented on Friday, 03 June 2011, 00:27 GMT

well.. but it seems to be a bit speedy playing files...

Frame# 7576 [ 1], Time: 03:17.90 [00:00.02], RVA: off, Vol: 100(100)
[3:17] Decoding of 10-ITuoiOcchiSonoPieniDiSale.mp3 finished.

real 3m13.367s
user 0m13.480s
sys 0m0.830s

it played a 3'17 file with only 3'13

Project Manager
Victor Martinez commented on Friday, 30 September 2011, 17:31 GMT

Tested with this build options:
build() {

export CFLAGS="$(echo $CFLAGS | sed -e 's|-mfpu=vfpv3-d16|-mfpu=neon|g')"
cd $name-$version
./configure --with-cpu=neon \
            --prefix=/usr \
            --mandir=/usr/man \
            --with-module-suffix=.so \
            --with-audio=alsa,oss,dummy \
            --with-default-audio=alsa
make
make DESTDIR=$PKG install

}

/etc/rc.modules:
#!/bin/bash
/sbin/depmod -a
modprobe snd_spdif
modprobe snd_soc_imx_3stack_sgtl5000

mpg123 output:
Frame# 7926 [ 1], Time: 03:27.04 [00:00.02], RVA: off, Vol: 100(100)
real 3m27.385s
user 0m14.140s
sys 0m1.150s

Seems to work right here.

acrux commented on Monday, 05 November 2012, 16:35 GMT

ok, it seems that -marm instead of -mthumb fix it on armhf.

thus i suggest this kind of port:

name=mpg123
version=1.14.4
release=1
source=(http://www.mpg123.de/download/$name-$version.tar.bz2)

build() {
cd $name-$version

      if [ "`cat /proc/cpuinfo | grep neon`" != "" ]; then
      SIMD="--with-cpu=neon"
      export CFLAGS="-O3 -march=armv7-a -marm -mfpu=neon -funsafe-math-optimizations -pipe -ffast-math -fomit-frame-pointer"
      fi
      ./configure --prefix=/usr --build=$MACHTYPE \
              --with-optimization=3 $SIMD \
              --mandir=/usr/man --with-gnu-ld \
              --with-module-suffix=.so \
              --with-audio=alsa,oss,dummy \
              --with-default-audio=alsa
      make
      make DESTDIR=$PKG install

}

Project Manager
Victor Martinez commented on Monday, 05 November 2012, 19:52 GMT

What about making it generic trying to respect other device's CFLAGS?
if [ "`cat /proc/cpuinfo | grep neon`" != "" ]; then
SIMD="–with-cpu=neon"
export CFLAGS="$(echo $CFLAGS | sed -e 's|-mthumb|-marm|g' -e 's|-mfpu=.*|-mfpu=neon|g')"
fi
Not tested but something similar to this one.

acrux commented on Thursday, 08 November 2012, 02:27 GMT

i think there is no reason as NEON is currently available on the only armv-7A family.

Project Manager
Victor Martinez commented on Thursday, 08 November 2012, 09:46 GMT

Yes, in this case it's used by efikamx devices, but this port is in the overlay, this means other hardfp devices may use it too.
We can provide this port as an efikamx port (using its overlay instead of opt-hardfp)

Ryan Mullen commented on Thursday, 08 November 2012, 13:51 GMT

The cubox is hardfp-capable, but does not have NEON support. Just a heads up.

Project Manager
Victor Martinez commented on Thursday, 08 November 2012, 14:25 GMT

Yes Ryan, in this case there is no problem (backwards compatibility is guaranteed with the proposed patch) but what happens if someone tries to build it in a omap4 (it supports neon instructions and then, imx51's CFLAGS will be used for it too, and this is wrong).
What I meant with my comments is look for a way to try to keep its structure to give backwards and forwards compatibility, respecting user's CFLAGS and changing only the fpu used to neon when SOC supports it)

Project Manager
Jose V Beneyto commented on Thursday, 17 October 2013, 14:25 GMT

can someone confirm this ticket?

Project Manager
Jose V Beneyto commented on Saturday, 02 November 2013, 01:55 GMT

ATM I didn't have problems to build mpg123 for efikamx from upstream opt and at least should work for cubieboard and cubieboard2 too. I assume that the problem is related to CRUX-ARM version 2.7 as noted 'reported version', is that right?

Loading...

Available keyboard shortcuts

Tasklist

Task Details

Task Editing