Compiling MySQL fails as follows: .. -O3 -DDBUG_OFF -march=pentium3 -mmmx -msse -mfpmath=sse -pipe -fPIC -O3 -felide-constructors -fno-exceptions -fno-rtti -fno-implicit-templates -fno-exceptions -fno-rtti -c -o completion_hash.o `test -f completion_hash.cc || echo './'`completion_hash.cc /bin/sh ../libtool --mode=link g++ -O3 -DDBUG_OFF -march=pentium3 -mmmx -msse -mfpmath=sse -pipe -fPIC -O3 -felide-constructors -fno-exceptions -fno-rtti -fno-implicit-templates -fno-exceptions -fno-rtti -rdynamic -o mysql mysql.o readline.o sql_string.o completion_hash.o ../readline/libreadline.a -lncurses -lstdc++ ../libmysql/libmysqlclient.la -lz -lcrypt -lnsl -lm mkdir .libs g++ -O3 -DDBUG_OFF -march=pentium3 -mmmx -msse -mfpmath=sse -pipe -fPIC -O3 -felide-constructors -fno-exceptions -fno-rtti -fno-implicit-templates -fno-exceptions -fno-rtti -rdynamic -o .libs/mysql mysql.o readline.o sql_string.o completion_hash.o ../readline/libreadline.a -lncurses -lstdc++ ../libmysql/.libs/libmysqlclient.so -lz -lcrypt -lnsl -lm -Wl,--rpath -Wl,/usr/lib/mysql mysql.o(.text+0x2030): In function `com_source(String*, char*)': : undefined reference to `errno' collect2: ld returned 1 exit status make[2]: *** [mysql] Error 1 make[2]: Leaving directory `/var/tmp/portage/mysql-3.23.55/work/mysql-3.23.55/client' make[1]: *** [all-recursive] Error 1 make[1]: Leaving directory `/var/tmp/portage/mysql-3.23.55/work/mysql-3.23.55' make: *** [all] Error 2 !!! ERROR: dev-db/mysql-3.23.55 failed. !!! Function src_compile, Line 101, Exitcode 2 !!! compile problem This occurs on a fresh install of gentoo
please paste #emerge info
Portage 2.0.47-r7 (default-x86-1.4, gcc-3.2.2, glibc-2.3.2_pre1-r0) ================================================================= System uname: 2.4.20-xfs_pre6 i686 Pentium III (Coppermine) GENTOO_MIRRORS="http://gentoo.oregonstate.edu/ http://distro.ibiblio.org/pub/Linux/distributions/gentoo" CONFIG_PROTECT="/etc /var/qmail/control /usr/share/config /usr/kde/2/share/config /usr/kde/3/share/config /usr/X11R6/lib/X11/xkb" CONFIG_PROTECT_MASK="/etc/gconf /etc/env.d" PORTDIR="/usr/portage" DISTDIR="/usr/portage/distfiles" PKGDIR="/usr/portage/packages" PORTAGE_TMPDIR="/var/tmp" PORTDIR_OVERLAY="" USE="x86 oss 3dnow apm arts avi crypt cups encode gif imlib java jpeg kde gnome libg++ libwww mikmod mmx motif mpeg ncurses nls oggvorbis pdflib png qt quicktime sdl spell svga truetype xml2 xmms xv zlib gdbm berkdb slang readline X gpm tcpd pam ssl perl python gtk opengl" COMPILER="gcc3" CHOST="i686-pc-linux-gnu" CFLAGS="-march=pentium3 -mmmx -msse -mfpmath=sse -O3 -pipe -fPIC" CXXFLAGS="-march=pentium3 -mmmx -msse -mfpmath=sse -O3 -pipe -fPIC" ACCEPT_KEYWORDS="x86 ~x86" MAKEOPTS="-j2" AUTOCLEAN="yes" SYNC="rsync://rsync.gentoo.org/gentoo-portage" FEATURES="sandbox ccache" ive tried compiling without the CFLAGS and that also causes the same error.
Jordan: do you see the part where you paste: glibc-2.3.2_pre1-r0 Please dont mark these reports 'CRITICAL' okay? Apparently we can use an preprocessor def to fix it.
*** Bug 16496 has been marked as a duplicate of this bug. ***
adding -DHAVE_ERRNO_AS_DEFINE=1 to CFLAGS seems quick & painless
i'll be adding 4.0.11a with this fix shortly.
I added this to mysql-3.23.55.ebuild : + #glibc-2.3.2_pre fix; bug #16496 + export CFLAGS="${CFLAGS} -DHAVE_ERRNO_AS_DEFINE=1" that should fix you up, I think.
*** Bug 16475 has been marked as a duplicate of this bug. ***