We have moved to a new Sailfish OS Forum. Please start new discussions there.
5

Setting up libMAD in SFOS on ARM

asked 2016-08-23 15:11:14 +0200

lpr gravatar image

updated 2016-08-23 15:51:34 +0200

vattuvarg gravatar image

The first step forward to gain full¹ MPEG audio support is to build libMAD from scratch.
Building from latest upstream version (libmad-0.15.1b from the year 2004) does not work² due to ARMv4 assembler code.
So you have to look for a patched 'downstream' version: link
Three files are needed: libmad_0.15.1b-8.dsc, libmad_0.15.1b.orig.tar.gz and libmad_0.15.1b-8.diff.gz
Next step after downloading in a directory is (on a PC system with dpkg-Package):

dpkg-source -x libmad_0.15.1b-8.dsc

this will create a folder named 'libmad-0.15.1b'. Enter it ('cd libmad-0.15.1b') and apply the needed patches:

export QUILT_PATCHES=debian/patches
quilt push -a
touch NEWS AUTHORS ChangeLog

after that perform autoreconf -fi on Jolla1 device, and then

./configure --prefix=/usr --disable-static CFLAGS="-mcpu=cortex-a15 -mtune=cortex-a15 -mfpu=neon-vfpv4" && make

and as root

make install

to be able to build a libMAD enabled gstreamer-plugin-ugly1.0 later, it is necessary (as root) to

cat > /usr/lib/pkgconfig/mad.pc << "EOF"
prefix=/usr
exec_prefix=${prefix}
libdir=${exec_prefix}/lib
includedir=${prefix}/include

Name: mad
Description: MPEG audio decoder
Requires:
Version: 0.15.1b
Libs: -L${libdir} -lmad
Cflags: -I${includedir}
EOF

now everything is installed on Jolla1 (for Jolla C: CFLAGS=" -mfpu=neon" as only cortex-a7 is available)

¹ layer 1, 2 and 3 and not just built-in layer 3 support
² unlike x86, ARM is not backwards compatible

edit retag flag offensive close delete

Comments

1

Corrected a typo in the headline and retagged. :)

vattuvarg ( 2016-08-23 15:52:37 +0200 )edit

@vattuvarg, you know askbot keeps a list of changes to a question, if we want to know what you changed then we can just look at that.

r0kk3rz ( 2016-08-23 18:42:16 +0200 )edit
1

@r0kke3rz - A bit too used to informing new users, that's all.

vattuvarg ( 2016-08-23 19:29:08 +0200 )edit

@Larswad maybe a codec candidate for next gstreamer-plugin-ugly1.0-1.4.5-1ubuntu3 update in warehouse...

lpr ( 2016-08-25 18:35:38 +0200 )edit
1

lpr, thanks for the heads up. I've kind of left the jolla boat, but maybe if it's not too hellish I might give it a shot. I built the earlier plug-ins using the jolla sdk virtual machine using the arm based sysroot. If I try to figure this post out, I can get the lib source on a regular Ubuntu box with dpkg then patch it using the provided instructions, then put it in the sdk VM and then build it there. Then after that try to build the ugly gstreamer plug-in by adding the dependency as described then build it. I suppose the libMAD itself needs to be built as an rpm, so I guess I need to create one of those too. Sounds kinda hellish.

Larswad ( 2016-08-25 19:11:41 +0200 )edit

1 Answer

Sort by » oldest newest most voted
1

answered 2016-08-23 18:22:41 +0200

tortoisedoc gravatar image

Why not add it to mer?

edit flag offensive delete publish link more

Comments

don't know, maybe because these codecs are not LGPL releaseable...

lpr ( 2016-08-23 18:58:52 +0200 )edit

hm the codecs are not, but the library is?

tortoisedoc ( 2016-08-23 20:36:15 +0200 )edit

hm, read the hint why gstreamer-plugins-ugly is named ugly... A non non-profit company cannot provide it :)

lpr ( 2016-08-23 20:49:18 +0200 )edit

Okay, so only to get a clear view, the libMAD is on debian, GLP2 or 3? And the gstreamer plugins are definitely non-(L)GPL'd?

tortoisedoc ( 2016-08-23 20:58:17 +0200 )edit

hm, debian is non-profit, you will not find it in rhel or suseenterprise. you may add it to mer but have to remove it for every device sold build upon mer...

lpr ( 2016-08-23 21:23:46 +0200 )edit
Login/Signup to Answer

Question tools

Follow
3 followers

Stats

Asked: 2016-08-23 15:11:14 +0200

Seen: 381 times

Last updated: Aug 23 '16