Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 192736 - media-sound/sox-14.0.0-r1 keywords dropped to use external gsm.
Summary: media-sound/sox-14.0.0-r1 keywords dropped to use external gsm.
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: AMD64 Linux
: High normal (vote)
Assignee: Gentoo Sound Team
URL:
Whiteboard:
Keywords:
: 199951 (view as bug list)
Depends on:
Blocks:
 
Reported: 2007-09-16 21:22 UTC by JTRiley
Modified: 2008-01-02 16:12 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
emerge --info (emerge.info,4.99 KB, text/plain)
2007-09-16 21:59 UTC, JTRiley
Details
build.log for media-sound/sox failure due to gsm not being built fPIC (build.log,225.04 KB, text/plain)
2007-09-16 22:01 UTC, JTRiley
Details

Note You need to log in before you can comment on or make changes to this bug.
Description JTRiley 2007-09-16 21:22:28 UTC
After finding and fixing bug 192481 myself (doh! should have checked bugs first...oh well good experience :D), I ran into another issue concerning sox and gsm on amd64.  

Sox 14.0.0 fails with the infamous "a relocation R_X86_64_32 against `a local symbol' can not be used when making a shared object; recompile with -fPIC" on amd64 with respect to gsm_destroy.o.  

To fix this I added the following line to gsm under src_compile():

use amd64 && append-flags -fPIC

Not 100% sure of whether my solution is the preferred but it worked for me. From Gentoo's docs on relocation errors it seems that compiling with -fPIC in cxxflags globally is discouraged because it effects binaries as well. However, whenever I check the flags during the build after adding the above line, only the object files are compiled -fPIC and not the actual binaries (at least toast anyways...).  

This definitely fixed my issue but I'm curious what the preferred solution in this case is?

~jtriley
Comment 1 Jakub Moc (RETIRED) gentoo-dev 2007-09-16 21:26:54 UTC
Please, post the actual errors and emerge --info output.
Comment 2 JTRiley 2007-09-16 21:59:59 UTC
Created attachment 131097 [details]
emerge --info

sure thing, here you go. Thanks!
Comment 3 JTRiley 2007-09-16 22:01:13 UTC
Created attachment 131099 [details]
build.log for media-sound/sox failure due to gsm not being built fPIC
Comment 4 Jakub Moc (RETIRED) gentoo-dev 2007-09-16 23:08:05 UTC
Noone will ever notice again unless you reopen the bug... ;)
Comment 5 JTRiley 2007-09-16 23:19:05 UTC
(In reply to comment #4)
> Noone will ever notice again unless you reopen the bug... ;)
> 

Meaning since I didn't attach this stuff at the beginning all hope is lost for finding the best fix for this or did I somehow close the bug?

My apologies if this is the case...
Comment 6 Alexis Ballier gentoo-dev 2007-09-17 19:38:05 UTC
imho there are three options there : 
- make gsm build a shared .so lib compiled with pic on all arches. The problem is that if upstream doesn't do that that may be because it exports too much symbols, and they don't want to maintaint an abi.(Note that debian is doing that)
- compile gsm with -fPIC on all arches, as it will most likely fail on anything but x86 (and cause textrels on x86), so that libgsm.a can be linked in shared libs. That's ugly.
- disable external gsm support for sox. That will fix all our problems, but as it will be included and not updated may cause headaches. Note that linking to .a static lib will for sure not help if there is a security issue on gsm.


I tend to prefer the first option, @sound, any preference ?
Comment 7 Samuli Suominen (RETIRED) gentoo-dev 2007-09-18 13:34:11 UTC
(In reply to comment #6)
> I tend to prefer the first option, @sound, any preference ?

You've got free hands here.. ;-)
Comment 8 Alexis Ballier gentoo-dev 2007-09-18 18:24:23 UTC
(In reply to comment #7)
> (In reply to comment #6)
> > I tend to prefer the first option, @sound, any preference ?
> 
> You've got free hands here.. ;-)
> 


I've disabled external gsm lib support in sox for now, until gsm installs it correctly. When I bumped it, I didn't notice this "automagic" dep. Having support for external gsm will mean having it as a mandatory dep, thus dropping some keywords, I'll see about a -r1 for sox using this and a -r1 for gsm that will fix it.
Comment 9 Alexis Ballier gentoo-dev 2007-09-18 18:25:23 UTC
better assigned like that probably
Comment 10 Jakub Moc (RETIRED) gentoo-dev 2007-11-22 08:14:31 UTC
*** Bug 199951 has been marked as a duplicate of this bug. ***
Comment 11 Samuli Suominen (RETIRED) gentoo-dev 2007-12-15 15:42:45 UTC
These are also broken by this bug,

media-plugins/gst-plugins-farsight:gsm
net-im/ekg2:gsm
net-voip/yate:gsm (This one is package.use.masked in amd64 profile)
Comment 12 Samuli Suominen (RETIRED) gentoo-dev 2007-12-15 17:38:15 UTC
Aballier, I've fixed media-sound/gsm to install a shared library (building objects  twice, once -fPIC for shared and once without for static.)

I've also tested building it against net-voip/yate, net-im/ekg2 and media-plugins/gst-plugins-farsight and they are all OK.

Unfortunately keywords don't match with media-sound/gsm and media-sound/sox..

Nothing left for amd64 here, removing CC.
Comment 13 Samuli Suominen (RETIRED) gentoo-dev 2007-12-15 19:51:52 UTC
archteams, keywords ~alpha, ~hppa, ~ppc64 and ~x86-fbsd are required for media-sound/gsm to get matching keywords for media-sound/sox. thanks.
Comment 14 Alexis Ballier gentoo-dev 2007-12-16 14:02:00 UTC
~x86-fbsd done, its fine here
Comment 15 Alexis Ballier gentoo-dev 2007-12-16 14:08:17 UTC
added 14.0.0-r1, dropping keywords for arches that dont have it keyworded yet.

Samples:
http://samples.mplayerhq.hu/A-codecs/GSM/

Testing:
play sample.gsm
-> should play
sox sample.gsm foo.wav
-> foo.wav should be sample.gsm decoded into wav

Comment 16 Jeroen Roovers (RETIRED) gentoo-dev 2007-12-17 09:28:45 UTC
Marked ~hppa.
Comment 17 Raúl Porcel (RETIRED) gentoo-dev 2007-12-26 15:42:05 UTC
~alpha done, thanks Tobias
Comment 18 Brent Baude (RETIRED) gentoo-dev 2008-01-01 03:06:27 UTC
~ppc64
Comment 19 Samuli Suominen (RETIRED) gentoo-dev 2008-01-02 16:12:18 UTC
keywords match now, nothing left here -> closing