Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 436978 - dev-db/mysql-5.6 version bump
Summary: dev-db/mysql-5.6 version bump
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: AMD64 Linux
: Normal normal with 1 vote (vote)
Assignee: Gentoo Linux MySQL bugs team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-10-02 15:13 UTC by Greg
Modified: 2013-03-16 19:14 UTC (History)
3 users (show)

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


Attachments
emerge output (ebuild output.txt,101.62 KB, text/plain)
2012-10-02 15:14 UTC, Greg
Details
Fix bad zlib and readline references in CMakeLists.txt files (20003_all_fix-5.6-library.patch,1.21 KB, patch)
2013-02-27 18:01 UTC, Brian Evans
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Greg 2012-10-02 15:13:54 UTC
MySQL 5.6 has hit RC - MySQL 5.6.7.

I have spent some time fiddling with the existing 5.5 ebuilds/eclass, and there appears to be a bug which I have yet to be able to track down specifically that causes the emerge to fail on "Linking CXX executable pfs_connect_attr-t"

Full log attached


emerge --info

Portage 2.1.11.18 (default/linux/amd64/10.0, gcc-4.6.3, glibc-2.15-r2, 3.4.11-gentoo x86_64)
=================================================================
System uname: Linux-3.4.11-gentoo-x86_64-Intel-R-_Xeon-R-_CPU_E31260L_@_2.40GHz-with-gentoo-2.2
Timestamp of tree: Sat, 29 Sep 2012 14:15:01 +0000
ccache version 3.1.8 [enabled]
app-shells/bash:          4.2_p37
dev-java/java-config:     2.1.12
dev-lang/python:          2.7.3-r2, 3.2.3-r1
dev-util/ccache:          3.1.8
dev-util/cmake:           2.8.9
dev-util/pkgconfig:       0.27.1
sys-apps/baselayout:      2.2
sys-apps/openrc:          0.10.5
sys-apps/sandbox:         2.6
sys-devel/autoconf:       2.13, 2.69
sys-devel/automake:       1.9.6-r3, 1.11.6, 1.12.4
sys-devel/binutils:       2.22.90
sys-devel/gcc:            4.6.3, 4.7.1
sys-devel/gcc-config:     1.7.3
sys-devel/libtool:        2.4.2
sys-devel/make:           3.82-r3
sys-kernel/linux-headers: 3.4-r2 (virtual/os-headers)
sys-libs/glibc:           2.15-r2
Repositories: gentoo mysql
ACCEPT_KEYWORDS="amd64 ~amd64"
ACCEPT_LICENSE="*"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-march=native -O2 -pipe"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/share/gnupg/qualified.txt"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/php/apache2-php5.3/ext-active/ /etc/php/apache2-php5.4/ext-active/ /etc/php/cgi-php5.3/ext-active/ /etc/php/cgi-php5.4/ext-active/ /etc/php/cli-php5.3/ext-active/ /etc/php/cli-php5.4/ext-active/ /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo"
CXXFLAGS="-march=native -O2 -pipe"
DISTDIR="/usr/portage/distfiles"
EMERGE_DEFAULT_OPTS="--autounmask=n"
FCFLAGS="-O2 -pipe"
FEATURES="assume-digests binpkg-logs buildpkg ccache config-protect-if-modified distlocks ebuild-locks fixlafiles news parallel-fetch protect-owned sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch"
FFLAGS="-O2 -pipe"
GENTOO_MIRRORS="http://distfiles.gentoo.org"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
LINGUAS="en en_US"
MAKEOPTS="-j9 -l16"
PKGDIR="/usr/portage/packages"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --human-readable --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/var/lib/layman/mysql"
SYNC="rsync://rsync.us.gentoo.org/gentoo-portage"
USE="acl amd64 authfile avx berkdb bzip2 clamav cli cpudetection cracklib crypt ctype curl cxx dba diskio dri fpm ftp gd gdbm geoip gpm gsm iconv imap ipv6 jpeg jpeg2k json logrotate mmx mmxext modules mudflap multilib mysql mysqli ncurses nls nptl nptlonly openmp openssl oss pam pcre pear perl php png pppd readline schroedinger session simplexml soap sockets sse sse2 ssl ssse3 suexec svg tcpd truetype unicode v4l2 vchroot vhosts virtual-users vx xml xmlrpc zip 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 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 cgi cgid 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" CALLIGRA_FEATURES="kexi words flow plan sheets stage tables krita karbon braindump" CAMERAS="ptp2" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf superstar2 timing tsip tripmate tnt ubx" GRUB_PLATFORMS="efi-64 pc" INPUT_DEVICES="keyboard mouse evdev" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" LINGUAS="en en_US" NGINX_MODULES_HTTP="access auth_basic autoindex browser charset empty_gif fastcgi geo gzip limit_conn limit_req map memcached proxy referer rewrite scgi split_clients ssi upstream_ip_hash userid uwsgi mp4" PHP_TARGETS="php5-3" PYTHON_TARGETS="python3_2 python2_7" RUBY_TARGETS="ruby18 ruby19" USERLAND="GNU" VIDEO_CARDS="fbdev glint intel mach64 mga neomagic nouveau nv r128 radeon savage sis tdfx trident vesa via vmware dummy v4l" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipset ipp2p iface geoip fuzzy condition tee tarpit sysrq steal rawnat logmark ipmark dhcpmac delude chaos account"
Unset:  CPPFLAGS, CTARGET, INSTALL_MASK, LANG, LC_ALL, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, USE_PYTHON


To resolve this, I have simply added the following to my ebuild, and it now builds:

However, this is obviously bypassing the variables/options in the mysql v2 eclass

Reproducible: Always

Steps to Reproduce:
1. Copy MySQL 5.5.22-r1 ebuild to MySQL 5.6.7
2. Download MySQL 5.6.7 RC source tarball, extract, rename to "mysql-5.6.7" and re-tar-gz to remove "-rc" suffix. Copy tar'd file to distfiles
3. create ebuild digest of 5.6.7
4. create virtual/mysql-5.6 package
5. emerge mysql
Comment 1 Greg 2012-10-02 15:14:26 UTC
Created attachment 325540 [details]
emerge output
Comment 2 Greg 2012-10-02 15:19:04 UTC
Sorry - missed adding the lines i added to my ebuild to get it to compile:

src_compile() {
        make
}

src_configure() {
        cmake .
}
Comment 3 Brian Evans Gentoo Infrastructure gentoo-dev 2012-10-02 19:05:36 UTC
This one will need some time to bake as I get the same error as you.

(In reply to comment #0)
> MySQL 5.6 has hit RC - MySQL 5.6.7.
> 
> I have spent some time fiddling with the existing 5.5 ebuilds/eclass, and
> there appears to be a bug which I have yet to be able to track down
> specifically that causes the emerge to fail on "Linking CXX executable
> pfs_connect_attr-t"
> 

> To resolve this, I have simply added the following to my ebuild, and it now
> builds:
> 
> src_compile() {
>         make
> }
> 
> src_configure() {
>         cmake .
> }

Um, no.  This uses the defaults specified with distribution and does NOT reference any use flags.  Definitely not the Gentoo way.

We really need to see which CMake variable is causing the build failure from mysql-cmake.eclass.

USE="-ssl" is broken as it seems SSL is now required.
Building with OpenSSL without MAKEOPTS="-j1" seem to be broken as well.
More investigating to come.

> Steps to Reproduce:
> 1. Copy MySQL 5.5.22-r1 ebuild to MySQL 5.6.7
> 2. Download MySQL 5.6.7 RC source tarball, extract, rename to "mysql-5.6.7"
> and re-tar-gz to remove "-rc" suffix. Copy tar'd file to distfiles

If you copy to mysql-5.6.7_rc.ebuild, the above is not necessary and is the right way.

> 4. create virtual/mysql-5.6 package
This exists in the overlay already.
Comment 4 Greg 2012-11-08 10:27:35 UTC
MySQL 5.6.8-rc is now out, however the same issue still remains with the new version unfortunatelly. Will not compile - identical output/errors.
Comment 5 Robin Johnson archtester Gentoo Infrastructure gentoo-dev Security 2013-01-28 17:43:50 UTC
5.6.9_rc is in the overlay, but fails to link:
- innochecksum
- comp_err

In both cases, as-needed is conflicting with zlib being too early in the link order.

I'm going to FOSDEM, and then taking a vacation, so I won't have time for it until after that.

Somebody should look at the cmake rules for those two targets...
Comment 6 Greg 2013-02-05 08:35:57 UTC
MySQL 5.6.10 has now been released.

I have spent some significant time debugging the eclass files with MySQL 5.6.10.

I can successfully get MySQL 5.6.10 to build with the following changes to mysql-cmake.eclass:

Comment out lines 137-139 :

#               -DWITH_READLINE=0
#               -DWITH_LIBEDIT=0
#               -DWITH_ZLIB=system

Comment out line 273

#       CXXFLAGS="${CXXFLAGS} -fno-implicit-templates"


I'm no expert on cmake, or eclass files but obviously there is something that the MySQL 5.6 cmake install doesnt like with the above options. I also do not know the downside of removing the above options from the build however so far I have yet to find any performance or stability issues.
Comment 7 Brian Evans Gentoo Infrastructure gentoo-dev 2013-02-05 21:43:26 UTC
(In reply to comment #6)
> MySQL 5.6.10 has now been released.
> 
> I have spent some significant time debugging the eclass files with MySQL
> 5.6.10.
> 
> I can successfully get MySQL 5.6.10 to build with the following changes to
> mysql-cmake.eclass:
> 
> Comment out lines 137-139 :
> 
> #               -DWITH_READLINE=0
> #               -DWITH_LIBEDIT=0
> #               -DWITH_ZLIB=system
> 

Those options make mysql use the bundled zlib and readline libraries.
Gentoo prefers not to use bundled libraries when possible.

The patch in http://bugs.mysql.com/bug.php?68087 makes the readline errors go away.  I still get some link error right at the end though.

Note that upstream 68087 was marked a duplicate of http://bugs.mysql.com/bug.php?id=63130 but was more tuned for 5.6.  More work to be done.
Comment 8 Greg 2013-02-07 04:27:24 UTC
Thanks Brian,

The readline patch makes readline error go away. 

I still need to use the bundled zlib or i get:

/usr/lib/gcc/x86_64-pc-linux-gnu/4.7.2/../../../../x86_64-pc-linux-gnu/bin/ld: cannot find -lzlib


Additionally, with some testing done so far I appear to have corruption issues with XML data between libcurl, PHP & MySQL 5.6.10. Rolling back to MySQL 5.5.29 solves the issue. Very bizzare.
Comment 9 Greg 2013-02-07 05:41:47 UTC
The XML issue appears to be due to non-related bugs in openssl 1.0.0d. Reverting to 1.0.0c fixes this.
Comment 10 Brian Evans Gentoo Infrastructure gentoo-dev 2013-02-27 14:09:28 UTC
(In reply to comment #8)
> Thanks Brian,
> 
> The readline patch makes readline error go away. 
> 
> I still need to use the bundled zlib or i get:
> 
> /usr/lib/gcc/x86_64-pc-linux-gnu/4.7.2/../../../../x86_64-pc-linux-gnu/bin/
> ld: cannot find -lzlib

Is that a typo?

zlib should be -lz when linking.
Comment 11 Brian Evans Gentoo Infrastructure gentoo-dev 2013-02-27 18:01:01 UTC
Created attachment 340398 [details, diff]
Fix bad zlib and readline references in CMakeLists.txt files

This patch fixes the references to system zlib and readline.

In addition, eclass/mysql-cmake.eclass must include this change near line 275:

-  CXXFLAGS="${CXXFLAGS} -fno-implicit-templates"
+  # Causes linkage failures.  Upstream bug #59607 removes it
+  if ! mysql_version_is_at_least "5.6" ; then
+    CXXFLAGS="${CXXFLAGS} -fno-implicit-templates"
+  fi

This change is reflected at my repo https://github.com/grknight/gentoo-mysql
Comment 12 Brian Evans Gentoo Infrastructure gentoo-dev 2013-03-15 16:08:53 UTC
This is now InOverlay in the official mysql overlay. (5.6.10)
Comment 13 Robin Johnson archtester Gentoo Infrastructure gentoo-dev Security 2013-03-16 19:14:50 UTC
5.6.10 is in the overlay.