Summary: | [4.2/bad code] dev-util/codeblocks miscompiled w/ -O2 | ||
---|---|---|---|
Product: | Gentoo Linux | Reporter: | Greg Watson (linuxkrn) <bugs> |
Component: | [OLD] Core system | Assignee: | Gentoo Toolchain Maintainers <toolchain> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | jurek |
Priority: | High | ||
Version: | unspecified | ||
Hardware: | AMD64 | ||
OS: | Linux | ||
URL: | http://forums.codeblocks.org/index.php/topic,6783.0/wap2.html | ||
Whiteboard: | |||
Package list: | Runtime testing required: | --- | |
Bug Depends on: | |||
Bug Blocks: | 162167 |
Description
Greg Watson (linuxkrn)
2007-10-17 02:46:14 UTC
(In reply to comment #0) > Codeblocks-1.0_pre20070618 and gcc 4.2.x don't play well together. When you > try to build any code inside the IDE an error: > > -------------- Build: Debug in test --------------- > WARNING: Can't read file's timestamp: test/main.c > Linking console executable: bin/Debug/test > g++: obj/Debug/main.o: No such file or directory > g++: no input files > Process terminated with status 1 (0 minutes, 0 seconds) > 0 errors, 0 warnings > > This is somewhat misleading since the real problem is with codeblocks and gcc > 4.2.x. Reading the link included in the bug also provides a solution that > worked for me. Used the custom cflags (/etc/portage/env/dev-util/codeblocks) > and -fno-strict-aliasing, recompiled and everything works as expected. > > Note, I'm unsure if this bug effects x86, as I'm running on amd64. Maybe > someone can test and report back. > > To reproduce, click new project, do a simple hello world console app, and try > to build. > > Just in case, here is my emerge --info > Portage 2.1.3.12 (default-linux/amd64/2007.0, gcc-4.2.2, glibc-2.6.1-r0, > 2.6.22-gentoo-r1 x86_64) > ================================================================= > System uname: 2.6.22-gentoo-r1 x86_64 Intel(R) Core(TM)2 Quad CPU @ 2.40GHz > Timestamp of tree: Fri, 12 Oct 2007 02:00:11 +0000 > ccache version 2.4 [enabled] > app-shells/bash: 3.2_p17-r1 > dev-java/java-config: 1.3.7, 2.1.1 > dev-lang/python: 2.4.4-r5, 2.5.1-r2 > dev-python/pycrypto: 2.0.1-r6 > dev-util/ccache: 2.4-r7 > sys-apps/baselayout: 1.12.10-r5 > sys-apps/sandbox: 1.2.18.1 > sys-devel/autoconf: 2.13, 2.61-r1 > sys-devel/automake: 1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6-r2, 1.10 > sys-devel/binutils: 2.18-r1 > sys-devel/gcc-config: 1.4.0-r4 > sys-devel/libtool: 1.5.24 > virtual/os-headers: 2.6.22-r2 > ACCEPT_KEYWORDS="amd64 ~amd64" > CBUILD="x86_64-pc-linux-gnu" > CFLAGS="-O2 -march=nocona -pipe" > CHOST="x86_64-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/revdep-rebuild > /etc/terminfo /etc/udev/rules.d /usr/share/X11/xkb/" > CXXFLAGS="-O2 -march=nocona -pipe" > DISTDIR="/usr/portage/distfiles" > FEATURES="ccache distlocks metadata-transfer parallel-fetch sandbox sfperms > strict unmerge-orphans userfetch" > GENTOO_MIRRORS="http://distfiles.gentoo.org > http://distro.ibiblio.org/pub/linux/distributions/gentoo" > LANG="C" > LC_ALL="en_US" > LINGUAS="en_US en" > MAKEOPTS="-j5" > PKGDIR="/usr/portage/packages" > PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress > --force --whole-file --delete --delete-after --stats --timeout=180 > --exclude=/distfiles --exclude=/local --exclude=/packages > --filter=H_**/files/digest-*" > PORTAGE_TMPDIR="/var/tmp" > PORTDIR="/usr/portage" > PORTDIR_OVERLAY="/usr/portage/local/layman/sunrise /etc/portage/overlay" > SYNC="rsync://rsync.gentoo.org/gentoo-portage" > USE="X a52 aac acl alsa amd64 amr amrnb amrwb bash-completion berkdb > bitmap-fonts cdr cli cracklib crypt cscope cups dbus dri dts dv dvd dvdnav dvdr > encode esd firefox flac fortran gdbm gif gimp gnome gpm gtk hal iconv isdnlog > jpeg mad midi mikmod mmx mp2 mp3 mpeg mudflap ncurses nls nptl nptlonly nvidia > ogg openal openexr opengl openmp pam pcre pdf perl png pppd python readline > reflection rtc sdl session smp speex spell spl sse sse2 ssl ssse3 svg tcpd > theora tiff timidity truetype truetype-fonts type1-fonts unicode vorbis wmf > x264 xorg xv xvid 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 mulaw multi null plug rate route > share shm softvol" ELIBC="glibc" INPUT_DEVICES="evdev mouse keyboard" > KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 > mtxorb ncurses text" LINGUAS="en_US en" USERLAND="GNU" VIDEO_CARDS="nvidia" > Unset: CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LDFLAGS, PORTAGE_COMPRESS, > PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS > Yes, I can confirm this bug. I'm using Codeblocks-1.0_pre20070618 and gcc 4.2.2
>
> Yes, I can confirm this bug.
> I'm using Codeblocks-1.0_pre20070618 and gcc 4.2.2
>
I'm using gentoo ~amd64
#uname -a
Linux SEXY2007 2.6.23-gentoo-r1 #2 SMP Sat Nov 3 16:23:29 CST 2007 x86_64 Genuine Intel(R) CPU 2140 @ 1.60GHz GenuineIntel GNU/Linux
Does this happen when you use the latest codeblocks version? Tested with dev-util/codeblocks-1.0_pre20071215 and sys-devel/gcc-4.2.2, works on ~amd64 and ~x86 now. Glad to hear that, thanks for testing. Closing bug (In reply to comment #5) > Glad to hear that, thanks for testing. Closing bug > There is still clearly a toolchain bug that we haven't investigated here. older gcc-4.2 versions had known bugs ... if latest gcc-4.2 fixes things, that's Good Enough For Me |