View previous topic :: View next topic |
Author |
Message |
SpectreDragon Tux's lil' helper
Joined: 22 Aug 2008 Posts: 92 Location: Germany
|
Posted: Mon Apr 19, 2010 10:12 pm Post subject: |
|
|
for many packages I get an compile error pattern like this when I enable -flto
Code: | ...
x86_64-pc-linux-gnu-g++: /var/tmp/portage/sys-libs/db-4.8.26/temp/cc23HvNJ.lto.o: No such file or directory
make: *** [libdb_cxx-4.8.la] Error 1 |
am I doing something wrong
//
oh sry, just noticed that this might be the same as mentioned here |
|
Back to top |
|
|
ni1s n00b
Joined: 07 Nov 2006 Posts: 29
|
Posted: Tue Apr 20, 2010 12:35 pm Post subject: |
|
|
PuckPoltergeist wrote: | Did anyone tried the new -march=atom CPU switch? Last time I've tested this, gcc-bootstrap failed in stage2-stage3 comparison. |
I still get this with sys-devel/gcc-4.5.0_alpha20100408, is march=atom broken or something? |
|
Back to top |
|
|
Uzytkownik Guru
Joined: 31 Oct 2004 Posts: 399 Location: Bay Area, US
|
Posted: Tue Apr 20, 2010 12:50 pm Post subject: |
|
|
Failing builds (I think noone was reported so far).
app-emulation/qemu sparc32plus-linux-user/translate.o to compile needs more 3.5 GiB of memory (system normally takes 500-600 MiB. I have 2 GiB of RAM and 2 GiB of swap. Nearly everything was taken).
dev-util/valgrind cannot be used wit -floop-pararellize as one librarly/executable is built w/out glibc.
net-dialup/pptpclient if -fopenmp is present in LDFLAGS it tries to make target openmp. _________________ I've probably left my head... somwhere. Please wait untill I find it. |
|
Back to top |
|
|
Genewb Apprentice
Joined: 09 Jan 2007 Posts: 165
|
Posted: Wed Apr 21, 2010 4:26 pm Post subject: |
|
|
Has anyone reading this tried building and using linux with lto? this comment on GCC's bug tracker seems to indicate that it at least builds with x86, has anyone had any problems with the resulting kernel? _________________ I don't give a darn about "experience", just functional copyleft software. |
|
Back to top |
|
|
Uzytkownik Guru
Joined: 31 Oct 2004 Posts: 399 Location: Bay Area, US
|
Posted: Wed Apr 21, 2010 4:55 pm Post subject: |
|
|
1. Is there any plan (when gcc 4.5 will be stabilized) to either filter -floop-pararellize or extract libgomp to /lib? Currently if /usr is on separate partition system won't boot.
2. Kernel built with 4.4.3 on gcc 4.5.0 blanks screen when fbcon is loaded (on intel). The same configuration worked fine with plain 4.4.3.
3. System started complying about:
- / mounted in ro on start (previously worked)
- /sys is not mounted. sysfs service starts w/out problems but when I enter console after it shows that it wasn't mounted. mount -t sysfs none /sys entered then works fine. _________________ I've probably left my head... somwhere. Please wait untill I find it. |
|
Back to top |
|
|
Neo2 Apprentice
Joined: 25 Sep 2006 Posts: 224 Location: Italy
|
Posted: Wed Apr 21, 2010 8:21 pm Post subject: |
|
|
Updates: many packages breaking during compile phase, I got to the end of emerge -e1 @world but.. some packages still complain (kdelibs being my top priority).
I'll repost: full unstable on gcc-4.5.1_pre9999 + -flto + graphite.
Now, once I got to the end of the first world merge, I had 236 non-compiling packages. Did a selective emerge -1 <package> with -fPIC added, repeated this step until I had a "minimum" of packages that did not compile. So far 23 packages don't compile, but that's the lesser problem. The upgrade to GCC 4.5 apparently changes the symbol naming scheme (I think that's the usual procedure, I remember similar breakages migrating from 4.3 to 4.4). So what follows is... guess what? Some packages don't compile because some dependencies have not been compiled properly, and thus, when linking those packages, it fails. I go and recompile the packages -> but they don't compile without -fPIC. I recompile the package dependencies also: now that dependency links fine but.. what about the others? XD
Apparently this behaviour is triggered by the fact that LTO saves GIMPLE bytecode in supplemental ELF headers, saving -fPIC, -fcommon and -m to be sure not to make mistakes when doing interprocedural analysis. That leads to temp.lto errors without -fPIC and to (kind of) messed up libs with -fPIC.
I simply sticked -fPIC in make.conf and I'm now reemerging everything..
Will keep you updated.. in the meantime I suggest not to try LTO if you're not willing to face the consequencies =)
@Genewb: I'm running the git kernel compiled with -flto and I'm on x86_64. No crashes whatsoever. I didn't notice any huge performance gains nor size reduction (meaning almost 1:1 without -flto). I guess some latencies might have dropped but so little in percentage that is unnoticeable. I'm also not very keen on doing benchmarks right now
@Uzytkownik: 2&3 seem like problems with userspace. Try to rebuild udev, hopefully that should "just work"
[EDIT]
Ok, I'll be better off LTO until proper support. I had just began emerge -e1 @world with -flto + -fPIC but I hit a showstopper.
What happens:
dev-libs/gmp is one of the first packages being merged and it needs -fPIC to be properly built. Now, I put -fPIC in the make.conf, but I keep getting the "temp.lto" error. Which is a weird thing, because I DID compile it fine with -flto + -fPIC previously. But now, at the beginning of the merge, it just doesn't work. I'm pretty sure that it'll work at the end of the merge, but that means that every package previously failing with that error, WILL fail again with that error, even if -fPIC is passed (I just hit other two of these packages in the meantime). That does mean I will never have proper symbol resolution in the binaries --> broken system.
At this point, I'm also unsure on what causes this, because gcc should be able to properly handle -fPIC and non-fPIC objects without any problems according to the manual. Before beginning the rebuild though, I reemerged the toolchain (gcc -> binutils -> glibc) and I think that is a possible trigger. It seems as if re-emerging gcc before those packages and before some other particular package prevents LTO from working properly.
[/EDIT] _________________ Neo2
Unofficial minimal liveCD for x86/amd64 w/reiser4+truecrypt |
|
Back to top |
|
|
Uzytkownik Guru
Joined: 31 Oct 2004 Posts: 399 Location: Bay Area, US
|
Posted: Wed Apr 21, 2010 11:12 pm Post subject: |
|
|
Neo2 wrote: |
@Uzytkownik: 2&3 seem like problems with userspace. Try to rebuild udev, hopefully that should "just work"
|
Hopefully false alarm. I build everything with -ggdb3 not knowing it is unsafe flag. I get know it after 'cleaning' CFLAGS and reinstall using gcc-4.4.3. Now comes third reinstall this week (second with gcc 4.5). _________________ I've probably left my head... somwhere. Please wait untill I find it. |
|
Back to top |
|
|
cruzki123 Apprentice
Joined: 16 May 2008 Posts: 262
|
Posted: Thu Apr 22, 2010 9:15 am Post subject: |
|
|
Genewb wrote: | Has anyone reading this tried building and using linux with lto? this comment on GCC's bug tracker seems to indicate that it at least builds with x86, has anyone had any problems with the resulting kernel? |
I have problem compiling the kernel without --lto so... (crash I some point araund udev mounting or similar, I'm not sure)
Seems a problem with kernel-2.6.33 because a 2.6.32 works properly. |
|
Back to top |
|
|
Uzytkownik Guru
Joined: 31 Oct 2004 Posts: 399 Location: Bay Area, US
|
Posted: Thu Apr 22, 2010 10:45 am Post subject: |
|
|
xf86-video-intel (build with 4.5 and 4.4) says it cannot find modesetting. Any idea what might cased this problem (which packages should I rebuild)?
Edit: I failed to mention - fbcon module works fine. dmesg looks normal. There are files in /dev/drm/
Edit 2: xf86-video-intel from git seems to work _________________ I've probably left my head... somwhere. Please wait untill I find it. |
|
Back to top |
|
|
kernelOfTruth Watchman
Joined: 20 Dec 2005 Posts: 6111 Location: Vienna, Austria; Germany; hello world :)
|
Posted: Thu Apr 22, 2010 8:13 pm Post subject: |
|
|
Holy shit - OMG I'm flying SOO FAAASST !
Quote: | time rm -rf linux-2.6.34-rc5/
real 0m0.873s
user 0m0.022s
sys 0m0.555s |
Quote: | time rm -rf linux-2.6.34-rc3-zen1_nofb_hardened/
real 0m0.580s
user 0m0.031s
sys 0m0.545s |
Quote: | du -hs linux-2.6.34-rc5/
1.5G linux-2.6.34-rc5/ |
I don't know if that speedup came with the transition from 2.6.34-rc3 to 2.6.34-rc5 or from compiling the kernel with gcc 4.5 and custom flags
anyways: it's blazing fast (at least with deleting files )
now let's see how well it does in other workloads _________________ https://github.com/kernelOfTruth/ZFS-for-SystemRescueCD/tree/ZFS-for-SysRescCD-4.9.0
https://github.com/kernelOfTruth/pulseaudio-equalizer-ladspa
Hardcore Gentoo Linux user since 2004 |
|
Back to top |
|
|
Etal Veteran
Joined: 15 Jul 2005 Posts: 1931
|
Posted: Thu Apr 22, 2010 9:17 pm Post subject: |
|
|
That doesn't make any sense...
Maybe some major improvement to the FS you use?
Here's mine on gcc 4.4 with linux 2.6.34-rc5 and ext4:
Code: | # time rm -rf linux-2.6.34-rc4/
real 0m6.459s
user 0m0.074s
sys 0m2.154s |
|
|
Back to top |
|
|
Ormaaj Guru
Joined: 28 Jan 2008 Posts: 319
|
Posted: Fri Apr 23, 2010 12:09 am Post subject: |
|
|
kernelOfTruth wrote: | 2nd note / annoyance:
why are packages depending on the previous version of libstdc++.so.6 when building it with the new gcc version ? what to do about it ?
e.g.
Quote: | Generating ../Docs/cmake-gui.txt
Generating ../Docs/cmake.txt
Generating ../Docs/ctest.txt
Generating ../Docs/ccmake.txt
../bin/ctest: /usr/lib/gcc/x86_64-pc-linux-gnu/4.4.3/libstdc++.so.6: version `GLIBCXX_3.4.14' not found (required by ../bin/ctest)
../bin/ccmake: /usr/lib/gcc/x86_64-pc-linux-gnu/4.4.3/libstdc++.so.6: version `GLIBCXX_3.4.14' not found (required by ../bin/ccmake)
../bin/cmake-gui: /usr/lib/gcc/x86_64-pc-linux-gnu/4.4.3/libstdc++.so.6: version `GLIBCXX_3.4.14' not found (required by ../bin/cmake-gui)
make[2]: *** [Docs/ctest.txt] Error 1
make[2]: *** Waiting for unfinished jobs....
make[2]: *** [Docs/ccmake.txt] Error 1
../bin/cpack: /usr/lib/gcc/x86_64-pc-linux-gnu/4.4.3/libstdc++.so.6: version `GLIBCXX_3.4.14' not found (required by ../bin/cpack)
make[2]: *** [Docs/cmake-gui.txt] Error 1
make[2]: *** [Docs/cpack.txt] Error 1
../bin/cmake: /usr/lib/gcc/x86_64-pc-linux-gnu/4.4.3/libstdc++.so.6: version `GLIBCXX_3.4.14' not found (required by ../bin/cmake)
make[2]: *** [Docs/cmake.txt] Error 1
make[1]: *** [Utilities/CMakeFiles/documentation.dir/all] Error 2
make: *** [all] Error 2
* ERROR: dev-util/cmake-2.8.1-r1 failed:
|
| I'm running in to this when switching back to the old compiler. The usual revdep-rebuild, fix_libtool_files etc isn't doing the trick this time around. |
|
Back to top |
|
|
kernelOfTruth Watchman
Joined: 20 Dec 2005 Posts: 6111 Location: Vienna, Austria; Germany; hello world :)
|
Posted: Fri Apr 23, 2010 12:17 am Post subject: |
|
|
Ormaaj wrote: | kernelOfTruth wrote: | 2nd note / annoyance:
why are packages depending on the previous version of libstdc++.so.6 when building it with the new gcc version ? what to do about it ?
e.g.
Quote: | Generating ../Docs/cmake-gui.txt
Generating ../Docs/cmake.txt
Generating ../Docs/ctest.txt
Generating ../Docs/ccmake.txt
../bin/ctest: /usr/lib/gcc/x86_64-pc-linux-gnu/4.4.3/libstdc++.so.6: version `GLIBCXX_3.4.14' not found (required by ../bin/ctest)
../bin/ccmake: /usr/lib/gcc/x86_64-pc-linux-gnu/4.4.3/libstdc++.so.6: version `GLIBCXX_3.4.14' not found (required by ../bin/ccmake)
../bin/cmake-gui: /usr/lib/gcc/x86_64-pc-linux-gnu/4.4.3/libstdc++.so.6: version `GLIBCXX_3.4.14' not found (required by ../bin/cmake-gui)
make[2]: *** [Docs/ctest.txt] Error 1
make[2]: *** Waiting for unfinished jobs....
make[2]: *** [Docs/ccmake.txt] Error 1
../bin/cpack: /usr/lib/gcc/x86_64-pc-linux-gnu/4.4.3/libstdc++.so.6: version `GLIBCXX_3.4.14' not found (required by ../bin/cpack)
make[2]: *** [Docs/cmake-gui.txt] Error 1
make[2]: *** [Docs/cpack.txt] Error 1
../bin/cmake: /usr/lib/gcc/x86_64-pc-linux-gnu/4.4.3/libstdc++.so.6: version `GLIBCXX_3.4.14' not found (required by ../bin/cmake)
make[2]: *** [Docs/cmake.txt] Error 1
make[1]: *** [Utilities/CMakeFiles/documentation.dir/all] Error 2
make: *** [all] Error 2
* ERROR: dev-util/cmake-2.8.1-r1 failed:
|
| I'm running in to this when switching back to the old compiler. The usual revdep-rebuild, fix_libtool_files etc isn't doing the trick this time around. |
add this to your bashrc:
Code: | export LD_LIBRARY_PATH=/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/ |
seems like something's not set up correctly
with this cmake didn't fail anymore in my emerge -e world _________________ https://github.com/kernelOfTruth/ZFS-for-SystemRescueCD/tree/ZFS-for-SysRescCD-4.9.0
https://github.com/kernelOfTruth/pulseaudio-equalizer-ladspa
Hardcore Gentoo Linux user since 2004 |
|
Back to top |
|
|
Uzytkownik Guru
Joined: 31 Oct 2004 Posts: 399 Location: Bay Area, US
|
Posted: Fri Apr 23, 2010 10:38 am Post subject: |
|
|
I get 500-1000 FPS instead of previous 200 in pure X for glxgears (yes - I know it is not a benchmark ). However it might be because of intel from git. Also - I haven't tried it in real environment.
As a side note (I don't think any of it was reported):
sys-libs/zlib Newer version (>=1.2.4) crashes paludis while reading metadata. 4.4.3 compiles it fine.
sys-boot/grub (2) If compiled with 4.5.0 it complains about invalid pointer while booting. 4.4.3 compiles it fine.
media-gfx/sam2p Complains it cannot compute deps. Some problems with autotools I guess judging from logs. (Again 4.4.3 works fine).
sys-fs/lvm2 Segfault - at least static version in initrd. 4.4.3 compiles it fine. _________________ I've probably left my head... somwhere. Please wait untill I find it. |
|
Back to top |
|
|
PuckPoltergeist Apprentice
Joined: 28 Jul 2004 Posts: 189
|
Posted: Sat Apr 24, 2010 1:36 pm Post subject: |
|
|
ni1s wrote: | PuckPoltergeist wrote: | Did anyone tried the new -march=atom CPU switch? Last time I've tested this, gcc-bootstrap failed in stage2-stage3 comparison. |
I still get this with sys-devel/gcc-4.5.0_alpha20100408, is march=atom broken or something? |
Either this or the ebuild uses wrong CFLAGS. I suspect the first one. Furthermore it only fails if I bootstrap with gcc-4.5. If stage1 was build with gcc-4.4, it works fine, even with -march=atom. _________________ printk(KERN_CRIT "Whee.. Swapped out page in kernel page table\n");
linux-2.6.6/mm/vmalloc.c |
|
Back to top |
|
|
ComaWhite Tux's lil' helper
Joined: 07 Oct 2008 Posts: 125
|
Posted: Sat Apr 24, 2010 6:41 pm Post subject: |
|
|
Blah 4.5.0 is starting to turn out like 4.3.0 lol. But then again GCC is getting more strict from what I've read. |
|
Back to top |
|
|
spielc Guru
Joined: 20 Apr 2004 Posts: 452
|
Posted: Wed Apr 28, 2010 9:02 pm Post subject: |
|
|
If i summarize this thread correctly:
kernelOfTruth was able to finish a emerge -e world successfully and he's running his gcc-4.5.0-system on a dayly basis.
Uzytkownik on the other hand was able to complete his emerge -e world but is having quite alot of trouble with essential things like grub, lvm2 or zlib.
So what's the general consensus? Is gcc-4.5.0 worth the trouble or should I wait a while? _________________ Raise your beers up high... |
|
Back to top |
|
|
Uzytkownik Guru
Joined: 31 Oct 2004 Posts: 399 Location: Bay Area, US
|
Posted: Wed Apr 28, 2010 9:11 pm Post subject: |
|
|
spielc wrote: | If i summarize this thread correctly:
kernelOfTruth was able to finish a emerge -e world successfully and he's running his gcc-4.5.0-system on a dayly basis.
Uzytkownik on the other hand was able to complete his emerge -e world but is having quite alot of trouble with essential things like grub, lvm2 or zlib.
So what's the general consensus? Is gcc-4.5.0 worth the trouble or should I wait a while? |
Actually (sorry I haven't mentioned):
- zlib was possibly something else (see fixed bug on bugzilla)
- lvm2 was probably miscompiled kernel (still - miscompilled by gcc 4.5)
- There are more packages which caused trouble. Some of them are fixed (see gentoo bugzilla)
Besides that I had no much problems. I am running nearly pure gcc-4.5 system. _________________ I've probably left my head... somwhere. Please wait untill I find it. |
|
Back to top |
|
|
tranquilcool Veteran
Joined: 25 Mar 2005 Posts: 1179
|
Posted: Thu Apr 29, 2010 6:00 am Post subject: |
|
|
my problem with gcc-4.5.0 is zlib
zlib compiled with gcc-4.5.0 breaks firefox and thunderbird. _________________ this is a strange strange world. |
|
Back to top |
|
|
spielc Guru
Joined: 20 Apr 2004 Posts: 452
|
Posted: Thu Apr 29, 2010 7:53 am Post subject: |
|
|
tranquilcool wrote: | my problem with gcc-4.5.0 is zlib
zlib compiled with gcc-4.5.0 breaks firefox and thunderbird. |
Uhhhh that's a def. showstopper for me... May i ask what CFLAGS you are using? _________________ Raise your beers up high... |
|
Back to top |
|
|
tranquilcool Veteran
Joined: 25 Mar 2005 Posts: 1179
|
Posted: Thu Apr 29, 2010 7:56 am Post subject: |
|
|
spielc wrote: | tranquilcool wrote: | my problem with gcc-4.5.0 is zlib
zlib compiled with gcc-4.5.0 breaks firefox and thunderbird. |
Uhhhh that's a def. showstopper for me... May i ask what CFLAGS you are using? |
CFLAGS="-O2 -march=native -ftree-vectorize -fomit-frame-pointer -floop-interchange -floop-strip-mine -floop-block -pipe"
LDFLAGS="-Wl,-O1 -s -Wl,--hash-style=gnu -Wl,--as-needed -Wl,--sort-common -Wl,--warn-once" _________________ this is a strange strange world. |
|
Back to top |
|
|
spielc Guru
Joined: 20 Apr 2004 Posts: 452
|
Posted: Thu Apr 29, 2010 8:08 am Post subject: |
|
|
tranquilcool wrote: | spielc wrote: | tranquilcool wrote: | my problem with gcc-4.5.0 is zlib
zlib compiled with gcc-4.5.0 breaks firefox and thunderbird. |
Uhhhh that's a def. showstopper for me... May i ask what CFLAGS you are using? |
CFLAGS="-O2 -march=native -ftree-vectorize -fomit-frame-pointer -floop-interchange -floop-strip-mine -floop-block -pipe"
LDFLAGS="-Wl,-O1 -s -Wl,--hash-style=gnu -Wl,--as-needed -Wl,--sort-common -Wl,--warn-once" |
according to http://gcc.gnu.org/bugzilla/show_bug.cgi?id=42513 there's a problem with -ftree-vectorize... Maybe this fix also applies to firefox and thunderbird in combination with gcc-4.5 and zlib?!? _________________ Raise your beers up high... |
|
Back to top |
|
|
tranquilcool Veteran
Joined: 25 Mar 2005 Posts: 1179
|
Posted: Thu Apr 29, 2010 10:50 am Post subject: |
|
|
spielc wrote: | tranquilcool wrote: | spielc wrote: | tranquilcool wrote: | my problem with gcc-4.5.0 is zlib
zlib compiled with gcc-4.5.0 breaks firefox and thunderbird. |
Uhhhh that's a def. showstopper for me... May i ask what CFLAGS you are using? |
CFLAGS="-O2 -march=native -ftree-vectorize -fomit-frame-pointer -floop-interchange -floop-strip-mine -floop-block -pipe"
LDFLAGS="-Wl,-O1 -s -Wl,--hash-style=gnu -Wl,--as-needed -Wl,--sort-common -Wl,--warn-once" |
according to http://gcc.gnu.org/bugzilla/show_bug.cgi?id=42513 there's a problem with -ftree-vectorize... Maybe this fix also applies to firefox and thunderbird in combination with gcc-4.5 and zlib?!? |
i added -mstackrealign cflag to make.conf as the link suggested and now both firefox and thunderbird work.
thanks. now let's go all gcc-4.5.0. _________________ this is a strange strange world. |
|
Back to top |
|
|
Colt45 Tux's lil' helper
Joined: 05 Sep 2007 Posts: 122 Location: Central Washington
|
Posted: Fri Apr 30, 2010 2:31 am Post subject: |
|
|
perl-5.10.1 fails with
Code: |
{standard input}: Assembler messages:
{standard input}:5542: Error: no such instruction: `movbe 260(%esp),%eax'
{standard input}:6535: Error: no such instruction: `movbe 280(%esp),%eax' |
This is on a Atom N280 with -march=native. Fixed with -mno-movbe in CFLAGS.
binutils is failing the same way. For some reason it feels the need to strip my -mno-movbe out of CFLAGS. Any ideas how to force it to take that CFLAG? |
|
Back to top |
|
|
PuckPoltergeist Apprentice
Joined: 28 Jul 2004 Posts: 189
|
Posted: Fri Apr 30, 2010 8:30 am Post subject: |
|
|
Colt45 wrote: | perl-5.10.1 fails with
Code: |
{standard input}: Assembler messages:
{standard input}:5542: Error: no such instruction: `movbe 260(%esp),%eax'
{standard input}:6535: Error: no such instruction: `movbe 280(%esp),%eax' |
This is on a Atom N280 with -march=native. Fixed with -mno-movbe in CFLAGS.
binutils is failing the same way. For some reason it feels the need to strip my -mno-movbe out of CFLAGS. Any ideas how to force it to take that CFLAG? |
That's a little strange. What version of binutils do you use? From the changelog, you need at least 2.18.50.0.7 to support movbe instruction. _________________ printk(KERN_CRIT "Whee.. Swapped out page in kernel page table\n");
linux-2.6.6/mm/vmalloc.c |
|
Back to top |
|
|
|