[リストへもどる]
一括表示
タイトルFedora Core 5 i386 で 浮動小数点例外です
記事No2327
投稿日: 2006/09/24(Sun) 23:42
投稿者tkco
Fedora Core 5 i386を使っているのですが、Petit3.1.3のソースからコンパイルし、Gripでエンコーダをgogoを選択し、使用してみたところ、異常に容量の少ない
MP3ファイルができあがりました。そこで、コマンドラインでwavファイルからエンコードしたところ「浮動小数点例外です」というエラーメッセージが出ました。webで検索したところ、同様のエラーがFedora Core 5で出ているようです。対応策等ありましたら、教えてください。よろしくおねがいします。

タイトルRe: Fedora Core 5 i386 で 浮動小数点例外です
記事No2328
投稿日: 2006/09/27(Wed) 15:20
投稿者tkco
追記:Fedora Core 5はLinuxの一種です。
ちなみにCPUはAMD Athlon2800です。

タイトルRe: Fedora Core 5 i386 で 浮動小数点例外です
記事No2331
投稿日: 2006/09/29(Fri) 21:11
投稿者へるみ
コマンドライン上でエンコードしても同じでしょうか.
古いFC5ですが,手元の環境(P4D)では正しく動きました.
>uname -a
Linux fc5 2.6.9-1.667smp
>gcc -v
gcc version 3.4.2 20041017 (Red Hat 3.4.2-6.fc3)
>nasm -v
NASM version 0.98.38 compiled on Jul 2 2004

お手数ですが-mmx off -sse offなどのオプションをつけても変わらないのか確認していただけますか.

タイトルRe^2: Fedora Core 5 i386 で 浮動小数点例外です
記事No2337
投稿日: 2006/10/05(Thu) 06:11
投稿者tkco
レス有り難うございます。

$ /usr/local/bin/gogo -b 128 -mmx off -sse off 'pretty doll.wav'

以上のコマンドを実行してみました。結果は変わらず「浮動小数点例外です」
オプションの付け方に問題があればご指摘お願いします。

$ uname -r
2.6.17-1.2187_FC5

$ gcc -v
Using built-in specs.
Target: i386-redhat-linux
コンフィグオプション: ../configure --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info --enable-shared --enable-threads=posix --enable-checking=release --with-system-zlib --enable-__cxa_atexit --disable-libunwind-exceptions --enable-libgcj-multifile --enable-languages=c,c++,objc,obj-c++,java,fortran,ada --enable-java-awt=gtk --disable-dssi --with-java-home=/usr/lib/jvm/java-1.4.2-gcj-1.4.2.0/jre --with-cpu=generic --host=i386-redhat-linux
スレッドモデル: posix
gcc バージョン 4.1.1 20060525 (Red Hat 4.1.1-1)

$ nasm -v
NASM version 0.98.39 compiled on Feb 12 2006

タイトルRe^3: Fedora Core 5 i386 で 浮動小数点例外です
記事No2339
投稿日: 2006/10/06(Fri) 15:32
投稿者へるみ
> gcc バージョン 4.1.1 20060525 (Red Hat 4.1.1-1)

別のdistributionですが,4.1.1でも動きました.
再現しないので困りますね.またお手数ですが,
./configure --enable-debug
としたあと,
gdb ./gogo なんとか
として落ちたところで
>list
>bt
とした結果を見せていただけますか.

タイトルRe^4: Fedora Core 5 i386 で 浮動小数点例外です
記事No2340
投稿日: 2006/10/06(Fri) 18:17
投稿者tkco
./configure --enable-debug
を実行したところ、

[root@hoge petit313]# ./configure --enable-debug
configure: error: can not find sources in . or ..

となりました。申し訳ないのですが、どうすればよろしいでしょうか?
お手数かけますが、よろしくおねがいします。

タイトルRe^5: Fedora Core 5 i386 で 浮動小数点例外です
記事No2341
投稿日: 2006/10/06(Fri) 22:14
投稿者へるみ
> [root@hoge petit313]# ./configure --enable-debug
> configure: error: can not find sources in . or ..

なんでじゃ(^^; 同じFC5とは思えない….

では,普通に./configureしてでできたMakefileを開いてCFLAGSのあたりを探し出して,-O3 -fomit-frame-pointerみたいになってる部分の最適化を全てoffにする,つまり
>CFLAGS = -c $(INC) -O -g -Wall -fno-builtin -Wall -pipe ->DDEBUG \
> -DLAMEPARSE -DLAMESNDFILE \
> -DUSE_X86ASM -DUSE_PTHREAD \
> $(DEFS)
としてからmakeして続きを実行してみてください.

タイトルRe^6: Fedora Core 5 i386 で 浮動小数点例外です
記事No2342
投稿日: 2006/10/06(Fri) 22:32
投稿者へるみ
> >CFLAGS = -c $(INC) -O -g -Wall -fno-builtin -Wall -pipe ->DDEBUG \
> > -DLAMEPARSE -DLAMESNDFILE \
> > -DUSE_X86ASM -DUSE_PTHREAD \
> > $(DEFS)
> としてからmakeして続きを実行してみてください.

改行が入って分かりにくいですが,">"と"\"は全て削除して1行に書いてください.

タイトルRe^7: Fedora Core 5 i386 で 浮動小数点例外です
記事No2343
投稿日: 2006/10/07(Sat) 15:35
投稿者tkco
私のゲットしたソースは、計さんのHPから落としたものなんですが、linuxフォルダや、FreeBSDフォルダ等に分かれていて、その中に Makefile thread.c ファイルがあり、./configureを実行しなくてもMakeできる仕様になっていまして、./configureを実行するには、何らかのオプションを付けないとだめみたいです。
readmeや configureのヘルプを見たのですが、私のとぼしいスペックではわかりませんでしたwで、Makefileの変更ですが、

>CFLAGS = -Wall $(PROF) -DNDEBUG
>CFLAGS += -DHAVE_CONFIG_H -DLAMEPARSE -DLAMESNDFILE
>CFLAGS += -DUSE_X86ASM
>CFLAGS += -O -fomit-frame-pointer -ffast-math -funroll-loops

ここの記述を変更すれば良いのでしょうか?恥ずかしながら、Cは10年位前にちょろっとかじっただけなので、どう変更すればよいのか分かりません;;
./configureが実行できるようなソースを取得する場所を教えていただければありがたいのですが・・・
申し訳ないですが、もう少しお付き合いください。m(_ _)m

タイトルRe^8: Fedora Core 5 i386 で 浮動小数点例外です
記事No2344
投稿日: 2006/10/07(Sat) 16:12
投稿者へるみ
>私のゲットしたソースは、計さんのHPから落としたものなんですが
おおっ,今知ったのですが確かに計さんのところにあるものだとconfigureに失敗しますね(汗).
PENさんのところにあるもので試していただけますか?

>http://www.marinecat.net/free/windows/mct_free.htm
>午後のこ〜だ Ver3.13 UNIX系OS向けのアーカイブ(tar.gz)

タイトルRe^9: Fedora Core 5 i386 で 浮動小数点例外です
記事No2345
投稿日: 2006/10/08(Sun) 13:08
投稿者tkco
./configure 通りました!
結果ですが以下の通りです。参考になりますでしょうか?

[root@hoge petit313]# gdb ./gogo -b 128 \ /home/tkc/ogg/complex/complex/venus.wav
GNU gdb Red Hat Linux (6.3.0.0-1.134.fc5rh)
Copyright 2004 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB. Type "show warranty" for details.
This GDB was configured as "i386-redhat-linux-gnu"...Using host libthread_db library "/lib/libthread_db.so.1".

"/home/tkc/ogg/complex/complex/venus.wav" is not a core dump: ファイル形式が認識できません
(gdb) list
328 reportDsp( 1 );
329 }
330 return NULL;
331 }
332 #endif
333
334 extern void clkput(void);
335 int
336 main(int argc, char *argv[])
337 {
(gdb) bt
No stack.
(gdb) quit

タイトルRe^10: Fedora Core 5 i386 で 浮動小数点例外です
記事No2346
投稿日: 2006/10/08(Sun) 13:10
投稿者tkco
わわ、変な記号いれちゃったんでもう一度w

[root@tkc-lnx petit313]# gdb ./gogo -b 128 /home/tkc/ogg/complex/complex/venus.wav
GNU gdb Red Hat Linux (6.3.0.0-1.134.fc5rh)
Copyright 2004 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB. Type "show warranty" for details.
This GDB was configured as "i386-redhat-linux-gnu"...Using host libthread_db library "/lib/libthread_db.so.1".

"/home/tkc/ogg/complex/complex/venus.wav" is not a core dump: ファイル形式が認識できません
(gdb) list
328 reportDsp( 1 );
329 }
330 return NULL;
331 }
332 #endif
333
334 extern void clkput(void);
335 int
336 main(int argc, char *argv[])
337 {
(gdb) bt
No stack.
(gdb) quit

タイトルRe^10: Fedora Core 5 i386 で 浮動小数点例外です
記事No2347
投稿日: 2006/10/09(Mon) 20:13
投稿者へるみ
> [root@hoge petit313]# gdb ./gogo -b 128
すいません,そうじゃなくて
>gdb --arg ./gogo /なんとか/venus.wav
で起動してください.

タイトルRe^10: Fedora Core 5 i386 で 浮動小数点例外です
記事No2348
投稿日: 2006/10/10(Tue) 13:17
投稿者tkco
たびたび、すみませんです^^;こんなんでました。
よろしくおねがいします。

[root@hoge petit313]# gdb --arg ./gogo /home/tkc/ogg/complex/complex/venus.wav
GNU gdb Red Hat Linux (6.3.0.0-1.134.fc5rh)
Copyright 2004 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB. Type "show warranty" for details.
This GDB was configured as "i386-redhat-linux-gnu"...Using host libthread_db library "/lib/libthread_db.so.1".

(gdb) list
328 reportDsp( 1 );
329 }
330 return NULL;
331 }
332 #endif
333
334 extern void clkput(void);
335 int
336 main(int argc, char *argv[])
337 {
(gdb) bt
No stack.
(gdb)

> Type "show copying" to see the conditions.
> There is absolutely no warranty for GDB. Type "show warranty" for details.
> This GDB was configured as "i386-redhat-linux-gnu"...Using host libthread_db library "/lib/libthread_db.so.1".
>
> "/home/tkc/ogg/complex/complex/venus.wav" is not a core dump: ファイル形式が認識できません
> (gdb) list
> 328 reportDsp( 1 );
> 329 }
> 330 return NULL;
> 331 }
> 332 #endif
> 333
> 334 extern void clkput(void);
> 335 int
> 336 main(int argc, char *argv[])
> 337 {
> (gdb) bt
> No stack.
> (gdb) quit

タイトルRe^11: Fedora Core 5 i386 で 浮動小数点例外です
記事No2349
投稿日: 2006/10/10(Tue) 14:38
投稿者tkco
参考になるか分かりませんが、--enable−debugオプションを
付けてmakeしたgogoをgdbオプション無しで実行すると、
普通にエンコードできました。これはと思い、

#./configure
#make clean
#make
で出来た実行ファイルでやってみたところ、やっぱり浮動小数点エラーが
でます。

以下は--enble-debugオプションを付けて実行した時のログです。
なにか参考になりますでしょうか?
しかし、lameと比べるとエンコード、全然早いですね。びっくりしました!

[root@hoge petit313]# ./gogo /home/tkc/ogg/complex/complex/venus.wav encode /home/tkc/ogg/complex/complex/venus.wav to /home/tkc/ogg/complex/complex/venus.mp3
GOGO-no-coda ver. 3.13 ( May. 20 2004 ) is a mp3 encoder based on lame 3.88,
which is distributed under LGPL on http://www.mp3dev.org/mp3/ .
See http://member.nifty.ne.jp/~pen/ ,
http://homepage1.nifty.com/herumi/gogo_e.html .
family 6:vendor AMD
extended instruction - MMX EMMX CMOV 3D Now! Ext. 3D Now! SSE SSE2 CLFLUSH
enabled extended instruction - MMX EMMX CMOV 3D Now! Ext. 3D Now! SSE SSE2 CLFLUSH
MPEG 1 layer III j-stereo
inp sampling-freq=44.1kHz out sampling-freq=44.1kHz bitrate=128kbps
input file `/home/tkc/ogg/complex/complex/venus.wav'
output file `/home/tkc/ogg/complex/complex/venus.mp3'
{ 9711/ 9711} 100.0% ( 38.49x) re:[00:00:00.00] to:[00:00:06.58]

タイトル−−enable−debug オプションをつけないで出来たMakefileをいじってdebugモードで実行してみました。
記事No2356
投稿日: 2006/10/11(Wed) 19:52
投稿者tkco
いじる前

−−ここから−−
CFLAGS = -c $(INC) -O3 -fomit-frame-pointer -ffast-math -funroll-loops -Wall -pipe -DNDEBUG \
-DLAMEPARSE -DLAMESNDFILE \
-DUSE_X86ASM -DUSE_PTHREAD \
$(DEFS)
−−ここまで−−

-g オプションを加え、-DNDEBUGを-DDEBUGに変更しました。
いじった後

−−ここから−−
CFLAGS = -c $(INC) -O3 -g -fomit-frame-pointer -ffast-math -funroll-loops -Wall -pipe -DDEBUG \
-DLAMEPARSE -DLAMESNDFILE \
-DUSE_X86ASM -DUSE_PTHREAD \
$(DEFS)
−−ここまで−−


実行結果のログ

−−ここから−−
[root@hoge petit313]# gdb --arg ./gogo ./venus.wav
GNU gdb Red Hat Linux (6.3.0.0-1.134.fc5rh)
Copyright 2004 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB. Type "show warranty" for details.
This GDB was configured as "i386-redhat-linux-gnu"...Using host libthread_db library "/lib/libthread_db.so.1".

(gdb) run
Starting program: /home/tkc/temp/petit313/gogo ./venus.wav
Reading symbols from shared object read from target memory...done.
Loaded system supplied DSO at 0x551000
[Thread debugging using libthread_db enabled]
[New Thread 10234176 (LWP 3525)]
encode ./venus.wav to ./venus.mp3
GOGO-no-coda ver. 3.13 ( May. 20 2004 ) is a mp3 encoder based on lame 3.88,
which is distributed under LGPL on http://www.mp3dev.org/mp3/ .
See http://member.nifty.ne.jp/~pen/ ,
http://homepage1.nifty.com/herumi/gogo_e.html .

Program received signal SIGFPE, Arithmetic exception.
[Switching to Thread 10234176 (LWP 3525)]
0x08065c28 in lame_init_params () at engine/lame.c:51
51 amp_lowpass[band] = 1;
(gdb) list
46 int band;
47 FLOAT8 freq;
48
49 for (band = 0; band <= 31; band++) {
50 freq = band / 31.0;
51 amp_lowpass[band] = 1;
52 /* this band and above will be zeroed: */
53 if (freq >= lowpass2) {
54 *lowpass_band = Min(*lowpass_band, band);
55 amp_lowpass[band] = 0;
(gdb) bt
#0 0x08065c28 in lame_init_params () at engine/lame.c:51
#1 0xbfd8a470 in ?? ()
(gdb) quit
The program is running. Exit anyway? (y or n) y
[root@hoge petit313]#
−−ここまで−−

gdbってgdbモードに入ってrunコマンド実行しないとプログラム実行されないんですねwホント何も知らなくてご迷惑おかけします。

タイトル-enable-debugオプションで動作! FC5-i386 & FC5-x86_64 AMD Athlon2800
記事No2357
投稿日: 2006/10/11(Wed) 23:54
投稿者tkco
FC5-i386で./configure -enable-debug でコンパイルしたバイナリファイルをFC5-x86_64にコピーして動作を試したところ、問題なく実行できました。エンコード速度も高速で自分としては満足しています^^

対応ありがとうございましたm(. .)m

へるみさん、もし原因等追求するのであれば今後も協力致しますので、レスよろしくおねがいします。
お忙しいようでしたら、これで〆ということで^^;

知識不足で、ご迷惑をおかけしてしまい、申し訳ございませんでした。

タイトルRe: -enable-debugオプションで動作! FC5-i386 & FC5-x86_64 AMD Athlon2800
記事No2358
投稿日: 2006/10/12(Thu) 23:03
投稿者へるみ
gdbの説明不足すいませんでした.

--enable-debugで動作するというのはなんかいやな解決(一番遅いコンパイルオプションなので)ですが,一応動いたのでよしとしますか.

#FC5のgccのバグだったりして.

-O3 -fomit-frame-pointer -ffast-math -funroll-loops

-O2
だけにしたらもしかして動くかもしれません.
x86_64ネイティブ対応はほぼ全面書き直しになるので難しいですね.

タイトルRe^2: -enable-debugオプションで動作! FC5-i386 & FC5-x86_64 AMD Athlon2800
記事No2360
投稿日: 2006/10/14(Sat) 00:11
投稿者tkco
いやな解決ということなので続報ですw

-O2 試してみた所、英語ファイル名のwavファイルは正常動作します。しかも早い!
ただ日本語ファイル名のwavファイルだと浮動小数点例外がおきます。

そこで−g -DDEBUGオプションを追加しgdb実行したところ、今度は、日本語ファイル名の.wavファイルでも正常動作しました。

そこで
CFLAGS = -c -g $(INC) -O2 -Wall -pipe -DNDEBUG \
としてgdbで実行してみました。

[root@tkc-lnx petit313]# gdb --arg ./gogo /root/temp/petit313/失格.wav
GNU gdb Red Hat Linux (6.3.0.0-1.134.fc5rh)
Copyright 2004 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB. Type "show warranty" for details.
This GDB was configured as "i386-redhat-linux-gnu"...Using host libthread_db library "/lib/libthread_db.so.1".

(gdb) run
Starting program: /home/tkc/temp/petit313/gogo /root/temp/petit313/失格.wav
Reading symbols from shared object read from target memory...done.
Loaded system supplied DSO at 0x551000
[Thread debugging using libthread_db enabled]
[New Thread 8870208 (LWP 5393)]
encode /root/temp/petit313/失格.wav to /root/temp/petit313/失格.mp3
GOGO-no-coda ver. 3.13 ( May. 20 2004 ) is a mp3 encoder based on lame 3.88,
which is distributed under LGPL on http://www.mp3dev.org/mp3/ .
See http://member.nifty.ne.jp/~pen/ ,
http://homepage1.nifty.com/herumi/gogo_e.html .
family 6:vendor AMD
extended instruction - MMX EMMX CMOV 3D Now! Ext. 3D Now! SSE SSE2 CLFLUSH
enabled extended instruction - MMX EMMX CMOV 3D Now! Ext. 3D Now! SSE SSE2 CLFLUSH
MPEG 1 layer III j-stereo
inp sampling-freq=44.1kHz out sampling-freq=44.1kHz bitrate=128kbps
input file `/root/temp/petit313/失格.wav'
output file `/root/temp/petit313/失格.mp3'

Program received signal SIGFPE, Arithmetic exception.
[Switching to Thread 8870208 (LWP 5393)]
0x0805eb67 in calc_noise_short (max_index=12, xr=0x262e20, ix=0x26a340,
cod_info=0x2897c8, l3_xmin=0x26cb50, scalefac=0x26c740, xfsf=0x273f50,
res=0xbfc96df0) at engine/quantize_pvt.c:602
602 qtot_noise.mantissa *= qnoise.mantissa;
(gdb) list
597 itmp = *((unsigned int *)&noise);
598 qnoise.exponent = (itmp>>23); /* - 127; &#65533;&#65533;&#65533;&#548;&#484;&#1956;&#548;&#65533;&#65533;&#432;&#65533;&#65533;&#65533; */
599 itmp = (itmp & ((1<<23)-1)) | (127<<23);
600 qnoise.mantissa = *((float *)&itmp);
601 qtot_noise.exponent += qnoise.exponent;
602 qtot_noise.mantissa *= qnoise.mantissa;
603 if( noise > 1 ){
604 over++;
605 qover_noise.exponent += qnoise.exponent;606 qover_noise.mantissa *= qnoise.mantissa;(gdb) bt
#0 0x0805eb67 in calc_noise_short (max_index=12, xr=0x262e20, ix=0x26a340,
cod_info=0x2897c8, l3_xmin=0x26cb50, scalefac=0x26c740, xfsf=0x273f50,
res=0xbfc96df0) at engine/quantize_pvt.c:602
#1 0x08054d6b in outer_loop (tl=Variable "tl" is not available.
) at engine/quantize.c:491
#2 0x080557bc in CBR_iteration_loop (tl=0x25b010, pe=0xbfc97f8c,
ms_ener_ratio=0xbfc97fbc, mean_bits=0xbfc97fcc) at engine/quantize.c:1244
#3 0x0805065e in lame_encode_mp3_frame (tl=0x25b010) at engine/encoder.c:369
#4 0x08051c91 in encodeframe () at engine/gogo.c:576
#5 0x08051d7c in MPGE_processTrack () at engine/gogo.c:760
#6 0x0804a4ed in main (argc=882398802, argv=0x49101953) at main.c:374
(gdb) q
The program is running. Exit anyway? (y or n) y

CDリッパーはGripを使用しているのですが、[ファイル名に日本語(EUC-JP)を使用する]をチェックし切り出ししています。(そうしないと「.wav」というファイル名になってしまう)FC5の環境はUTF-8なはずなのでこの辺に問題があるのかも?