Bug List: (This bug is not in your last search results)   Show last search results      Search page      Enter new bug
Bug#: 192736
Alias:
Product:
Component:
Status: RESOLVED
Resolution: FIXED
Assigned To: Gentoo Sound Team <sound@gentoo.org>
Hardware:
OS:
Version:
Priority:
Severity:
Reporter: JTRiley <justin.t.riley@gmail.com>
Add CC:
CC:
Remove selected CCs
URL:
Summary:
Status Whiteboard:
Keywords:

Filename Description Type Creator Created Size Actions
emerge.info emerge --info text/plain JTRiley 2007-09-16 21:59 0000 4.99 KB Details
build.log build.log for media-sound/sox failure due to gsm not being built fPIC text/plain JTRiley 2007-09-16 22:01 0000 225.04 KB Details
Create a New Attachment (proposed patch, testcase, etc.) View All

Bug 192736 depends on: Show dependency tree
Bug 192736 blocks:
Votes: 0    Show votes for this bug    Vote for this bug

Additional Comments: (this is where you put emerge --info)


Not eligible to see or edit group visibility for this bug.






View Bug Activity   |   Format For Printing   |   XML   |   Clone This Bug


Description:   Opened: 2007-09-16 21:22 0000
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 From Jakub Moc (RETIRED) 2007-09-16 21:26:54 0000 -------
Please, post the actual errors and emerge --info output.

------- Comment #2 From JTRiley 2007-09-16 21:59:59 0000 -------
Created an attachment (id=131097) [details]
emerge --info

sure thing, here you go. Thanks!

------- Comment #3 From JTRiley 2007-09-16 22:01:13 0000 -------
Created an attachment (id=131099) [details]
build.log for media-sound/sox failure due to gsm not being built fPIC

------- Comment #4 From Jakub Moc (RETIRED) 2007-09-16 23:08:05 0000 -------
Noone will ever notice again unless you reopen the bug... ;)

------- Comment #5 From JTRiley 2007-09-16 23:19:05 0000 -------
(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 From Alexis Ballier 2007-09-17 19:38:05 0000 -------
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 From Samuli Suominen 2007-09-18 13:34:11 0000 -------
(In reply to comment #6)
> I tend to prefer the first option, @sound, any preference ?

You've got free hands here.. ;-)

------- Comment #8 From Alexis Ballier 2007-09-18 18:24:23 0000 -------
(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 From Alexis Ballier 2007-09-18 18:25:23 0000 -------
better assigned like that probably

------- Comment #10 From Jakub Moc (RETIRED) 2007-11-22 08:14:31 0000 -------
*** Bug 199951 has been marked as a duplicate of this bug. ***

------- Comment #11 From Samuli Suominen 2007-12-15 15:42:45 0000 -------
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 From Samuli Suominen 2007-12-15 17:38:15 0000 -------
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 From Samuli Suominen 2007-12-15 19:51:52 0000 -------
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 From Alexis Ballier 2007-12-16 14:02:00 0000 -------
~x86-fbsd done, its fine here

------- Comment #15 From Alexis Ballier 2007-12-16 14:08:17 0000 -------
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 From Jeroen Roovers 2007-12-17 09:28:45 0000 -------
Marked ~hppa.

------- Comment #17 From Raúl Porcel 2007-12-26 15:42:05 0000 -------
~alpha done, thanks Tobias

------- Comment #18 From Brent Baude 2008-01-01 03:06:27 0000 -------
~ppc64

------- Comment #19 From Samuli Suominen 2008-01-02 16:12:18 0000 -------
keywords match now, nothing left here -> closing

Bug List: (This bug is not in your last search results)   Show last search results      Search page      Enter new bug