Summary: | sys-devel/gcc-4.2.3 include paths not properly searched when using C_INCLUDE_PATH | ||
---|---|---|---|
Product: | Gentoo Linux | Reporter: | Jeremy Huddleston Sequoia <jeremyhu> |
Component: | [OLD] Core system | Assignee: | Gentoo Toolchain Maintainers <toolchain> |
Status: | RESOLVED INVALID | ||
Severity: | normal | CC: | ole+gentoo |
Priority: | High | ||
Version: | unspecified | ||
Hardware: | All | ||
OS: | Linux | ||
Whiteboard: | |||
Package list: | Runtime testing required: | --- |
Description
Jeremy Huddleston Sequoia
2008-11-02 20:56:37 UTC
Reduced example: ~/GR-245319 $ find . . ./dir1 ./dir1/config.h ./dir2 ./dir2/config.h ./dir3 ./dir3/test.c ~/GR-245319 $ cat dir3/test.c #include "config.h" int blah() { return 1; } ~/GR-245319 $ cd dir2/ ~/GR-245319/dir2 $ gcc -I. -I../dir1 -I. -E ../dir3/test.c # 1 "../dir3/test.c" # 1 "<built-in>" # 1 "<command line>" # 1 "../dir3/test.c" # 1 "../dir1/config.h" 1 # 2 "../dir3/test.c" 2 int blah() { return 1; } NetBSD's 3.3.3 and Gentoo's 3.4.6-r2 work as expected: ~/src/GR-245319/dir2 $ gcc -I. -I../dir1 -I. -E ../dir3/test.c # 1 "../dir3/test.c" # 1 "<built-in>" # 1 "<command line>" # 1 "../dir3/test.c" # 1 "config.h" 1 # 2 "../dir3/test.c" 2 int blah() { return 1; } ~/src/GR-245319/dir2 $ gcc --version gcc (GCC) 3.3.3 (NetBSD nb3 20040520) Copyright (C) 2003 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. -------- And also gcc-3.4.6: ~/GR-245319/dir2 $ gcc -I. -I../dir1 -I. -E ../dir3/test.c # 1 "../dir3/test.c" # 1 "<built-in>" # 1 "<command line>" # 1 "../dir3/test.c" # 1 "./config.h" 1 # 2 "../dir3/test.c" 2 int blah() { return 1; } ~/GR-245319/dir2 $ gcc --version gcc (GCC) 3.4.6 (Gentoo Hardened 3.4.6-r2 p1.5, ssp-3.4.6-1.0, pie-8.7.10) Copyright (C) 2006 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. --- gcc-4.1.2 shows this bug as well. Ok, this is weird... 3.4.6-r2 doesn't work on the system with the emerge --info from above. The "working" 3.4.6-r2 above was from a stable hardened i386 system: Portage 2.2_rc12 (hardened/x86/2.6, gcc-3.4.6-hardenednossp, glibc-2.6.1-r0, 2.6.25-hardened-r9 i686) ================================================================= System uname: Linux-2.6.25-hardened-r9-i686-Intel-R-_Pentium-R-_4_CPU_2.80GHz-with-glibc2.1.3 Timestamp of tree: Sun, 02 Nov 2008 10:15:01 +0000 app-shells/bash: 3.2_p33 dev-java/java-config: 1.3.7, 2.1.6 dev-lang/python: 2.5.2-r7 sys-apps/baselayout: 1.12.11.1 sys-apps/sandbox: 1.2.18.1-r2 sys-devel/autoconf: 2.13, 2.61-r2 sys-devel/automake: 1.5, 1.7.9-r1, 1.8.5-r3, 1.9.6-r2, 1.10.1-r1 sys-devel/binutils: 2.18-r3 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=pentium4 -fomit-frame-pointer -O2 -pipe" 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/ca-certificates.conf /etc/env.d /etc/env.d/java/ /etc/fonts/fonts.conf /etc/gconf /etc/php/apache2-php5/ext-active/ /etc/php/cgi-php5/ext-active/ /etc/php/cli-php5/ext-active/ /etc/revdep-rebuild /etc/terminfo /etc/texmf/web2c /etc/udev/rules.d" CXXFLAGS="-march=pentium4 -fomit-frame-pointer -O2 -pipe" DISTDIR="/var/tmp/distfiles" FEATURES="ccache distlocks loadpolicy nostrip parallel-fetch preserve-libs protect-owned sandbox sfperms strict unmerge-orphans userfetch userpriv usersandbox" GENTOO_MIRRORS="http://distfiles.gentoo.org http://distro.ibiblio.org/pub/linux/distributions/gentoo" LC_ALL="en_US.utf8" LDFLAGS="" LINGUAS="en es ja" 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" PORTDIR="/var/portage" PORTDIR_OVERLAY="/usr/local/portage" SYNC="rsync://rsync7.us.gentoo.org/gentoo-portage" USE="X Xaw3d a52 aac aalib alsa amrnb ao apache2 asf audiofile avahi bash-completion berkdb bidi bitmap-fonts bl browserplugin bzip2 cdda cddb cdparanoia cjk clamav cpudetection cracklib crypt cups curl dba dbus deprecated dga dri dts dv dvd eds elf emacs enca encode enscript erandom esd exif expat fam fame fat ffmpeg firefox flac flash font-server fontconfig fortran fpx ftp gd gd-external gdbm gif glibc-omitfp glut glx gmp gnome gnutls gpm graphviz gs gstreamer gtk gtk2 gtkhtml guild guile gzip hal hardened hardenedphp hdri i8x0 iconv icq idn imap imlib imlib2 iproute2 ipsec ipv6 jack java jbig jp2 jpeg jpeg2k kcal kde lame lcms libcaca libclamav libgda libvisual linuxthreads-tls live lm_sensors logitech-mouse logrotate lzo mad maildir md5sum mdnsresponder-compat mhash midi ming mixer mjpeg mmx mmxext mng mod_python modperl mouse mp2 mp3 mp4 mpeg mpeg2 mplayer multislot musepack musicbrainz mysql mysqli ncurses network networking new-login nfs nls nptl nsplugin oav objc ocaml ogg oggvorbis openal opendoc openexr opengl oss pam pam_chroot pcre perl php pic png pnm portaudio postfix povray ppds pvr python pyzor q32 qca qt qt3 qt3support qt4 quicktime quotas radio rar razor readline real realmedia regex rtc samba sasl sdk sdl sensord sndfile sockets sox spamassassin speex spell sql sqlite sqlite3 srt sse sse2 ssl startup-notification subtitles subversion suexec suhosin svg sysfs syslog tcpd teletext tga theora tiff timidity tivo transcode truetype type1 udev unicode urandom usb utf8 vcd vcdimager vfat vidix vim vim-pager vim-with-x virus-scan visualization vorbis win32codecs wma wmf wxwindows x264 x86 xanim xchat xemacs xfs xft xine xinetd xml xml2 xmlreader xorg xpm xprint xrandr xscreensaver xv xvid xvmc yahoo zip zlib zoran" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1 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 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 auth_digest authn_dbd dbd ident imagemap" ELIBC="glibc" INPUT_DEVICES="keyboard mouse" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="en es ja" USERLAND="GNU" VIDEO_CARDS="intel" Unset: CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, FFLAGS, INSTALL_MASK, LANG, MAKEOPTS, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS Additionally, this only seems to happen when C_INCLUDE_PATH is set. If I 'unset C_INCLUDE_PATH' first, this is not a problem. afaik, this is correct behavior |