2012-06-14 98 views
2

當我嘗試安裝VirtualBox編譯dev86包時我有以下錯誤:編譯失敗dev86包在Gentoo

00159           mov  spbbp 
***** comma expected.........................................^ 
***** factor expected........................................^ 
***** illegal indirect to indirect...........................^ 

00091 errors 
00000 warnings 
make[4]: *** [__ldivmod.o] Error 1 
make[4]: Leaving directory `/var/tmp/portage/sys-devel/dev86-0.16.18/work/dev86-0.16.18/libc/bcc' 
make[3]: *** [/var/tmp/portage/sys-devel/dev86-0.16.18/work/dev86-0.16.18/libc/libc.a] Error 1 
make[3]: Leaving directory `/var/tmp/portage/sys-devel/dev86-0.16.18/work/dev86-0.16.18/libc' 
make[2]: *** [library] Error 2 
make[2]: Leaving directory `/var/tmp/portage/sys-devel/dev86-0.16.18/work/dev86-0.16.18' 
make[1]: *** [all] Error 2 
make[1]: Leaving directory `/var/tmp/portage/sys-devel/dev86-0.16.18/work/dev86-0.16.18' 
make: *** [all] Error 2 
emake failed 
* ERROR: sys-devel/dev86-0.16.18 failed (compile phase): 
* (no error message) 
* 

我試圖降級作出v3.81,使用dev86和使用的舊版本,但它沒有幫助。 我用cflags和cxxflags中的-D_FORTIFY_SOURCE嘗試過,但也沒有任何改變。

gentoo herman # emerge --info dev86 
Portage 2.1.10.65 (default/linux/amd64/10.0, gcc-4.5.3, glibc-2.15-r2, 3.3.1-gentoo x86_64) 
================================================================= 
         System Settings 
================================================================= 
System uname: [email protected]_2.53GHz-with-gentoo-2.1 
Timestamp of tree: Thu, 14 Jun 2012 15:45:01 +0000 
ccache version 3.1.7 [enabled] 
app-shells/bash:   4.2_p20 
dev-java/java-config:  2.1.11-r3 
dev-lang/python:   2.7.2-r3, 3.2.2 
dev-util/ccache:   3.1.7 
dev-util/cmake:   2.8.8-r3 
dev-util/pkgconfig:  0.26 
sys-apps/baselayout:  2.1 
sys-apps/openrc:   0.9.8.4 
sys-apps/sandbox:   2.5 
sys-devel/autoconf:  2.13, 2.68 
sys-devel/automake:  1.11.3, 1.12.1 
sys-devel/binutils:  2.22-r1 
sys-devel/gcc:   4.5.3-r2, 4.6.3 
sys-devel/gcc-config:  1.7.3 
sys-devel/libtool:  2.4.2 
sys-devel/make:   3.82-r3 
sys-kernel/linux-headers: 3.2 (virtual/os-headers) 
sys-libs/glibc:   2.15-r2 
Repositories: gentoo 
ACCEPT_KEYWORDS="amd64 ~amd64" 
ACCEPT_LICENSE="*" 
CBUILD="x86_64-pc-linux-gnu" 
CFLAGS="-march=core2 -mcx16 -msahf -msse4.1 --param l1-cache-size=32 --param l1-cache-line-size=64 --param l2-cache-size=6144 -mtune=generic" 
CHOST="x86_64-pc-linux-gnu" 
CONFIG_PROTECT="/etc /usr/share/config /usr/share/gnupg/qualified.txt /usr/share/themes/oxygen-gtk/gtk-2.0 /var/lib/hsqldb" 
CONFIG_PROTECT_MASK="${EPREFIX}/etc/gconf /etc/ca-certificates.conf /etc/env.d /etc/env.d/java/ /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/php/apache2-php5.3/ext-active/ /etc/php/apache2-php5.4/ext-active/ /etc/php/cgi-php5.3/ext-active/ /etc/php/cgi-php5.4/ext-active/ /etc/php/cli-php5.3/ext-active/ /etc/php/cli-php5.4/ext-active/ /etc/revdep-rebuild /etc/sandbox.d /etc/splash /etc/terminfo" 
CXXFLAGS="-march=core2 -mcx16 -msahf -msse4.1 --param l1-cache-size=32 --param l1-cache-line-size=64 --param l2-cache-size=6144 -mtune=generic" 
DISTDIR="/usr/portage/distfiles" 
FEATURES="assume-digests binpkg-logs ccache config-protect-if-modified distlocks ebuild-locks fixlafiles news parallel-fetch parse-eapi-ebuild-head protect-owned sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch" 
FFLAGS="" 
GENTOO_MIRRORS="http://ftp.vectranet.pl/gentoo/ http://gentoo.mirror.pw.edu.pl/" 
LANG="pl_PL.utf8" 
LDFLAGS="-Wl,-O1 -Wl,--as-needed" 
LINGUAS="pl" 
MAKEOPTS="-j5" 
PKGDIR="/usr/portage/packages" 
PORTAGE_CONFIGROOT="/" 
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --human-readable --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages" 
PORTAGE_TMPDIR="/var/tmp" 
PORTDIR="/usr/portage" 
PORTDIR_OVERLAY="" 
SYNC="rsync://rsync7.pl.gentoo.org/gentoo-portage" 
USE="X aac aacplus acl acpi alsa amd64 amr apache2 aperfmperf apic apng arch_perfmon asf ass avx berkdb bts bzip2 cleartype clflush cli cmov consolekit constant_tsc corefonts cpudetection cracklib crypt cups custom-cflags cx16 cx8 cxx dbus de declarative dirac djvu dri ds_cpl dtes64 dts dvd encode est ffmpeg flexpriority fontconfig fortran fpu fxsr gd gdbm gles gpm gtk gtk3 gudev hardcoded-tables ht iconv icu jack java jpeg kde kipi lahf_lm libnotify lm lm_sensors mca mce minizip mmx mmxext mng modules monitor mp3 msr mtrr mudflap multilib multimedia mysql ncurses nls nopl nptl nsplugin nx ogg opengl openmp pae pam pat pbe pcre pdcm pdf pdfimport pebs pge php png pni policykit ppds pppd pse pse36 python qalculate qt-faststart qt3support qt4 qwt rdesktop readline rep_good samba scanner schroedinger semantic-desktop sep session smx source spell sql ss sse sse2 sse4_1 ssl ssse3 static-libs subvesion svg syscall tcpd threads tm tm2 tools tpr_shadow truetype tsc type1 udev unicode upower usb vhosts vme vmx vnmi vorbis webkit wicd wifi win32codec wma-fixed x264 xinerama xorg xosd xtpr xvid zeroconf zlib" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci 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 mmap_emul 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 cgi cgid 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" CALLIGRA_FEATURES="kexi words flow plan sheets stage tables krita karbon braindump" CAMERAS="ptp2" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf superstar2 timing tsip tripmate tnt ubx" INPUT_DEVICES="mouse keyboard evdev synaptics" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" LINGUAS="pl" NETBEANS_MODULES="php websvccommon" PHP_TARGETS="php5-3" PYTHON_TARGETS="python3_2 python2_7" RUBY_TARGETS="ruby18 ruby19" USERLAND="GNU" VIDEO_CARDS="nvidia" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipset ipp2p iface geoip fuzzy condition tee tarpit sysrq steal rawnat logmark ipmark dhcpmac delude chaos account" 
Unset: CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LC_ALL, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, USE_PYTHON 

任何人有任何想法?

謝謝!

+0

你的問題真的屬於serverfault.com –

+1

順便說一下,這是我在make.conf中見過的最具異國情調的'CFLAGS'。我首先將它們改爲更傳統的東西,比如'CFLAGS =「 - march = core2 -O2 -pipe」',然後再次嘗試編譯。 –

+0

Thx爲您的答覆:-)我已經改變了CFLAGS,但仍然是相同的錯誤:/ – Debian

回答

1

我試圖在5臺硬化的gentoo amd64機器上構建sys-devel/dev86-0.16.18包,它們都成功了。

雖然封裝顯示編譯過程中有很多的警告和QA的豐富的聲明之後,這很可能是你的問題的原因:

* QA Notice: Package triggers severe warnings which indicate that it 
*   may exhibit random runtime failures. 
* floatop.c:33:7: warning: dereferencing type-punned pointer will break strict-aliasing rules 
* floatop.c:48:7: warning: dereferencing type-punned pointer will break strict-aliasing rules 
* genloads.c:391:5: warning: dereferencing type-punned pointer will break strict-aliasing rules 
* genloads.c:395:5: warning: dereferencing type-punned pointer will break strict-aliasing rules 
* loadexp.c:79:3: warning: dereferencing type-punned pointer will break strict-aliasing rules 


* QA Notice: Package triggers severe warnings which indicate that it 
*   may exhibit random runtime failures. 
* dbprintf.c:24:4: warning: implicit declaration of function ‘vdbprintf’ 
* dbprintf.c:30:1: warning: implicit declaration of function ‘write’ 
* dbprintf.c:110:9: warning: implicit declaration of function ‘strlen’ 
* dumps.c:22:9: warning: implicit declaration of function ‘memcmp’ 
* dumps.c:25:2: warning: implicit declaration of function ‘strlen’ 
* ld.c:221:8: warning: implicit declaration of function ‘ld86r’ 
* mkar.c:41:7: warning: implicit declaration of function ‘fatalerror’ 


* QA Notice: Package triggers severe warnings which indicate that it 
*   may exhibit random runtime failures. 
* dbprintf.c:110:13: warning: incompatible implicit declaration of built-in function ‘strlen’ 
* dumps.c:25:6: warning: incompatible implicit declaration of built-in function ‘strlen’ 

* QA Notice: Package triggers severe warnings which indicate that it 
*   may exhibit random runtime failures. 
* input.c:400:10: warning: array subscript is below array bounds 


* QA Notice: Package triggers severe warnings which indicate that it 
*   may exhibit random runtime failures. 
* makeboot.c:1247:7: warning: too few arguments for format 

* Please do not file a Gentoo bug and instead report the above QA 
* issues directly to the upstream developers of this software. 
* Homepage: http://www.debath.co.uk/ 

如果你的工具鏈過於「嚴格」或不正確配置它可能很容易打破包裝上差的編碼。正如我在以前的評論曾提到過,您CFLAGS不遵循「安全」值所推薦的Gentoo Wiki on your CPU architecture,其中建議爲你的CPU進行以下設置:

64 bit profile (amd64) for >= GCC 4.3 

CHOST="x86_64-pc-linux-gnu" 
CFLAGS="-march=core2 -O2 -pipe" 
CXXFLAGS="${CFLAGS}" 

這可能需要重新編譯工具鏈更保守CFLAGS

但在此之前,你這樣做(這需要大量的時間明顯),你可以嘗試一些平時工作遇到時,編譯錯誤的東西:

  1. 確保您的系統是最新的,並且所有包是同步的:

    emerge --sync && emerge -uDNav --with-bdeps=y @world

  2. 解決與舊的包和破碎的庫中的任何差異:

    emerge --depclean && revdep-rebuild

  3. 切換回穩定的包裝。我注意到,你運行ACCEPT_KEYWORDS="amd64 ~amd64",這可能會導致超出不穩定包的意外問題。您可能需要嘗試從中刪除~amd64,並聲明您需要/etc/portage/package.keywordsSee the Gentoo Manual on this subject)中的特定軟件包的不穩定版本。設置完成後正確的標誌重試步驟1 & 2.

如果建立這個包還是失敗,你沒有放棄,你可以繼續通過重建工具鏈:

  1. 首先設置CFLAGSCXXFLAGS和其他指令如USELDFLAGS/etc/make.conf中的安全值。
  2. 重新編譯GCC使用新的配置,並確保選擇使用正確的版本:

    emerge gcc 
    gcc-config -l 
    [1] i686-pc-linux-gnu-4.4.5 * 
    [2] i686-pc-linux-gnu-4.5.3 
    gcc-config 2 
    env-update && source /etc/profile 
    
  3. 重建工具鏈的剩餘部分(參考:Upgrading GCCUpgrading Gentoo):

    emerge libtool glibc binutils 
    
  4. 喝點咖啡,看電影,回來重試你的初步編譯。

通過以上所有步驟跑步是消耗時間,但解決了大多數emerge編譯錯誤(如果包本身不ofcourse打破)。

作爲參考,這裏是emerge --info對於一個健全的(硬化)的機器,成功編譯這個包:

Portage 2.1.10.49 (hardened/linux/amd64, gcc-4.5.3, glibc-2.14.1-r3, 3.2.2-hardened-r1-RMZv1si x86_64) 
================================================================= 
System uname: Linux-3.2.2-hardened-r1-RMZv1si-x86_64-Intel-R-_Xeon-TM-_CPU_3.40GHz-with-gentoo-2.1 
Timestamp of tree: Fri, 15 Jun 2012 08:00:01 +0000 
app-shells/bash:   4.2_p20 
dev-java/java-config:  2.1.11-r3 
dev-lang/python:   2.7.3-r2, 3.2.3 
dev-util/cmake:   2.8.7-r5 
dev-util/pkgconfig:  0.26 
sys-apps/baselayout:  2.1-r1 
sys-apps/openrc:   0.9.8.4 
sys-apps/sandbox:   2.5 
sys-devel/autoconf:  2.13, 2.68 
sys-devel/automake:  1.4_p6-r1, 1.11.1 
sys-devel/binutils:  2.21.1-r1 
sys-devel/gcc:   4.5.3-r2 
sys-devel/gcc-config:  1.6 
sys-devel/libtool:  2.4-r1 
sys-devel/make:   3.82-r1 
sys-kernel/linux-headers: 3.1 (virtual/os-headers) 
sys-libs/glibc:   2.14.1-r3 
Repositories: gentoo x-boxed-main kormoc x-portage 
ACCEPT_KEYWORDS="amd64" 
ACCEPT_LICENSE="*" 
CBUILD="x86_64-pc-linux-gnu" 
CFLAGS="-march=nocona -O2 -pipe" 
CHOST="x86_64-pc-linux-gnu" 
CONFIG_PROTECT="/etc /usr/share/gnupg/qualified.txt /usr/share/openvpn/easy-rsa /var/bind /var/qmail/alias /var/qmail/control /var/vpopmail/etc" 
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/env.d/java/ /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/php/apache2-php5.3/ext-active/ /etc/php/apache2-php5.4/ext-active/ /etc/php/cgi-php5.3/ext-active/ /etc/php/cgi-php5.4/ext-active/ /etc/php/cli-php5.3/ext-active/ /etc/php/cli-php5.4/ext-active/ /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo" 
CXXFLAGS="-march=nocona -O2 -pipe" 
DISTDIR="/usr/portage/distfiles" 
FEATURES="assume-digests binpkg-logs distlocks ebuild-locks fixlafiles news parallel-fetch protect-owned sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch" 
FFLAGS="" 
GENTOO_MIRRORS="ftp://ftp.snt.utwente.nl/pub/os/linux/gentoo http://ftp.snt.utwente.nl/pub/os/linux/gentoo ftp://mirror.leaseweb.com/gentoo/ http://mirror.leaseweb.com/gentoo/ " 
LANG="en_US.UTF-8" 
LC_ALL="en_US.UTF-8" 
LDFLAGS="-Wl,-O1 -Wl,--as-needed" 
MAKEOPTS="-j5" 
PKGDIR="/usr/portage/packages" 
PORTAGE_CONFIGROOT="/" 
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --human-readable --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages" 
PORTAGE_TMPDIR="/var/tmp" 
PORTDIR="/usr/portage" 
PORTDIR_OVERLAY="/var/lib/layman/boxed-main /var/lib/layman/kormoc /usr/local/portage" 
SYNC="rsync://rsync.gentoo.org/gentoo-portage" 
USE="acl amd64 apache2 auth_digest bash bash-completion bzip2 caps cli cracklib crypt ctype cxx dba dri ftp gd gdbm gpm hardened iconv imap innodb intl ipv6 ithreads jpeg jpeg2k justify memcache memcached mmx modules mudflap multilib mysql ncurses nls nptl openmp pam pax_kernel pcre php pic png pppd raw readline session slang snmp sockets sse sse2 ssl suexec svg tcpd threads tiff unicode urandom usagi valias vhosts vpopmail wmf xml xorg zlib" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci 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 mmap_emul mulaw multi null plug rate route share shm softvol" APACHE2_MODULES="actions alias authn_alias authn_anon authn_dbm authn_dbd 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 setenvif speling ssl status unique_id usertrack auth_basic auth_digest rewrite userdir vhost_alias bw bandwidth cgid" APACHE2_MPMS="prefork" CALLIGRA_FEATURES="kexi words flow plan sheets stage tables krita karbon braindump" CAMERAS="ptp2" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf superstar2 timing tsip tripmate tnt ubx" INPUT_DEVICES="keyboard mouse evdev" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" PHP_TARGETS="php5-4" PYTHON_TARGETS="python3_2 python2_7" RUBY_TARGETS="ruby18 ruby19" USERLAND="GNU" VIDEO_CARDS="fbdev glint intel mach64 mga neomagic nouveau nv r128 radeon savage sis tdfx trident vesa via vmware dummy v4l" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipset ipp2p iface geoip fuzzy condition tee tarpit sysrq steal rawnat logmark ipmark dhcpmac delude chaos account" 
Unset: CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LINGUAS, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, USE_PYTHON 

祝你好運!