Skip to contentSkip to conversation

package/sdl_mixer: disable libmad support for static build only

PATCH New Romain Naour 3 participants 7 messages Feb 21, 2016 – Mar 2, 2016

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 package/sdl_mixer: disable libmad support for static build only

Following the discussion on the ML [1], all package using SDL_mixer will unlikely forget to link with -lmad.

[...]sysroot/usr/lib/libSDL_mixer.a(music_mad.o): In function `read_next_frame':
music_mad.c:(.text+0xbc): undefined reference to mad_stream_buffer' music_mad.c:(.text+0xd0): undefined reference to mad_frame_decode' music_mad.c:(.text+0x134): undefined reference to `mad_timer_add'

Until SDL_mixer and other package using it are not fixed, disable libmad support for static build only.

Fixes:
http://autobuild.buildroot.net/results/e09/e09ea3a64d396bbc855acf7c07fcbea28fb2395d

[1] http://lists.busybox.net/pipermail/buildroot/2016-February/153442.html

Cc Rodrigo Rebello <[email protected]>
Cc Thomas Petazzoni <[email protected]>
---
 package/sdl_mixer/sdl_mixer.mk | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
package/sdl_mixer/sdl_mixer.mk +2 -1
index a602b6e..3547799 100644
@@ -20,7 +20,8 @@ SDL_MIXER_CONF_OPTS = \
 	--disable-music-mp3 \
 	--disable-music-flac # configure script fails when cross compiling
 
-ifeq ($(BR2_PACKAGE_LIBMAD),y)
+# disable libmad support for static build only.
+ifeq ($(BR2_PACKAGE_LIBMAD)x$(BR2_STATIC_LIBS),yx)
 SDL_MIXER_CONF_OPTS += --enable-music-mp3-mad-gpl
 SDL_MIXER_DEPENDENCIES += libmad
 else
Signature · 1 line
2.5.0
#1 lore raw

PATCH 1/1 package/sdl_mixer: disable libmad support for static build only

Romain,

Quoted 8 lines · Romain Naour

Following the discussion on the ML [1], all package using SDL_mixer will unlikely forget to link with -lmad.

[...]sysroot/usr/lib/libSDL_mixer.a(music_mad.o): In function `read_next_frame':
music_mad.c:(.text+0xbc): undefined reference to mad_stream_buffer' music_mad.c:(.text+0xd0): undefined reference to mad_frame_decode' music_mad.c:(.text+0x134): undefined reference to `mad_timer_add'

Quoted 7 lines

Until SDL_mixer and other package using it are not fixed, disable libmad support for static build only.

Fixes:
http://autobuild.buildroot.net/results/e09/e09ea3a64d396bbc855acf7c07fcbea28fb2395d

[1] http://lists.busybox.net/pipermail/buildroot/2016-February/153442.html

I am not sure whether this sort of patch is the good option. Yes, it avoids the autobuilder failure, but it doesn't really fix the problem itself. We could say it's a good temporary solution for 2016.02, but on the other hand, once this patch gets merged, we will most likely forget that this problem exists.

So I'm hesitating between:

1/ Applying your patch, and just forget about this issue, since we
probably don't care much anyway.

2/ Applying your patch, and asking you to fill in a bug report in our
bug tracker so that we don't forget about the issue.

3/ Not applying your patch, so that we keep the issue in our
autobuilder failures until someone fixes it.

Peter, what do you think?

Thomas

Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
#2 lore raw

PATCH 1/1 package/sdl_mixer: disable libmad support for static build only

Thomas, Romain,

2016-02-21 14:18 GMT-03:00 Thomas Petazzoni
<[email protected]>:

Quoted 36 lines

Romain,

Quoted 8 lines · Romain Naour

Following the discussion on the ML [1], all package using SDL_mixer will unlikely forget to link with -lmad.

[...]sysroot/usr/lib/libSDL_mixer.a(music_mad.o): In function `read_next_frame':
music_mad.c:(.text+0xbc): undefined reference to mad_stream_buffer' music_mad.c:(.text+0xd0): undefined reference to mad_frame_decode' music_mad.c:(.text+0x134): undefined reference to `mad_timer_add'

Quoted 7 lines

Until SDL_mixer and other package using it are not fixed, disable libmad support for static build only.

Fixes:
http://autobuild.buildroot.net/results/e09/e09ea3a64d396bbc855acf7c07fcbea28fb2395d

[1] http://lists.busybox.net/pipermail/buildroot/2016-February/153442.html

I am not sure whether this sort of patch is the good option. Yes, it avoids the autobuilder failure, but it doesn't really fix the problem itself. We could say it's a good temporary solution for 2016.02, but on the other hand, once this patch gets merged, we will most likely forget that this problem exists.

So I'm hesitating between:

1/ Applying your patch, and just forget about this issue, since we
probably don't care much anyway.

2/ Applying your patch, and asking you to fill in a bug report in our
bug tracker so that we don't forget about the issue.

3/ Not applying your patch, so that we keep the issue in our
autobuilder failures until someone fixes it.

Quoted 7 lines

Peter, what do you think?

Thomas
--
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com

I don't think this workaround is necessary at all. Adding a 'Libs.private' section to SDL_mixer.pc and fixing packages that depend on SDL_mixer so that they use pkg-config doesn't seem too complicated. Currently only chocolate-doom, lbreakout2, ltris and prboom depend on it.

I'll work on a patch for chocolate-doom now and handle the other 3 later.

Regards,
Rodrigo

#3 lore raw

PATCH 1/1 package/sdl_mixer: disable libmad support for static build only

Hello,

Quoted 5 lines · Rodrigo Rebello

I don't think this workaround is necessary at all. Adding a 'Libs.private' section to SDL_mixer.pc and fixing packages that depend on SDL_mixer so that they use pkg-config doesn't seem too complicated. Currently only chocolate-doom, lbreakout2, ltris and prboom depend on it.

This is obviously the best option. Unfortunately, many of those packages are not maintained, so we can't upstream the patches you're talking about...

Quoted 1 line

I'll work on a patch for chocolate-doom now and handle the other 3 later.

Thanks a lot!

Thomas

Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
#4 lore raw

PATCH 1/1 package/sdl_mixer: disable libmad support for static build only

Thomas,

2016-02-21 17:13 GMT-03:00 Thomas Petazzoni
<[email protected]>:
[snip]

Quoted 4 lines

This is obviously the best option. Unfortunately, many of those packages are not maintained, so we can't upstream the patches you're talking about...

That's a good point. Well, at least chocolate-doom is being actively maintained, so we'll be able to upstream a patch in that case.

As for the other 3, do you think keeping patches for them in buildroot could turn out to be a hassle in the long run?

Rodrigo

#5 lore raw

PATCH 1/1 package/sdl_mixer: disable libmad support for static build only

Dear Rodrigo Rebello,

Quoted 5 lines · Rodrigo Rebello

That's a good point. Well, at least chocolate-doom is being actively maintained, so we'll be able to upstream a patch in that case.

As for the other 3, do you think keeping patches for them in buildroot could turn out to be a hassle in the long run?

Having patches that are not upstream is a hassle in general.

But since those packages are basically unmaintained upstream as far as I remember, it means upstream won't do any new release, and therefore we won't have to update/change the patches. Having patches is really a big annoyance when the upstream project is still active and makes releases, since we have to update our patches whenever we bump the package.

Thomas

Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
#6 lore raw

PATCH 1/1 package/sdl_mixer: disable libmad support for static build only

In reply to Rodrigo Rebello

Hi Rodrigo, Thomas, All,

Le 21/02/2016 21:06, Rodrigo Rebello a ?crit :

Quoted 2 lines

Thomas, Romain,

[snip]

Quoted 8 lines

I don't think this workaround is necessary at all. Adding a 'Libs.private' section to SDL_mixer.pc and fixing packages that depend on SDL_mixer so that they use pkg-config doesn't seem too complicated. Currently only chocolate-doom, lbreakout2, ltris and prboom depend on it.

I'll work on a patch for chocolate-doom now and handle the other 3 later.

I'll will mark this patch rejected in patchwork.

Thanks for working on this.

Best regards,
Romain

Quoted 4 lines

Regards,
Rodrigo