You are not logged in.

#1 2008-03-23 18:42:11

zyghom
Member
From: Poland/currently Africa
Registered: 2006-05-11
Posts: 432
Website

gcc 4.3 will not compile kernel

dear arch developers,

are you aware that gcc-4.3 does not compile kernel 2.6.24 ?
more info here: http://bbs.archlinux.org/viewtopic.php?id=45589


Zygfryd Homonto

Offline

#2 2008-03-23 18:58:41

dolby
Member
From: 1992
Registered: 2006-08-08
Posts: 1,581

Re: gcc 4.3 will not compile kernel

dear archlinux user,

are you aware that archlinux developers dont read the forum and additionally this distro comes with a bug tracker ?
more info here: http://bugs.archlinux.org/


There shouldn't be any reason to learn more editor types than emacs or vi -- mg (1)
[You learn that sarcasm does not often work well in international forums.  That is why we avoid it. -- ewaller (arch linux forum moderator)

Offline

#3 2008-03-23 19:10:15

lucke
Member
From: Poland
Registered: 2004-11-30
Posts: 4,018

Re: gcc 4.3 will not compile kernel

There's a kernel in testing repo with compilation patches.

Offline

#4 2008-03-24 07:53:47

zyghom
Member
From: Poland/currently Africa
Registered: 2006-05-11
Posts: 432
Website

Re: gcc 4.3 will not compile kernel

yeap, thanks for info
new kernel with mkinitcpio 0.5.18
but :
sudo pacman -S mkinitcpio
resolving dependencies...
looking for inter-conflicts...

Targets: klibc-kbd-1.15.20080312-4  mkinitcpio-0.5.18-1 

Total Download Size:    0.00 MB
Total Installed Size:   0.05 MB

Proceed with installation? [Y/n]
checking package integrity...
(2/2) checking for file conflicts                   [###################################################] 100%
error: could not prepare transaction
error: failed to commit transaction (conflicting files)
klibc-kbd: /lib/initcpio/hooks/keymap exists in filesystem
klibc-kbd: /lib/initcpio/install/keymap exists in filesystem
Errors occurred, no packages were upgraded.


Zygfryd Homonto

Offline

#5 2008-03-24 07:55:48

brebs
Member
Registered: 2007-04-03
Posts: 3,742

Re: gcc 4.3 will not compile kernel

$ pacman -Qo /lib/initcpio/hooks/keymap 
/lib/initcpio/hooks/keymap is owned by kbd 1.12.20070827-2

Offline

#6 2008-03-24 07:58:57

zyghom
Member
From: Poland/currently Africa
Registered: 2006-05-11
Posts: 432
Website

Re: gcc 4.3 will not compile kernel

brebs wrote:
$ pacman -Qo /lib/initcpio/hooks/keymap 
/lib/initcpio/hooks/keymap is owned by kbd 1.12.20070827-2

and ?
to be removed ?

Last edited by zyghom (2008-03-24 07:59:34)


Zygfryd Homonto

Offline

#7 2008-03-24 10:09:07

shining
Pacman Developer
Registered: 2006-05-10
Posts: 2,043

Re: gcc 4.3 will not compile kernel

Why are you trying to upgrade mkinitcpio? Using a subset of testing is not recommended, unless you know what you are doing. And apparently you don't since you couldn't figure out you also had to upgrade kbd to avoid that fileconflict error.
But using testing is not recommended either.
Anyway, I don't see how that's related to the original issue.

Arch devs are aware 2.6.24 doesn't build with gcc 4.3, that's why they applied some patches :
http://bugs.archlinux.org/task/9801
http://cvs.archlinux.org/cgi-bin/viewcv … sroot=Core


pacman roulette : pacman -S $(pacman -Slq | LANG=C sort -R | head -n $((RANDOM % 10)))

Offline

#8 2008-03-24 10:26:39

zyghom
Member
From: Poland/currently Africa
Registered: 2006-05-11
Posts: 432
Website

Re: gcc 4.3 will not compile kernel

shining wrote:

Why are you trying to upgrade mkinitcpio?

for any reason "normal" kernel from core (or even testing) does not see all 4GB of RAM I have
the only way of getting it seen is to use CONFIG_HIGHMEM64G=y in config
to do this I have to recompile kernel
to recompile kernel so far I used abs from core
but it stopped working since gcc upgraded to 4.3
that is why I asked what to do with gcc if it has problems with kernel
then "kernel from testing" was the answer here
then new kernel from testing needs newer mkinitcpio
then....

wink


Zygfryd Homonto

Offline

#9 2008-03-24 13:49:23

shining
Pacman Developer
Registered: 2006-05-10
Posts: 2,043

Re: gcc 4.3 will not compile kernel

zyghom wrote:
shining wrote:

Why are you trying to upgrade mkinitcpio?

for any reason "normal" kernel from core (or even testing) does not see all 4GB of RAM I have
the only way of getting it seen is to use CONFIG_HIGHMEM64G=y in config
to do this I have to recompile kernel
to recompile kernel so far I used abs from core
but it stopped working since gcc upgraded to 4.3
that is why I asked what to do with gcc if it has problems with kernel
then "kernel from testing" was the answer here
then new kernel from testing needs newer mkinitcpio
then....

wink

Ok well, I suggest to keep using arch kernel for now, even if it doesn't see all your mem, and wait for the new kernel package to be pushed to core.
If it works correctly, it will be moved together with all other required packages. And it will be moved soon because the new iso is in preparation.
Then you can rebuild it with your config.


pacman roulette : pacman -S $(pacman -Slq | LANG=C sort -R | head -n $((RANDOM % 10)))

Offline

#10 2008-03-24 13:52:18

zyghom
Member
From: Poland/currently Africa
Registered: 2006-05-11
Posts: 432
Website

Re: gcc 4.3 will not compile kernel

thanks wink


Zygfryd Homonto

Offline

#11 2008-03-25 15:04:46

broch
Banned
From: L.A. California
Registered: 2006-11-13
Posts: 975

Re: gcc 4.3 will not compile kernel

default vanilla kernel does not support gcc-4.3 yet,
even if building kernel from vanilla sources, you still need to add

-fno-tree-scev-cprop to the KBUILD_CFLAGS

to compile kernel successfully

this is know issue easy to fix. However i don't use aur to build kernel so the resolution posted above works with kernel build from sources.

Offline

#12 2008-03-25 19:49:31

gimpel
Member
From: Jena, Germany
Registered: 2008-02-08
Posts: 23

Re: gcc 4.3 will not compile kernel

I'm quite new to arch (using it on my main laptop since 10/2007)

As posted above, I also tried building the kernel26 package
$ yaourt -Sb kernel26
I've done this several times without any problems with different gcc versions prior to 4.3, using a slightly modified /etc/makepkg.conf (flags from gentoo wiki) for every new stock kernel release in the core-repo

CFLAGS="-march=native -mtune=native -O2 -pipe -fomit-frame-pointer"
CXXFLAGS="-march=native -mtune=native -O2 -pipe -fomit-frame-pointer"
MAKEFLAGS="-j6"

I want to rebuild the stock kernel, since gcc 4.3.0 seems to have extended support for Core2 scheduling (-mtune). Because I don't have no clue yet how to modify the core/kernel26 PKGBUILD to correctly include the gcc-4.3 patches I'm now playing aroung with testing/kernel26

I'm already using several other packages from testing/ without any problems e.g. most of the new Gnome 2.22 packages

I tried

$ yaourt -S testing/kbd testing/klibc-kbd testing/mkinitcpio
[completes without problems]
$ yaourt -Sb testing/kernel26
...
__________[ runs for a while ]_________
...
  CC [M]  drivers/net/netconsole.o
  CC [M]  drivers/net/niu.o
  CC [M]  drivers/net/virtio_net.o
  LD      drivers/net/built-in.o
  LD      drivers/built-in.o
  GEN     .version
  CHK     include/linux/compile.h
  UPD     include/linux/compile.h
  CC      init/version.o
  LD      init/built-in.o
  LD      .tmp_vmlinux1
kernel/built-in.o: In function `getnstimeofday':
(.text+0x248cb): undefined reference to `__umoddi3'
kernel/built-in.o: In function `getnstimeofday':
(.text+0x248ee): undefined reference to `__udivdi3'
kernel/built-in.o: In function `do_gettimeofday':
(.text+0x24a10): undefined reference to `__udivdi3'
kernel/built-in.o: In function `do_gettimeofday':
(.text+0x24a2e): undefined reference to `__umoddi3'
kernel/built-in.o: In function `timekeeping_resume':
timekeeping.c:(.text+0x24c46): undefined reference to `__umoddi3'
timekeeping.c:(.text+0x24c66): undefined reference to `__udivdi3'
kernel/built-in.o: In function `update_wall_time':
(.text+0x250aa): undefined reference to `__umoddi3'
kernel/built-in.o: In function `update_wall_time':
(.text+0x250ca): undefined reference to `__udivdi3'
kernel/built-in.o: In function `update_wall_time':
(.text+0x25546): undefined reference to `__umoddi3'
kernel/built-in.o: In function `update_wall_time':
(.text+0x25566): undefined reference to `__udivdi3'
make: *** [.tmp_vmlinux1] Error 1
==> ERROR: Build Failed.
    Aborting...
Error: Makepkg was unable to build kernel26 package.

god is real unless declared integer

Offline

#13 2008-03-25 19:58:38

broch
Banned
From: L.A. California
Registered: 2006-11-13
Posts: 975

Re: gcc 4.3 will not compile kernel

I posted above the resolution to gcc 4.3 problem:

edit kernel Makefile
and append
-fno-tree-scev-cprop
to the KBUILD_CFLAGS

that is all. Kernel will compile with this change

Offline

#14 2008-03-25 22:47:56

krigun
Member
From: Norway
Registered: 2005-06-06
Posts: 122
Website

Re: gcc 4.3 will not compile kernel

broch wrote:

I posted above the resolution to gcc 4.3 problem:

edit kernel Makefile
and append
-fno-tree-scev-cprop
to the KBUILD_CFLAGS

that is all. Kernel will compile with this change

Thank you for posting the fix!!

Offline

#15 2008-04-08 14:54:02

toxic
Member
Registered: 2006-06-05
Posts: 117

Re: gcc 4.3 will not compile kernel

There's yet one annoying problem in this matter. Earlier versions of the kernel doesn't employ KBUILD_CFLAGS at all in it's makefile, and any attempt to modify other similar build variables with the flags -fno-tree-scev-cprop have failed.

It seems to me that either a prior version of gcc 4.3.0 needs to be used, or the kernel updated to either a patchable version or recent enough to have fixed the problem. I'm running 2.6.20.3 by the way, and very happy with it (at least until I was forced to recompile, but couldn't).

Offline

#16 2008-04-08 19:41:41

xaw
Member
From: Chapel Hill
Registered: 2007-08-09
Posts: 177

Re: gcc 4.3 will not compile kernel

If you want to build a slightly bleeding edge kernel (at your discretion of course) 2.6.25-rc* builds just fine with gcc4.3 using vanilla kernel.org sources.

Cheers.


The water never asked for a channel, and the channel never asked for water.

Offline

#17 2008-07-08 22:26:54

björnfan
Member
From: Sweden
Registered: 2008-07-08
Posts: 2
Website

Re: gcc 4.3 will not compile kernel

toxic wrote:

There's yet one annoying problem in this matter. Earlier versions of the kernel doesn't employ KBUILD_CFLAGS at all in it's makefile, and any attempt to modify other similar build variables with the flags -fno-tree-scev-cprop have failed.

It seems to me that either a prior version of gcc 4.3.0 needs to be used, or the kernel updated to either a patchable version or recent enough to have fixed the problem. I'm running 2.6.20.3 by the way, and very happy with it (at least until I was forced to recompile, but couldn't).

Hello. I am/was (it works now) in need of compiling kernel 2.6.18(.0) in order to use OpenVZ (stable).

As you say, older kernels do not employ KBUILD_CFLAGS, but I did find the correct variable to give the parameter to. Row 299, linux-2.6.18/Makefile

CFLAGS_KERNEL    = -fno-tree-scev-cprop

Hope this helps future Google Warriors.

Offline

#18 2009-07-18 21:00:10

vlaad
Member
Registered: 2009-07-18
Posts: 1

Re: gcc 4.3 will not compile kernel

Yet another seeker enlightened :> Praise Odin.

Offline

Board footer

Powered by FluxBB