Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 339150

Summary: media-sound/lame-3.98.4[mmx] fails to build nasm-2.09.02 (nasm-2.09.01 still worked)
Product: Gentoo Linux Reporter: Vasiliy Olekhov <olekhov>
Component: Current packagesAssignee: Gentoo Sound Team <sound>
Status: RESOLVED FIXED    
Severity: normal CC: ago, daidxor+bugz, mr_bones_, rh1, robcab666, transacid, travisghansen, warrensg2001
Priority: High    
Version: unspecified   
Hardware: x86   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---
Attachments: emerge --info
emerge -pqv =media-sound/lame-3.98.4
Build environment
Build log
patch

Description Vasiliy Olekhov 2010-09-29 17:42:56 UTC
I've not updated my system for about three months. 
Next emerge -DuN world failed.





Reproducible: Always

Steps to Reproduce:
1. emerge -DuN world or 
2. emerge lame

Actual Results:  
compiler complains about errors in assembly code:
nasm.h:153: error: `%$STACK': context stack is empty

Expected Results:  
flawless installation

I've tried to dig into emerge logs.
Here some results.
./configure && make (without flags) builds lame fine.
I've copied all flags for configure and started to remove them one by one.
It seems that --enable-nasm flag causes the compilation errors.
I've tried to re-emerge nasm and gcc with no luck.
Comment 1 Vasiliy Olekhov 2010-09-29 17:44:45 UTC
Created attachment 248982 [details]
emerge --info

emerge --info
Comment 2 Vasiliy Olekhov 2010-09-29 17:45:35 UTC
Created attachment 248984 [details]
emerge -pqv =media-sound/lame-3.98.4

emerge -pqv =media-sound/lame-3.98.
Comment 3 Vasiliy Olekhov 2010-09-29 17:45:57 UTC
Created attachment 248986 [details]
Build environment

Build environment
Comment 4 Vasiliy Olekhov 2010-09-29 17:46:17 UTC
Created attachment 248987 [details]
Build log

Build log
Comment 5 Agostino Sarubbo gentoo-dev 2010-09-29 19:22:16 UTC
vasiliy:

for me works good.. see my build log and emerge --info 
http://paste.pocoo.org/show/269144/

are you sure you have a clean system despite having ~ ?
Comment 6 Vasiliy Olekhov 2010-09-29 21:14:03 UTC
(In reply to comment #5)
> vasiliy:
> 
> for me works good.. see my build log and emerge --info 
> http://paste.pocoo.org/show/269144/
> 
> are you sure you have a clean system despite having ~ ?
> 
Agostino, I'm not quite sure what do you mean by 'clean system'
Comment 7 Vasiliy Olekhov 2010-09-29 21:15:32 UTC
(In reply to comment #5)
> vasiliy:
> 
> for me works good.. see my build log and emerge --info 
> http://paste.pocoo.org/show/269144/
> 
> are you sure you have a clean system despite having ~ ?
> 
What is the reason your configure is ran with --disable-nasm ?
Comment 8 Silvence 2010-09-29 21:49:34 UTC
For me it breaks using nasm-2.09.02, ok with nasm-2.08.02
Comment 9 Vasiliy Olekhov 2010-09-29 21:53:58 UTC
(In reply to comment #8)
> For me it breaks using nasm-2.09.02, ok with nasm-2.08.02
> 
Same for me. I've unmerged nasm, emerged lame, and re-emerged nasm afterwards.
Should I resolve this bug as "works for me" ?
Comment 10 daid kahl 2010-10-01 10:55:39 UTC
(In reply to comment #8)
> For me it breaks using nasm-2.09.02, ok with nasm-2.08.02
> 

ditto.  Some problem with nasm?  I can't build any versions of lame with nasm-2.09.02.
Comment 11 Agostino Sarubbo gentoo-dev 2010-10-01 12:40:25 UTC
(In reply to comment #10)
> ditto.  Some problem with nasm?  I can't build any versions of lame with
> nasm-2.09.02.
> 

idem for me
Comment 12 Robert Cabrera 2010-10-03 00:48:22 UTC
I can confirm this exact same issue on my ~86 laptop.

Downgrading to nasm-2.08.02 from nasm-2.09.02 resolves this issue and allows lame to build.

This was not an issue with ver.-2.09.01 which is no longer in the tree. So this is a regression of some sort.

For now, I've added nasm-2.09.02 to my package.mask file.
Comment 13 Agostino Sarubbo gentoo-dev 2010-10-03 01:38:32 UTC
Guys :) see ebuild:

DEPEND="${RDEPEND}
	        dev-util/pkgconfig
	        mmx? ( dev-lang/nasm )"

So, try temporarily build with -mmx:

echo "media-sound/lame -mmx" >> /etc/portage/package.use
Comment 14 Charles Selvidge 2010-10-03 02:04:42 UTC
Occurred on 5 different systems. If nasm> 2.08.02 installed, emerge fails. Simply reverting to 2.08.02 for this build fixes the problem. 
Comment 15 Agostino Sarubbo gentoo-dev 2010-10-03 02:06:12 UTC
Created attachment 249391 [details]
patch

@ ssuominen

Is a good job and good syntax?
Comment 16 Mr. Bones. (RETIRED) gentoo-dev 2010-10-03 03:00:47 UTC
No, nasm isn't slotted so that patch to the ebuild isn't correct.
Comment 17 Mr. Bones. (RETIRED) gentoo-dev 2010-10-03 06:18:50 UTC
sed -i -e '/define sp/s/+/ + /g' libmp3lame/i386/nasm.h || die

works around it I believe.
Comment 18 Steve Warren 2010-10-03 16:50:09 UTC
For me, I have this problem only on ~x86. However on ~amd64 both lame-3.98.4 and nasm-2.09.02 build just fine together.

Comment 19 Samuli Suominen (RETIRED) gentoo-dev 2010-10-03 18:01:04 UTC
(In reply to comment #18)
> For me, I have this problem only on ~x86. However on ~amd64 both lame-3.98.4
> and nasm-2.09.02 build just fine together.
> 

The mmx code in lame is only for x86 (32bit) so you won't see it in other arch's.

That said, the solution in Comment #17 looks fine to me but I can't test it. So anyone who can, please go ahead and apply it.
Comment 20 Robert Cabrera 2010-10-04 15:10:16 UTC
(In reply to comment #19)
> (In reply to comment #18)
> > For me, I have this problem only on ~x86. However on ~amd64 both lame-3.98.4
> > and nasm-2.09.02 build just fine together.
> > 
> 
> The mmx code in lame is only for x86 (32bit) so you won't see it in other
> arch's.
> 
> That said, the solution in Comment #17 looks fine to me but I can't test it. So
> anyone who can, please go ahead and apply it.
> 
I'd love to help, but I'm a truck driver not a programmer. How and where would I execute that command to try it out and see if it works? TIA
Comment 21 Mr. Bones. (RETIRED) gentoo-dev 2010-10-04 15:22:24 UTC
It worked fine for me and lame is high enough profile that I just went ahead and committed the fix.
Comment 22 Robert Cabrera 2010-10-04 19:28:57 UTC
(In reply to comment #21)
> It worked fine for me and lame is high enough profile that I just went ahead
> and committed the fix.
> 
TY. I just re-synced and can confirm build works now. Thanks