First Last Prev Next    No search results available      Search page      Enter new bug
Bug#: 230860
Alias:
Product:
Component:
Status: RESOLVED
Resolution: FIXED
Assigned To: Gentoo Sound Team <sound@gentoo.org>
Hardware:
OS:
Version:
Priority:
Severity:
Reporter: Christian Schwinn <schwinni@quadrant1.net>
Add CC:
CC:
Remove selected CCs
URL:
Summary:
Status Whiteboard:
Keywords:

Filename Description Type Creator Created Size Actions
lame-3.98.ebuild lame-3.98.ebuild text/plain Sebastian 2008-07-06 11:45 0000 2.22 KB Details
lame-3.98-shared-frontend.patch lame-3.98-shared-frontend.patch patch Sebastian 2008-07-06 11:47 0000 1008 bytes Details | Diff
lame-3.98-gtk-path.patch lame-3.98-gtk-path.patch patch Sebastian 2008-07-06 11:48 0000 8.40 KB Details | Diff
lame-3.98.ebuild lame-3.98.ebuild text/plain Sebastian 2008-07-06 12:30 0000 2.33 KB Details
Create a New Attachment (proposed patch, testcase, etc.) View All

Bug 230860 depends on: Show dependency tree
Bug 230860 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: 2008-07-05 15:28 0000
LAME 3.98 is finally available at http://lame.sf.net and offers some great
improvements:
http://lame.cvs.sourceforge.net/*checkout*/lame/lame/doc/html/history.html

This should be in portage! :)

Reproducible: Always

------- Comment #1 From Sebastian 2008-07-06 11:45:50 0000 -------
Created an attachment (id=159689) [edit]
lame-3.98.ebuild

Ebuild proposal. Changes:

- inherit "versionator" eclass
- don't use lame-3.96.1-asneeded.patch as the -lm issue seems fixed
- patch gtk paths, otherwise eautoreconf fails

------- Comment #2 From Sebastian 2008-07-06 11:47:11 0000 -------
Created an attachment (id=159690) [edit]
lame-3.98-shared-frontend.patch

Updated patch, old one didn't work anymore.

------- Comment #3 From Sebastian 2008-07-06 11:48:45 0000 -------
Created an attachment (id=159692) [edit]
lame-3.98-gtk-path.patch

This is the gtk paths part from the (now apparently obsolete)
lame-3.96.1-asneeded.patch.

------- Comment #4 From Sebastian 2008-07-06 12:30:35 0000 -------
Created an attachment (id=159696) [edit]
lame-3.98.ebuild

This ebuild forcefully enables nasm for x86 and amd64. nasm isn't enabled by
default, not even when nasm is installed. Compared to the Windows binary from
rarewares (admittedly a non-gcc compile; they used the Intel compiler) the
non-nasm lame is slow:

lame 3.98 native linux binary without nasm support:
154.8 kbps
real    0m27.791s
user    0m27.580s
sys     0m0.110s

lame 3.98 windows binary (executed within Wine!):
155.3 kbps
real    0m21.575s
user    0m20.940s
sys     0m0.100s

lame 3.98 native linux binary with nasm support:
154.8 kbps
real    0m23.689s
user    0m23.480s
sys     0m0.110s

On the other hand with nasm enabled I get text relocations and executable
stacks in /usr/lib/libmp3lame.so.0.0.0, so there's a tradeoff between quality
and speed. But the speed gain is huge!

As far as I know we'd be able to force nasm usage on amd64 and x86. If there's
no real issue with text relocations and executable stacks on these arches I'd
suggest we'd go for the speed.

------- Comment #5 From Kai 2008-07-11 18:17:08 0000 -------
Have you looked at http://www.gentoo.org/proj/en/hardened/gnu-stack.xml

Wonder if a simple -Wa,--noexecstack would "fix" it and what performance impact
that would have

------- Comment #6 From Alexis Ballier 2008-07-11 21:52:47 0000 -------
bumped, thanks!

for the nasm stuff, please see bug #93279. Unfortunately it cannot be included
like that :(

------- Comment #7 From Alexis Ballier 2008-07-16 13:25:33 0000 -------
(In reply to comment #6)
> for the nasm stuff, please see bug #93279. Unfortunately it cannot be included
> like that :(


Thanks to the PaX Team, we now have a pic fix. Could you please test it by
using:
EXTRA_ECONF=--enable-nasm emerge lame
so that I'm sure it's good to be added as an mmx useflag ;)
exec stacks fix will follow soon, but the difficult part it the textrels.

------- Comment #8 From PaX Team 2008-07-16 14:03:17 0000 -------
(In reply to comment #7)

> Thanks to the PaX Team, we now have a pic fix. Could you please test it by
> using:
> EXTRA_ECONF=--enable-nasm emerge lame
> so that I'm sure it's good to be added as an mmx useflag ;)

i'd also be interested in seeing benchmarks.

------- Comment #9 From Alexis Ballier 2008-07-16 14:24:05 0000 -------
(In reply to comment #8)
> i'd also be interested in seeing benchmarks.


some absolutely irrelevant benchs on a single wav file:


mmx:

real    0m23.841s
user    0m19.705s
sys     0m0.204s

non mmx:

real    0m22.770s
user    0m21.177s
sys     0m0.148s

------- Comment #10 From PaX Team 2008-07-16 14:33:53 0000 -------
(In reply to comment #9)
> (In reply to comment #8)
> > i'd also be interested in seeing benchmarks.
> 
> 
> some absolutely irrelevant benchs on a single wav file:

i'd actually be more interested in the pic vs. non-pic numbers ;)

------- Comment #11 From Alexis Ballier 2008-07-16 16:03:15 0000 -------
(In reply to comment #10)
> (In reply to comment #9)
> > (In reply to comment #8)
> > > i'd also be interested in seeing benchmarks.
> > 
> > 
> > some absolutely irrelevant benchs on a single wav file:
> 
> i'd actually be more interested in the pic vs. non-pic numbers ;)

Then I don't notice any noticeable slowdown: for 20 runs on the same file, 6m37
for the pic version vs 6m36 for the non pic one. Though it's hard to get real
benchs on a desktop that does many other things at the same time.

------- Comment #12 From Sebastian 2008-07-16 18:05:00 0000 -------
That's great news. I already had a patch for the exec stack issue but
accidentally deleted it. I'll recreate it right now.

------- Comment #13 From Sebastian 2008-07-16 18:19:10 0000 -------
Ah, the exec stack fix is already served.

Anyway, regarding the PIC fix. It segfaults here:

time lame --nohist --vbr-new -V 4 --noreplaygain -q 2 --id3v2-only 12.\ You\
Could\ Be\ Mine.wav
LAME 3.98 32bits (http://www.mp3dev.org/)
CPU features: MMX (ASM used), SSE (ASM used), SSE2
Using polyphase lowpass filter, transition band: 17249 Hz - 17782 Hz
Encoding 12. You Could Be Mine.wav to 12. You Could Be Mine.wav.mp3
Encoding as 44.1 kHz j-stereo MPEG-1 Layer III VBR(q=4)
    Frame          |  CPU time/estim | REAL time/estim | play/CPU |    ETA
     0/13159  ( 0%)|    0:00/    0:00|    0:00/    0:00|   0.0000x|    0:00
Speicherzugriffsfehler

real    0m0.038s
user    0m0.030s
sys     0m0.000s

Syslog:

lame[27240]: segfault at bffe0008 ip b7f6b305 sp bfebe098 error 4 in
libmp3lame.so.0.0.0[b7f3d000+42000]

emerge --info
Portage 2.1.4.4 (default/linux/x86/2008.0/desktop, gcc-4.1.2, glibc-2.6.1-r0,
2.6.26 i686)
=================================================================
System uname: 2.6.26 i686 Intel(R) Pentium(R) M processor 1400MHz
Timestamp of tree: Wed, 16 Jul 2008 17:17:01 +0000
ccache version 2.4 [enabled]
app-shells/bash:     3.2_p33
dev-lang/python:     2.4.4-r13
dev-python/pycrypto: 2.0.1-r6
dev-util/ccache:     2.4-r7
sys-apps/baselayout: 1.12.11.1
sys-apps/sandbox:    1.2.18.1-r2
sys-devel/autoconf:  2.13, 2.61-r2
sys-devel/automake:  1.5, 1.7.9-r1, 1.8.5-r3, 1.9.6-r2, 1.10.1
sys-devel/binutils:  2.18-r3
sys-devel/gcc-config: 1.4.0-r4
sys-devel/libtool:   1.5.26
virtual/os-headers:  2.6.23-r3
ACCEPT_KEYWORDS="x86"
CBUILD="i686-pc-linux-gnu"
CFLAGS="-O2 -march=pentium-m -pipe -fomit-frame-pointer"
CHOST="i686-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/kde/3.5/env /usr/kde/3.5/share/config
/usr/kde/3.5/shutdown /usr/share/config"
CONFIG_PROTECT_MASK="/etc/env.d /etc/fonts/fonts.conf /etc/gconf
/etc/revdep-rebuild /etc/terminfo /etc/texmf/web2c /etc/udev/rules.d"
CXXFLAGS="-O2 -march=pentium-m -pipe -fomit-frame-pointer"
DISTDIR="/home/portage/distfiles"
EMERGE_DEFAULT_OPTS="--with-bdeps y"
FEATURES="ccache distlocks metadata-transfer sandbox sfperms strict
unmerge-orphans userfetch"
GENTOO_MIRRORS="http://de-mirror.org/distro/gentoo/
http://ftp.heanet.ie/pub/gentoo/
http://mirrors.sec.informatik.tu-darmstadt.de/gentoo/ http://gentoo.tiscali.nl/
http://mirror.switch.ch/ftp/mirror/gentoo/"
LANG="en_US.utf8"
LC_ALL="en_US.utf8"
LDFLAGS="-Wl,-O1"
LINGUAS="en de es"
MAKEOPTS="-j2"
PKGDIR="/home/portage/packages"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress
--force --whole-file --delete --stats --timeout=180 --exclude=/distfiles
--exclude=/local --exclude=/packages"
PORTAGE_TMPDIR="/home"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/local/portage"
SYNC="rsync://rsync.europe.gentoo.org/gentoo-portage"
USE="X bzip2 cups cxx fontconfig gdbm gif gnutls gs iconv jpeg kde
kdeenablefinal kpathsea lcms logrotate mmx ncurses nls nptl pccts pch pcre perl
png ppds python qt3 readline spell sse sse2 ssl svg threads tiff truetype
unicode x86 xml xorg xpm zlib" ALSA_CARDS="intel8x0" ALSA_PCM_PLUGINS="route
adpcm alaw copy dshare dsnoop extplug file hooks ladspa lfloat linear meter
mulaw multi null rate share shm asym dmix empty iec958 ioplug plug softvol"
APACHE2_MODULES="actions alias auth_basic authn_alias authn_anon authn_dbm
authn_default authn_file authz_dbm authz_default authz_groupfile authz_host
authz_owner authz_user autoindex cache dav dav_fs dav_lock deflate dir
disk_cache env expires ext_filter file_cache filter headers include info
log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling
status unique_id userdir usertrack vhost_alias" ELIBC="glibc"
INPUT_DEVICES="synaptics mouse keyboard" KERNEL="linux" LCD_DEVICES="bayrad
cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="en de
es" USERLAND="GNU" VIDEO_CARDS="radeon"
Unset:  CPPFLAGS, CTARGET, INSTALL_MASK, PORTAGE_COMPRESS,
PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS

------- Comment #14 From Sebastian 2008-07-16 18:52:19 0000 -------
gdb /usr/bin/lame
GNU gdb 6.7.1
Copyright (C) 2007 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "i686-pc-linux-gnu"...
Using host libthread_db library "/lib/libthread_db.so.1".
(gdb) set args --nohist --vbr-new -V 4 --noreplaygain -q 2 --id3v2-only 12.\
You\ Could\ Be\ Mine.wav
(gdb) run
Starting program: /usr/bin/lame --nohist --vbr-new -V 4 --noreplaygain -q 2
--id3v2-only 12.\ You\ Could\ Be\ Mine.wav
LAME 3.98 32bits (http://www.mp3dev.org/)
CPU features: MMX (ASM used), SSE (ASM used), SSE2
Using polyphase lowpass filter, transition band: 17249 Hz - 17782 Hz
Encoding 12. You Could Be Mine.wav to 12. You Could Be Mine.wav.mp3
Encoding as 44.1 kHz j-stereo MPEG-1 Layer III VBR(q=4)
    Frame          |  CPU time/estim | REAL time/estim | play/CPU |    ETA
     0/13159  ( 0%)|    0:00/    0:00|    0:00/    0:00|   0.0000x|    0:00
Program received signal SIGSEGV, Segmentation fault.
0xb7efeb6c in fht_SSE.lp20 () from /usr/lib/libmp3lame.so.0
(gdb) set logging file backtrace.log
(gdb) set logging on
Copying output to backtrace.log.
(gdb) bt
#0  0xb7efeb6c in fht_SSE.lp20 () from /usr/lib/libmp3lame.so.0
#1  0x000001f8 in ?? ()
#2  0xbfe50ff8 in ?? ()
#3  0x08532948 in ?? ()
#4  0xb7f16100 in ?? () from /usr/lib/libmp3lame.so.0
#5  0xb7f14ff4 in ?? () from /usr/lib/libmp3lame.so.0
#6  0xb7ee01b0 in fft_long (gfc=0xb7f6c090, x=0xb7efdbb0, chn=-1209191158,
buffer=0xb7ef6830) at fft.c:286
Backtrace stopped: previous frame inner to this frame (corrupt stack?)
(gdb) set logging off
Done logging to backtrace.log.
(gdb) quit
The program is running.  Exit anyway? (y or n) y

------- Comment #15 From PaX Team 2008-07-16 19:54:13 0000 -------
(In reply to comment #13)
> Ah, the exec stack fix is already served.
> 
> Anyway, regarding the PIC fix. It segfaults here:

i posted a new patch, can you try it please?

------- Comment #16 From Sebastian 2008-07-16 20:15:38 0000 -------
I'd be happy to, but where is it posted?

------- Comment #17 From PaX Team 2008-07-16 20:38:43 0000 -------
bug #93279(In reply to comment #16)
> I'd be happy to, but where is it posted?

bug #93279, you should probably post problems there, benchmarks here in fact.

First Last Prev Next    No search results available      Search page      Enter new bug