LinuxSir.cn,穿越时空的Linuxsir!

 找回密码
 注册
搜索
热搜: shell linux mysql
查看: 973|回复: 4

安装gnome-mplayer的USE设置

[复制链接]
发表于 2008-7-16 16:35:15 | 显示全部楼层 |阅读模式
安装mplayer时,看了USE


  1. lee-thinkpad / # emerge -av media-video/gnome-mplayer

  2. These are the packages that would be merged, in order:

  3. Calculating dependencies... done!
  4. [ebuild  N    ] media-libs/win32codecs-20071007-r2  USE="-real" 240 kB
  5. [ebuild  N    ] media-libs/libtheora-1.0_beta2-r1  USE="encode -doc -examples" 1,734 kB
  6. [ebuild  N    ] media-libs/giflib-4.1.6  USE="X -rle" 495 kB
  7. [ebuild  N    ] media-video/mplayer-1.0_rc2_p26753-r1  USE="X a52 alsa arts dvd encode esd gif gtk iconv ipv6 jpeg mad mmx mp3 opengl oss png pulseaudio quicktime sdl theora truetype unicode vorbis win32codecs xscreensaver xv -3dnow -3dnowext -aac -aalib (-altivec) -amrnb -amrwb -bidi -bindist -bl -cddb -cdio -cdparanoia -cpudetection -custom-cflags -debug -dga -directfb -doc -dts -dv -dvb -enca -fbcon -ftp -ggi -jack -joystick -ladspa -libcaca -lirc -live -lzo -md5sum -mmxext -mp2 -musepack -nas -nemesi -openal -pnm -radio -rar -real -rtc -samba -speex -srt -sse -sse2 -ssse3 -svga -teletext -tga -v4l -v4l2 -vidix -x264 -xanim -xinerama -xvid -xvmc -zoran" VIDEO_CARDS="mga s3virge tdfx vesa" 8,053 kB
  8. [ebuild  N    ] media-video/gnome-mplayer-0.6.0  441 kB

  9. Total: 5 packages (5 new), Size of downloads: 10,961 kB

  10. Would you like to merge these packages? [Yes/No]
复制代码



  1. lee-thinkpad / # cat /proc/cpuinfo
  2. processor        : 0
  3. vendor_id        : GenuineIntel
  4. cpu family        : 6
  5. model                : 22
  6. model name        : Intel(R) Celeron(R) M CPU        520  @ 1.60GHz
  7. stepping        : 1
  8. cpu MHz                : 1596.050
  9. cache size        : 1024 KB
  10. fdiv_bug        : no
  11. hlt_bug                : no
  12. f00f_bug        : no
  13. coma_bug        : no
  14. fpu                : yes
  15. fpu_exception        : yes
  16. cpuid level        : 10
  17. wp                : yes
  18. flags                : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss tm pbe nx lm constant_tsc up arch_perfmon pebs bts pni monitor ds_cpl tm2 ssse3 cx16 xtpr lahf_lm
  19. bogomips        : 3195.89
  20. clflush size        : 64
复制代码


奇怪了,为什么sse不会被自动激活呢?


  1. lee-thinkpad / # emerge --info
  2. Portage 2.1.4.4 (default-linux/x86/2007.0/desktop, gcc-4.1.1, glibc-2.5-r0, 2.6.24-16-generic i686)
  3. =================================================================
  4. System uname: 2.6.24-16-generic i686 Intel(R) Celeron(R) M CPU        520  @ 1.60GHz
  5. ...
  6. CXXFLAGS="-march=prescott -O2 -pipe"
  7. ...
  8. USE="X acl acpi alsa arts berkdb cairo cdr cli cracklib crypt cups dbus dri dvd dvdr dvdread eds emboss encode esd espeak evo fam festival firefox fortran gdbm gif gnome gpm gstreamer gtk gucharmap hal iconv ipv6 isdnlog jpeg kde kerberos ldap mad midi mikmod mp3 mpeg mudflap ncurses nls nptl nptlonly ogg opengl openmp oss pam pcre pdf perl png portaudio pppd pulseaudio python qt3 qt3support qt4 quicktime readline reflection sdl session spell spl ssl svg tcpd tiff truetype unicode vorbis win32codecs x86 xml xorg xv zlib" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1 emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m maestro3 trident usb-audio via82xx via82xx-modem ymfpci" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mulaw multi null plug rate route share shm 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="keyboard mouse evdev" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="en_US zh_CN zh" USERLAND="GNU" VIDEO_CARDS="apm ark chips cirrus cyrix dummy fbdev glint i128 i740 i810 imstt mach64 mga neomagic nsc nv r128 radeon rendition s3 s3virge savage siliconmotion sis sisusb tdfx tga trident tseng v4l vesa vga via vmware voodoo"
  9. Unset:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LC_ALL, LDFLAGS, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, PORTDIR_OVERLAY
复制代码


CPU CXXFLAGS用这个prescott

  1. # prescott              Intel Pentium4 with MMX, SSE, SSE2 and SSE3.
复制代码



用PHP写了个自己过滤脚本,把gnome-mplayer的USE存到一个数组,emerge --info显示的USE放到一个数组,然后一个个对比


  1. <?php

  2. /*
  3. lee-thinkpad / # emerge -av media-video/gnome-mplayer

  4. These are the packages that would be merged, in order:

  5. Calculating dependencies... done!
  6. [ebuild  N    ] media-libs/win32codecs-20071007-r2  USE="-real" 240 kB
  7. [ebuild  N    ] media-libs/libtheora-1.0_beta2-r1  USE="encode -doc -examples" 1,734 kB
  8. [ebuild  N    ] media-libs/giflib-4.1.6  USE="X -rle" 495 kB
  9. [ebuild  N    ] media-video/mplayer-1.0_rc2_p26753-r1  USE="X a52 alsa arts dvd encode esd gif gtk iconv ipv6 jpeg mad mmx mp3 opengl oss png pulseaudio quicktime sdl theora truetype unicode vorbis win32codecs xscreensaver xv -3dnow -3dnowext -aac -aalib (-altivec) -amrnb -amrwb -bidi -bindist -bl -cddb -cdio -cdparanoia -cpudetection -custom-cflags -debug -dga -directfb -doc -dts -dv -dvb -enca -fbcon -ftp -ggi -jack -joystick -ladspa -libcaca -lirc -live -lzo -md5sum -mmxext -mp2 -musepack -nas -nemesi -openal -pnm -radio -rar -real -rtc -samba -speex -srt -sse -sse2 -ssse3 -svga -teletext -tga -v4l -v4l2 -vidix -x264 -xanim -xinerama -xvid -xvmc -zoran" VIDEO_CARDS="mga s3virge tdfx vesa" 8,053 kB
  10. [ebuild  N    ] media-video/gnome-mplayer-0.6.0  441 kB

  11. Total: 5 packages (5 new), Size of downloads: 10,961 kB

  12. Would you like to merge these packages? [Yes/No]
  13. */


  14. $use[]='3dnow';
  15. $use[]='3dnowext';
  16. $use[]='aac';
  17. $use[]='aalib';
  18. $use[]='altivec';
  19. $use[]='amrnb';
  20. $use[]='amrwb';
  21. $use[]='bidi';
  22. $use[]='bindist';
  23. $use[]='bl';
  24. $use[]='cddb';
  25. $use[]='cdio';
  26. $use[]='cdparanoia';
  27. $use[]='cpudetection';
  28. $use[]='custom';
  29. $use[]='cflags';
  30. $use[]='debug';
  31. $use[]='dga';
  32. $use[]='directfb';
  33. $use[]='doc';
  34. $use[]='dts';
  35. $use[]='dv';
  36. $use[]='dvb';
  37. $use[]='enca';
  38. $use[]='fbcon';
  39. $use[]='ftp';
  40. $use[]='ggi';
  41. $use[]='jack';
  42. $use[]='joystick';
  43. $use[]='ladspa';
  44. $use[]='libcaca';
  45. $use[]='lirc';
  46. $use[]='live';
  47. $use[]='lzo';
  48. $use[]='md5sum';
  49. $use[]='mmxext';
  50. $use[]='mp2';
  51. $use[]='musepack';
  52. $use[]='nas';
  53. $use[]='nemesi';
  54. $use[]='openal';
  55. $use[]='pnm';
  56. $use[]='radio';
  57. $use[]='rar';
  58. $use[]='real';
  59. $use[]='rtc';
  60. $use[]='samba';
  61. $use[]='speex';
  62. $use[]='srt';
  63. $use[]='sse';
  64. $use[]='sse2';
  65. $use[]='ssse3';
  66. $use[]='svga';
  67. $use[]='teletext';
  68. $use[]='tga';
  69. $use[]='v4l';
  70. $use[]='v4l2';
  71. $use[]='vidix';
  72. $use[]='x264';
  73. $use[]='xanim';
  74. $use[]='xinerama';
  75. $use[]='xvid';
  76. $use[]='xvmc';
  77. $use[]='zoran';


  78. /*
  79. lee-thinkpad / # cat /proc/cpuinfo
  80. processor        : 0
  81. vendor_id        : GenuineIntel
  82. cpu family        : 6
  83. model                : 22
  84. model name        : Intel(R) Celeron(R) M CPU        520  @ 1.60GHz
  85. stepping        : 1
  86. cpu MHz                : 1596.050
  87. cache size        : 1024 KB
  88. fdiv_bug        : no
  89. hlt_bug                : no
  90. f00f_bug        : no
  91. coma_bug        : no
  92. fpu                : yes
  93. fpu_exception        : yes
  94. cpuid level        : 10
  95. wp                : yes
  96. flags                : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss tm pbe nx lm constant_tsc up arch_perfmon pebs bts pni monitor ds_cpl tm2 ssse3 cx16 xtpr lahf_lm
  97. bogomips        : 3195.89
  98. clflush size        : 64
  99. */

  100. $cpu_f[]='fpu';
  101. $cpu_f[]='vme';
  102. $cpu_f[]='de';
  103. $cpu_f[]='pse';
  104. $cpu_f[]='tsc';
  105. $cpu_f[]='msr';
  106. $cpu_f[]='pae';
  107. $cpu_f[]='mce';
  108. $cpu_f[]='cx8';
  109. $cpu_f[]='apic';
  110. $cpu_f[]='sep';
  111. $cpu_f[]='mtrr';
  112. $cpu_f[]='pge';
  113. $cpu_f[]='mca';
  114. $cpu_f[]='cmov';
  115. $cpu_f[]='pat';
  116. $cpu_f[]='pse36';
  117. $cpu_f[]='clflush';
  118. $cpu_f[]='dts';
  119. $cpu_f[]='acpi';
  120. $cpu_f[]='mmx';
  121. $cpu_f[]='fxsr';
  122. $cpu_f[]='sse';
  123. $cpu_f[]='sse2';
  124. $cpu_f[]='ss';
  125. $cpu_f[]='tm';
  126. $cpu_f[]='pbe';
  127. $cpu_f[]='nx';
  128. $cpu_f[]='lm';
  129. $cpu_f[]='constant_tsc';
  130. $cpu_f[]='up';
  131. $cpu_f[]='arch_perfmon';
  132. $cpu_f[]='pebs';
  133. $cpu_f[]='bts';
  134. $cpu_f[]='pni';
  135. $cpu_f[]='monitor';
  136. $cpu_f[]='ds_cpl';
  137. $cpu_f[]='tm2';
  138. $cpu_f[]='ssse3';
  139. $cpu_f[]='cx16';
  140. $cpu_f[]='xtpr';
  141. $cpu_f[]='lahf_lm';


  142. for ($i = 0; $i < count($use); $i++)
  143. {
  144.   if (in_array($use[$i], $cpu_f))
  145.     echo '<p>$use['.$i.'] = '.$use[$i].'</p>';
  146. }


  147. ?>
复制代码



  1. $use[20] = dts

  2. $use[49] = sse

  3. $use[50] = sse2

  4. $use[51] = ssse3
复制代码

最后手动把上面四个加入到/etc/make.conf


1、为什么已经设置了CPU flag但是没有自动激活相应的特性?
2、有没有更好的办法?

注:我基本没有改/etc/make.conf,因为还在文档集里自我折磨中……
发表于 2008-7-16 17:48:16 | 显示全部楼层
CFLAGS="-march=pentium-m -O2 -pipe -fomit-frame-pointer -mmmx -msse -msse2"
回复 支持 反对

使用道具 举报

 楼主| 发表于 2008-7-16 17:50:42 | 显示全部楼层
为什么,为什么,为什么要这样写,官方手册可不是这样说的
回复 支持 反对

使用道具 举报

发表于 2008-7-16 18:08:15 | 显示全部楼层
cflags和use不是一回事
不能相互取代

这个问题你问错地方了
首先,你应该看ebuild,搞清楚ebuild里对这几个use flag是怎么用的,看看你自己能不能提出解决办法
然后,找mplayer ebuild维护者,以获得问题的真正解决(问清楚这是否是一个问题。如果是一个问题,告诉他你的解决方法。如果你解决不了,请他来解决。)
回复 支持 反对

使用道具 举报

 楼主| 发表于 2008-7-16 20:05:50 | 显示全部楼层
想深入了解一下,Linux Kernel,Distribution(Gentoo,Debian) Bash System,Software Manager(Portage, APT)之间的关系,有没有好书推荐?
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

快速回复 返回顶部 返回列表