Fails to compile sys-kernel/xen-sources-2.6.21 with gcc 4.3.0. I already tried to apply this patch: http://kamikaze.waninkoko.info/misc/gcc-4.3.0-compilation-fix.patch But I got same errors.. Reproducible: Always Steps to Reproduce: 1.cd /usr/src/linux-2.6.21-xen 2.make Actual Results: LD init/built-in.o LD .tmp_vmlinux1 arch/i386/kernel/built-in.o: In function `do_settimeofday': (.text+0x5643): undefined reference to `__udivdi3' arch/i386/kernel/built-in.o: In function `do_settimeofday': (.text+0x5693): undefined reference to `__udivdi3' arch/i386/kernel/built-in.o: In function `do_settimeofday': (.text+0x5712): undefined reference to `__udivdi3' arch/i386/kernel/built-in.o: In function `do_settimeofday': (.text+0x5761): undefined reference to `__udivdi3' arch/i386/kernel/built-in.o: In function `sync_xen_wallclock': time-xen.c:(.text+0x5a34): undefined reference to `__udivdi3' arch/i386/kernel/built-in.o:time-xen.c:(.text+0x5a7b): more undefined references to `__udivdi3' follow make: *** [.tmp_vmlinux1] Error 1 This is my emerge --info Portage 2.1.4.4 (default-linux/x86/2007.0, gcc-4.3.0, glibc-2.7-r2, 2.6.24-gentoo-r2 i686) ================================================================= System uname: 2.6.24-gentoo-r2 i686 Intel(R) Core(TM)2 Quad CPU Q6600 @ 2.40GHz Timestamp of tree: Wed, 28 May 2008 01:45:01 +0000 distcc 2.18.3 i686-pc-linux-gnu (protocols 1 and 2) (default port 3632) [enabled] app-shells/bash: 3.2_p33 dev-java/java-config: 1.3.7, 2.1.6 dev-lang/python: 2.4.4-r9 dev-python/pycrypto: 2.0.1-r6 sys-apps/baselayout: 1.12.11.1 sys-apps/sandbox: 1.2.18.1-r2 sys-devel/autoconf: 2.61-r1 sys-devel/automake: 1.9.6-r2, 1.10.1 sys-devel/binutils: 2.18-r1 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="-march=core2 -O2 -fomit-frame-pointer -pipe -mno-tls-direct-seg-refs" 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/env.d/java/ /etc/gconf /etc/terminfo /etc/udev/rules.d" CXXFLAGS="-march=core2 -O2 -fomit-frame-pointer -pipe -mno-tls-direct-seg-refs" DISTDIR="/usr/portage/distfiles" FEATURES="distcc distlocks metadata-transfer parallel-fetch sfperms strict unmerge-orphans userfetch" GENTOO_MIRRORS="http://ftp.belnet.be/mirror/rsync.gentoo.org/gentoo/ http://ftp.ntua.gr/pub/linux/gentoo/ http://gentoo.virginmedia.com/ http://linux.rz.ruhr-uni-bochum.de/download/gentoo-mirror/ http://gentoo.mirrors.tds.net/gentoo" LINGUAS="it en" MAKEOPTS="-j10" PKGDIR="/usr/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="/var/tmp/portage/" PORTDIR="/usr/portage" PORTDIR_OVERLAY="/usr/local/portage" SYNC="rsync://rsync.gentoo.org/gentoo-portage" USE="X acl alsa berkdb bzip2 cli cracklib crypt cups custom-cflags dbus dhcp dpms dri fbcon fbcondecor fbsplash fortran ftp gdbm gpm hddtemp hvm iconv iproute2 ipv6 isdnlog ithreads java kde kdeenablefinal kdehiddenvisibility lcd lm_sensors midi mmx mmxext mudflap multiprocess nas ncurses nfs nls nptl nptlonly opengl openmp openssh optimize pam pcre perl pppd python qt-static rdesktop readline reflection samba sdl sensord session smp smtp snmp spl sse sse2 sse3 ssl ssse3 svga tcpd threads truetype unicode usb utempter x86 xen xfs xorg zlib" ALSA_CARDS="hda-intel" ALSA_PCM_PLUGINS="adpcm alaw copy dshare dsnoop extplug file hooks ladspa lfloat linear meter mulaw multi null rate route share shm" 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="evdev keyboard mouse" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="it en" USERLAND="GNU" VIDEO_CARDS="nv nvidia vesa" Unset: CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LANG, LC_ALL, LDFLAGS, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS
Same problem here. Please fix it.
(In reply to comment #1) > Same problem here. > > Please fix it. > GCC 4.3.0 has many bugs and it's know to miscompile the kernel code. Even if this compilation problem would be fixed the kernel won't boot under XEN anyway (already tried). 4.3.1 addressed some of these errors already. Check it out and report your results.
While I don't understand what are exactly xen-sources for, comment 2 is (probably) FUD. There were certain fixes added to gentoo-sources-2.6.24-r4 that fixed the problem reported here (cld issue was fixed in vanilla 2.6.24.4, this build issue in 2.6.24.5). It simply looks like xen-sources should be updated.
The patch you are speaking about, it's (probably) the same that i already posted. The problem it's in the xen patch instead. At this moment, there is not 2.6.24.x xen patched kernel working as Dom0. The last version for xen dom0 it's the 2.6.22, not in portage yet. (In reply to comment #3) > While I don't understand what are exactly xen-sources for, > comment 2 is (probably) FUD. > There were certain fixes added to gentoo-sources-2.6.24-r4 that fixed the > problem reported here (cld issue was fixed in vanilla 2.6.24.4, this build > issue in 2.6.24.5). > It simply looks like xen-sources should be updated. >
As far as I can tell these are the relevant patches: http://git.kernel.org/?p=linux/kernel/git/stable/stable-queue.git;a=blob;f=queue-2.6.24/time-prevent-the-loop-in-timespec_add_ns-from-being-optimised-away.patch;h=489cbdaa36a065ee536b73f53b7cba8a8e8635bc;hb=cf3242783319c215e3d2e59e293e9c307724cea5 http://git.kernel.org/?p=linux/kernel/git/stable/stable-queue.git;a=blob;f=queue-2.6.24/x86-clear-df-before-calling-signal-handler.patch;h=3e02cf322c9b14814f6341ee9cca32b696e8d743;hb=a6df30d8dcc154c8995ef23d0dcc3b0f54fccb56
Still no work with gcc 4.3.1, without patches... (In reply to comment #2) > GCC 4.3.0 has many bugs and it's know to miscompile the kernel code. Even if > this compilation problem would be fixed the kernel won't boot under XEN anyway > (already tried). 4.3.1 addressed some of these errors already. Check it out and > report your results. >
I tried to modify and apply this patches, but I got same errors: arch/i386/kernel/built-in.o: In function `do_settimeofday': (.text+0x5643): undefined reference to `__udivdi3' arch/i386/kernel/built-in.o: In function `do_settimeofday': (.text+0x5693): undefined reference to `__udivdi3' arch/i386/kernel/built-in.o: In function `do_settimeofday': (.text+0x5712): undefined reference to `__udivdi3' arch/i386/kernel/built-in.o: In function `do_settimeofday': (.text+0x5761): undefined reference to `__udivdi3' arch/i386/kernel/built-in.o: In function `sync_xen_wallclock': time-xen.c:(.text+0x5a34): undefined reference to `__udivdi3' arch/i386/kernel/built-in.o:time-xen.c:(.text+0x5a7b): more undefined references to `__udivdi3' follow make: *** [.tmp_vmlinux1] Error 1 Does the problem is related to xen patches? (In reply to comment #5) > As far as I can tell these are the relevant patches: > http://git.kernel.org/?p=linux/kernel/git/stable/stable-queue.git;a=blob;f=queue-2.6.24/time-prevent-the-loop-in-timespec_add_ns-from-being-optimised-away.patch;h=489cbdaa36a065ee536b73f53b7cba8a8e8635bc;hb=cf3242783319c215e3d2e59e293e9c307724cea5 > http://git.kernel.org/?p=linux/kernel/git/stable/stable-queue.git;a=blob;f=queue-2.6.24/x86-clear-df-before-calling-signal-handler.patch;h=3e02cf322c9b14814f6341ee9cca32b696e8d743;hb=a6df30d8dcc154c8995ef23d0dcc3b0f54fccb56 >
Created attachment 156609 [details, diff] xen-sources-2.6.21 patch for compile with gcc 4.3.x
Comment on attachment 156609 [details, diff] xen-sources-2.6.21 patch for compile with gcc 4.3.x I found this patch from the Xen Mailing List: http://xen.markmail.org/message/3b7ubksiqmdspvtv?q=gcc+4%2E3#query:gcc%204.3+page:1+mid:jr37gfbmdgqqgfka+state:results Now kernel compile fine. I will make some test first then to apply fixed to this bug.
Comment on attachment 156609 [details, diff] xen-sources-2.6.21 patch for compile with gcc 4.3.x see
Not that it needs to be confirmed again, but I see the same failure (and success post-patch) with gcc "Gentoo 4.3.1 p1.0" on i686.
ping?
those sources are not maintained anymore and p.masked. Closing this bug. Please reopen if you have problems with xen-sources 2.6.18.