Trying to build mysql-gui-tools on ~x86 with an installed mysql-5.0.34 and I keep running into problems that appear to be either missing or conflicting header files. The make dies in mysql-gui-common because myx_library.c tries to include "asm/atomic.h" and that doesn't seem to be part of the standard path on my system -- it's in /usr/src/linux/include/asm/ but not /usr/include/asm. [...] i686-pc-linux-gnu-gcc -DHAVE_CONFIG_H -I. -I. -I../../.. -I../include -I../../../library/utilities/shared_include -I../../../library/utilities/include -I../../../library/sql-parser/include -I/usr/include/mysql -DHAVE_ERRNO_AS_DEFINE=1 -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I/usr/include/libxml2 -O2 -march=pentium4m -fomit-frame-pointer -pipe -fexceptions -Wall -Wsign-compare -Wall -Wsign-compare -MT myx_library.lo -MD -MP -MF .deps/myx_library.Tpo -c myx_library.c -fPIC -DPIC -o .libs/myx_library.o In file included from /usr/include/mysql/my_global.h:83, from myx_library.c:35: /usr/include/mysql/my_config.h:979:1: warning: "PACKAGE" redefined In file included from myx_library.c:28: ../../../config.h:68:1: warning: this is the location of the previous definition In file included from /usr/include/mysql/my_global.h:83, from myx_library.c:35: /usr/include/mysql/my_config.h:985:1: warning: "PACKAGE_NAME" redefined In file included from myx_library.c:28: ../../../config.h:74:1: warning: this is the location of the previous definition In file included from /usr/include/mysql/my_global.h:83, from myx_library.c:35: /usr/include/mysql/my_config.h:988:1: warning: "PACKAGE_STRING" redefined In file included from myx_library.c:28: ../../../config.h:77:1: warning: this is the location of the previous definition In file included from /usr/include/mysql/my_global.h:83, from myx_library.c:35: /usr/include/mysql/my_config.h:991:1: warning: "PACKAGE_TARNAME" redefined In file included from myx_library.c:28: ../../../config.h:80:1: warning: this is the location of the previous definition In file included from /usr/include/mysql/my_global.h:83, from myx_library.c:35: /usr/include/mysql/my_config.h:994:1: warning: "PACKAGE_VERSION" redefined In file included from myx_library.c:28: ../../../config.h:83:1: warning: this is the location of the previous definition In file included from /usr/include/mysql/my_global.h:83, from myx_library.c:35: /usr/include/mysql/my_config.h:1110:1: warning: "VERSION" redefined In file included from myx_library.c:28: ../../../config.h:89:1: warning: this is the location of the previous definition In file included from myx_library.c:35: /usr/include/mysql/my_global.h:353:24: error: asm/atomic.h: No such file or directory make[4]: *** [myx_library.lo] Error 1 make[4]: Leaving directory `/var/tmp/portage/dev-db/mysql-gui-tools-5.0_p11/work/mysql-gui-tools-5.0r11/mysql-gui-common/library/base-library/source' make[3]: *** [all-recursive] Error 1 make[3]: Leaving directory `/var/tmp/portage/dev-db/mysql-gui-tools-5.0_p11/work/mysql-gui-tools-5.0r11/mysql-gui-common/library/base-library' make[2]: *** [all-recursive] Error 1 make[2]: Leaving directory `/var/tmp/portage/dev-db/mysql-gui-tools-5.0_p11/work/mysql-gui-tools-5.0r11/mysql-gui-common/library' make[1]: *** [all-recursive] Error 1 make[1]: Leaving directory `/var/tmp/portage/dev-db/mysql-gui-tools-5.0_p11/work/mysql-gui-tools-5.0r11/mysql-gui-common' make: *** [all] Error 2 !!! ERROR: dev-db/mysql-gui-tools-5.0_p11 failed. Call stack: ebuild.sh, line 1614: Called dyn_compile ebuild.sh, line 971: Called qa_call 'src_compile' ebuild.sh, line 44: Called src_compile mysql-gui-tools-5.0_p11.ebuild, line 70: Called gnome2_src_compile '--disable-java-modules' '--enable-grt' '--enable-canvas' '--enable-i18n' gnome2.eclass, line 71: Called die ...however, explicitly specifying -I/usr/src/linux/include as part of my CPPFLAGS leads to other problems, as you might expect (/usr/src/linux/include/atomic.h includes pantsloads more header files from the same directory.)
Emerge info: Portage 2.1.2.3 (default-linux/x86/2006.1/desktop, gcc-4.1.2, glibc-2.5-r1, 2.6.19-suspend2-r3 i686) ================================================================= System uname: 2.6.19-suspend2-r3 i686 Intel(R) Core(TM)2 CPU T7400 @ 2.16GHz Gentoo Base System release 1.12.10 Timestamp of tree: Tue, 10 Apr 2007 16:00:08 +0000 dev-java/java-config: 1.3.7, 2.0.31-r5 dev-lang/python: 2.4.4 dev-python/pycrypto: 2.0.1-r5 sys-apps/sandbox: 1.2.18.1 sys-devel/autoconf: 2.13, 2.61 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.17 sys-devel/gcc-config: 1.3.15-r1 sys-devel/libtool: 1.5.23b virtual/os-headers: 2.6.20-r2 ACCEPT_KEYWORDS="x86 ~x86" AUTOCLEAN="yes" CBUILD="i686-pc-linux-gnu" CFLAGS="-O2 -march=pentium4m -fomit-frame-pointer -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/lib/mozilla/defaults/pref /usr/share/X11/xkb /usr/share/config" CONFIG_PROTECT_MASK="/etc/env.d /etc/env.d/java/ /etc/gconf /etc/java-config/vms/ /etc/php/apache1-php5/ext-active/ /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" CXXFLAGS="-O2 -march=pentium4m -fomit-frame-pointer -pipe" DISTDIR="/usr/portage/distfiles" FEATURES="distlocks metadata-transfer sandbox sfperms strict" GENTOO_MIRRORS="http://mirrors.acm.cs.rpi.edu/gentoo/ http://mirror.datapipe.net/gentoo http://prometheus.cs.wmich.edu/gentoo http://mirror.usu.edu/mirrors/gentoo/ " MAKEOPTS="-j3" 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/local/portage" SYNC="rsync://rsync.gentoo.org/gentoo-portage" USE="X a52 a52dec aac aalib acl acpi acpi4linux aiglx aim alsa apache2 artworkextra asf ati audiofile avi bash-completion beagle berkdb big-tables bioapi bitmap-fonts bluetooth bluez bonobo boost browserplugin bzip2 bzlib cairo calendar cddb cdparanioa cdr cli codecs cracklib crypt cscope ctype cups curl curlwrappers daap dba dbus dbx dga dio directfb divx4linux dlloader doc dri dts dv dvb dvd dvdr dvdread dvi eds emacs emboss encode esd ethereal evo evolution examples exif extensions extrafilters faac faad fam fame fbcon ffmpeg fftw fglrx firefox flac flash flatfile font-server foomaticdb fortran freetds freetype ftp gaim gcj gd gdbm ggi gif gimp gimpprint glitz glut glx gnome gnomedb gnutls gphoto2 gpm gstreamer gtk gtk2 gtkhtml guile hal hdaps heimdal howl iconv icq ieee1394 imagemagick imlib inifile innodb insecure-drivers iodbc ipv6 isdnlog ithreads jabber jack java javascript jikes jpeg jpeg2k junit kerberos keyring ladcca lame lcms ldap libcaca libg++ libnotify libwww linuxthreads-tls lm_sensors mad mcal memlimit mhash midi mikmod mime ming mitshm mjpeg mmap mmx mng mono motif mozbranding mozilla mozp3p mozsvg mp3 mpeg mpeg4 mpi mplayer msession msn musicbrainz mysql mysqli nas nautilus ncurses network networkmanager nls nntp nptl nptlonly nsplugin odbc offensive ofx ogg oggvorbis openal opengl oscar osd oss pam pam_console pcntl pcre pda pdf pdflib perl php pic pie png pnp posix postgres ppds pppd python qt qt3 qt3support qt4 quicktime radeon radeonfb rar readline real reflection samba sasl sdk sdl session shared sharedmem simplexml slp smp sndfile snmp soap sockets sox spell spl sse sse2 ssl svg svga swsusp2 synaptics sysvipc tagwriting tcltk tcpd tetex theora threads tiff tls tpb truetype truetype-fonts trusted type1-fonts udev unicode usb v4l v4l2 vcd videos vidix vorbis wifi win32codecs wmf wxwindows x86 xanim xcomposite xine xinerama xml xml2 xmlrpc xorg xosd xpm xscreensaver xsl xv xvid xvmc yahoo yv12 zlib" ALSA_CARDS="intel8x0 hda-intel" 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="keyboard mouse joystick trackpoint" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" USERLAND="GNU" VIDEO_CARDS="ati radeon v4l fglrx vesa fbdev" Unset: CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LANG, LC_ALL, LDFLAGS, LINGUAS, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS
*** This bug has been marked as a duplicate of bug 163151 ***
Problem solved by the following: emerge -C mysql rm -rf /usr/include/mysql emerge mysql emerge mysql-gui-tools (The rm -rf /usr/include/mysql is what did the trick.) I feel a bit doofish.