Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 280843 - dev-db/mysql-community-5.1.21_beta: min/max compile error with GCC
Summary: dev-db/mysql-community-5.1.21_beta: min/max compile error with GCC
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Server (show other bugs)
Hardware: AMD64 Linux
: High normal (vote)
Assignee: Gentoo Linux MySQL bugs team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-08-09 03:14 UTC by Rafael Azevedo
Modified: 2010-02-01 01:31 UTC (History)
3 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Rafael Azevedo 2009-08-09 03:14:12 UTC
I did install mysql-5.1 in 9 servers today. When I was just about to finish the last upgrade I got very surprise.

The hardware are not the same on each server, but profile and make.conf and other configuration files are.

I did upgrade to the last portage and also had run emerge --sync before the upgrade. After running --sync I changed the file /usr/portage/profile/package.mask and uncommented the mysql-5.1 lines.

It did work on the other servers. But its not working on this.

Reproducible: Always

Steps to Reproduce:
1. Edit /usr/portage/profile/package.mask
2. Uncomment mysql-5.1 lines
3. Sync emerge
4. USE='big-tables latin1' emerge =virtual/mysql-5.1


Actual Results:  
86_64-pc-linux-gnu-g++ -DUNDEF_THREADS_HACK -DDEFAULT_MYSQL_HOME="\"/usr\"" -DDATADIR="\"/var/lib/mysql\"" -I. -I../include -I../include -I../include -I../regex     -O2 -pipe -march=nocona -mno-tls-direct-seg-refs -DHAVE_ERRNO_AS_DEFINE=1 -fno-exceptions -fno-strict-aliasing -felide-constructors -fno-rtti -fno-implicit-templates   -fno-implicit-templates -fno-exceptions -fno-rtti -MT sql_string.o -MD -MP -MF .deps/sql_string.Tpo -c -o sql_string.o sql_string.cc
sql_string.cc: In member function 'int String::reserve(uint32, uint32)':
sql_string.cc:665: error: 'max' was not declared in this scope
sql_string.cc: In function 'int stringcmp(const String*, const String*)':
sql_string.cc:751: error: 'min' was not declared in this scope
sql_string.cc: In function 'String* copy_if_not_alloced(String*, String*, uint32)':
sql_string.cc:768: error: 'min' was not declared in this scope
make[2]: *** [sql_string.o] Error 1
make[2]: *** Waiting for unfinished jobs....
mv -f .deps/readline.Tpo .deps/readline.Po
mysql.cc: In function 'void print_table_data(MYSQL_RES*)':
mysql.cc:2401: error: 'max' was not declared in this scope
mysql.cc:2403: error: 'max' was not declared in this scope
mysql.cc:2424: error: 'min' was not declared in this scope
make[2]: *** [mysql.o] Error 1
make[2]: Leaving directory `/var/tmp/portage/dev-db/mysql-community-5.1.21_beta/work/mysql/client'
make[1]: *** [all] Error 2
make[1]: Leaving directory `/var/tmp/portage/dev-db/mysql-community-5.1.21_beta/work/mysql/client'
make: *** [all-recursive] Error 1
 * 
 * ERROR: dev-db/mysql-community-5.1.21_beta failed.
 * Call stack:
 *               ebuild.sh, line   49:  Called src_compile
 *             environment, line 4075:  Called mysql_src_compile
 *             environment, line 3600:  Called die
 * The specific snippet of code:
 *       emake || die "emake failed";
 *  The die message:
 *   emake failed
 * 
 * If you need support, post the topmost build error, and the call stack if relevant.
 * A complete build log is located at '/var/tmp/portage/dev-db/mysql-community-5.1.21_beta/temp/build.log'.
 * The ebuild environment file is located at '/var/tmp/portage/dev-db/mysql-community-5.1.21_beta/temp/environment'.
 * 

>>> Failed to emerge dev-db/mysql-community-5.1.21_beta, Log file:

>>>  '/var/tmp/portage/dev-db/mysql-community-5.1.21_beta/temp/build.log'

 * Messages for package dev-db/mysql-community-5.1.21_beta:

 * MySQL MY_DATADIR is /var/lib/mysql
 * MySQL datadir found in /var/lib/mysql
 * A new one will not be created.
 * 
 * ERROR: dev-db/mysql-community-5.1.21_beta failed.
 * Call stack:
 *               ebuild.sh, line   49:  Called src_compile
 *             environment, line 4075:  Called mysql_src_compile
 *             environment, line 3600:  Called die
 * The specific snippet of code:
 *       emake || die "emake failed";
 *  The die message:
 *   emake failed
 * 
 * If you need support, post the topmost build error, and the call stack if relevant.
 * A complete build log is located at '/var/tmp/portage/dev-db/mysql-community-5.1.21_beta/temp/build.log'.
 * The ebuild environment file is located at '/var/tmp/portage/dev-db/mysql-community-5.1.21_beta/temp/environment'.
 * 


Expected Results:  
Compile sucessfuly.
Comment 1 James Earl Spahlinger 2009-08-09 21:35:46 UTC
Please paste the output of 'emerge --info' into a bugzilla comment to assist the maintainers in resolving this issue

Comment 2 Rafael Azevedo 2009-08-09 22:06:45 UTC
merge --info
Portage 2.1.6.13 (default/linux/amd64/2008.0, gcc-4.3.2, glibc-2.8_p20080602-r1, 2.6.29.4 x86_64)
=================================================================
System uname: Linux-2.6.29.4-x86_64-Pentium-R-_Dual-Core_CPU_E5200_@_2.50GHz-with-glibc2.2.5
Timestamp of tree: Sun, 09 Aug 2009 02:45:03 +0000
app-shells/bash:     3.2_p39
dev-lang/python:     2.5.4-r2
dev-util/cmake:      2.6.4
sys-apps/baselayout: 1.12.11.1
sys-apps/sandbox:    1.6-r2
sys-devel/autoconf:  2.63
sys-devel/automake:  1.7.9-r1, 1.10.2
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.27-r2
ACCEPT_KEYWORDS="amd64 ~amd64"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-O2 -pipe -march=nocona -mno-tls-direct-seg-refs"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/gconf /etc/php/apache2-php5/ext-active/ /etc/php/cgi-php5/ext-active/ /etc/php/cli-php5/ext-active/ /etc/sandbox.d /etc/terminfo /etc/udev/rules.d"
CXXFLAGS="-O2 -pipe -march=nocona -mno-tls-direct-seg-refs"
DISTDIR="/usr/portage/distfiles"
FEATURES="distlocks fixpackages parallel-fetch protect-owned sandbox sfperms strict unmerge-orphans userfetch"
GENTOO_MIRRORS="http://mirror.usu.edu/mirrors/gentoo ftp://ftp.las.ic.unicamp.br/pub/gentoo/ http://www.las.ic.unicamp.br/pub/gentoo/"
LDFLAGS="-Wl,-O1"
MAKEOPTS="-j3"
PKGDIR="/usr/portage/packages"
PORTAGE_CONFIGROOT="/"
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="/usr/portage"
SYNC="rsync://rsync.samerica.gentoo.org/gentoo-portage"
USE="acl amd64 berkdb bzip2 cli cracklib crypt cups dri fortran gdbm gpm iconv imap ipv6 isdnlog libwww maildir mmx mudflap multilib mysql ncurses nls nptl nptlonly openmp pam pcre perl pppd python readline reflection sasl session spl sse sse2 ssl sysfs tcpd unicode xorg zlib ~amd64" 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 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" ELIBC="glibc" INPUT_DEVICES="keyboard mouse evdev" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" USERLAND="GNU" VIDEO_CARDS="fbdev glint i810 intel mach64 mga neomagic nv r128 radeon savage sis tdfx trident vesa vga via vmware voodoo"
Unset:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, FFLAGS, INSTALL_MASK, LANG, LC_ALL, LINGUAS, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, PORTDIR_OVERLAY
Comment 3 Rafael Azevedo 2009-08-19 15:05:09 UTC
Still got the same error...
Comment 4 Andreas Schubert 2009-10-22 09:22:55 UTC
There seems to be a solution. It's a gcc version related issue. See bug description at mysql:
http://bugs.mysql.com/bug.php?id=30866. The solution worked for me.
Comment 5 Robin Johnson archtester Gentoo Infrastructure gentoo-dev Security 2010-02-01 01:31:39 UTC
Can you please test 5.1.4[23] from the tree now. -community is dead upstream.
We've also got our MYSQL_MIN/MAX patches for your issue.