Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 238487 - media-sound/amarok-2 fails to build due to dev-db/mysql-community - ld: /usr/lib64/mysql/libmysqld.a(client.o): relocation R_X86_64_32S against `client_errors' can not be used when making a shared object; recompile with -fPIC
Summary: media-sound/amarok-2 fails to build due to dev-db/mysql-community - ld: /usr/...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: AMD64 Linux
: High normal with 1 vote (vote)
Assignee: Gentoo KDE team
URL: http://bugs.mysql.com/bug.php?id=39288
Whiteboard:
Keywords:
: 239531 246101 247264 250591 250794 256310 (view as bug list)
Depends on:
Blocks: 258501 261643 261645
  Show dependency tree
 
Reported: 2008-09-23 15:45 UTC by Mikko C.
Modified: 2010-03-20 14:55 UTC (History)
71 users (show)

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


Attachments
Mysql eclass with experimental pic support (mysql.eclass,26.94 KB, text/plain)
2008-10-13 12:27 UTC, Marco Napetti
Details
mysql_eclass_pic.patch (mysql_eclass_pic.patch,413 bytes, patch)
2008-10-30 17:22 UTC, Thomas Kuther
Details | Diff
Update to MySQL build system to enable a shared libmysqld (203_all_embedded-library-shared.5.0.72.patch,23.27 KB, text/plain)
2009-01-03 02:45 UTC, Jorge Manuel B. S. Vicetto
Details
Partial patch to MySQL build system to enable a shared libmysqld (0204_all_embedded-library-shared.5.0.76.patch.bz2,32.99 KB, application/octet-stream)
2009-03-15 14:28 UTC, Jorge Manuel B. S. Vicetto
Details
Partial patch to MySQL build system to enable a shared libmysqld (0204_all_embedded-library-shared.5.0.76.patch,34.45 KB, text/plain)
2009-03-15 16:32 UTC, Jorge Manuel B. S. Vicetto
Details
Update to MySQL build system to enable a shared libmysqld (0204_all_embedded-library-shared.5.0.76.patch,84.13 KB, patch)
2009-03-16 05:23 UTC, Jorge Manuel B. S. Vicetto
Details | Diff
Update to MySQL build system to enable a shared libmysqld (0204_all_embedded-library-shared.5.0.76.patch,51.92 KB, patch)
2009-03-29 01:33 UTC, Jorge Manuel B. S. Vicetto
Details | Diff
Update to MySQL build system to enable a shared libmysqld (0204_all_embedded-library-shared.5.0.76.patch.backup,51.92 KB, patch)
2009-03-30 03:01 UTC, Jorge Manuel B. S. Vicetto
Details | Diff
my build.log with patch from comment 69 (dev-db:mysql-5.0.76:20090403-213430.log,1.24 MB, text/plain)
2009-04-07 12:00 UTC, Rafał Mużyło
Details
Update to MySQL build system to enable a shared libmysqld (0204_all_embedded-library-shared.5.0.76.patch,54.55 KB, patch)
2009-04-11 21:28 UTC, Jorge Manuel B. S. Vicetto
Details | Diff
Partial patch to MySQL build system to enable a shared libmysqld (0204_all_embedded-library-shared.5.0.76.patch,52.34 KB, patch)
2009-04-11 22:57 UTC, Jorge Manuel B. S. Vicetto
Details | Diff
Update to MySQL build system to enable a shared libmysqld (0204_all_embedded-library-shared.5.0.77.patch,52.67 KB, patch)
2009-04-12 05:22 UTC, Jorge Manuel B. S. Vicetto
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Mikko C. 2008-09-23 15:45:35 UTC
If dev-db/mysql-community isn't build with -fPIC on amd64, some applications can't compile, for example Amarok2:

Linking CXX shared module ../../../lib/libamarok_collection-sqlcollection.so
/usr/lib/gcc/x86_64-pc-linux-gnu/4.3.1/../../../../x86_64-pc-linux-gnu/bin/ld: /usr/lib64/mysql/libmysqld.a(client.o): relocation R_X86_64_32S against `client_errors' can not be used when making a shared object; recompile with -fPIC
/usr/lib64/mysql/libmysqld.a: could not read symbols: Bad value
collect2: ld returned 1 exit status

On amd64 mysql-community should be forced to build with -fPIC
Thanks

Reproducible: Always

Steps to Reproduce:
1. Compile dev-db/mysql-community
2. Compile an application such as Amarok2
3. Build fails
Comment 1 Soren Harward 2008-09-23 17:09:25 UTC
I have the same issue on x86.

More generally, any applications which use PIC (and there are a lot of them, not just on AMD64) cannot use MySQL static libraries (eg, MySQL Embedded) that are not compiled with PIC.  Amarok2 is one of these applications.  At the very least, the MySQL ebuilds could provide a USE flag to force PIC compilation.
Comment 2 Soren Harward 2008-09-23 17:15:48 UTC
Sorry -- my last statement was a little in error.  Amarok uses MySQL Embedded in one of its music collection plugins, which is compiled as a shared library.  Hence, it cannot link in the non-PIC libmysqld.la.  The only way to forcibly enable PIC in the mysql eclass is by setting the "static" USE flag, which also disables all shared libraries.  This is not desirable.  So there should be a separate way to force all-PIC compilation of MySQL.
Comment 3 Ian Monroe 2008-09-23 18:25:13 UTC
OpenSUSE fixes the issue by adding "-DFPIC -fPIC" to the CFLAGS.
Comment 4 Jeroen Roovers gentoo-dev 2008-09-23 18:51:09 UTC
Please post your `emerge --info' too and tell us which version of dev-db/mysql-community is installed.
Comment 5 Mikko C. 2008-09-23 19:16:17 UTC
Portage 2.2_rc9 (default/linux/amd64/2008.0/desktop, gcc-4.3.1, glibc-2.7-r2, 2.6.27-rc6 x86_64)
=================================================================                               
System uname: Linux-2.6.27-rc6-x86_64-Intel-R-_Core-TM-2_CPU_T7200_@_2.00GHz-with-glibc2.2.5    
Timestamp of tree: Tue, 23 Sep 2008 15:00:01 +0000                                              
ccache version 2.4 [enabled]                                                                    
app-shells/bash:     3.2_p33                                                                    
dev-java/java-config: 1.3.7, 2.1.6                                                              
dev-lang/python:     2.4.4-r13, 2.5.2-r8                                                        
dev-python/pycrypto: 2.0.1-r6                                                                   
dev-util/ccache:     2.4-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.26                                                                     
ACCEPT_KEYWORDS="amd64"                                                                         
CBUILD="x86_64-pc-linux-gnu"                                                                    
CFLAGS="-march=nocona -O2 -pipe"                                                                
CHOST="x86_64-pc-linux-gnu"                                                                     
CONFIG_PROTECT="/etc /usr/kde/svn/env /usr/kde/svn/share/config /usr/kde/svn/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=nocona -O2 -pipe"                                                                                          
DISTDIR="/usr/portage/distfiles"                                                                                            
FEATURES="ccache distlocks parallel-fetch preserve-libs protect-owned sandbox sfperms strict unmerge-orphans userfetch"     
GENTOO_MIRRORS="http://mirror.ovh.net/gentoo-distfiles/ ftp://pandemonium.tiscali.de/pub/gentoo/ http://mirror.ing.unibo.it/gentoo/ ftp://mirror.ing.unibo.it/gentoo/ "                                                                                 
LC_ALL="it_IT.UTF-8"                                                                                                        
LDFLAGS="-Wl,-O1"                                                                                                           
LINGUAS="it"                                                                                                                
MAKEOPTS="-j3"
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="/usr/portage"
PORTDIR_OVERLAY="/var/paludis/repositories/x11"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="X a52 aac accessibility acl acpi alsa amarok amd64 amd64codecs archive asf audiofile automount autoreplace avi bash-completion berkdb bluetooth branding browserplugin bzip2 cairo cdda cddb cdparanoia cdr cdrom cli clucene cracklib crypt cups curl cvs dbus dell divx dlloader dri dvd dvdr dvdread eds emboss encode esd evo fam fat ffmpeg firefox flac fortran fuse gdbm gif glitz gpm gstreamer gtk hal iconv ipv6 ipw3945 isdnlog jack java jpeg kde kdeenablefinal kerberos ldap libnotify lm_sensors logitech-mouse mad messenger midi mikmod mmx modplug mozilla mp2 mp3 mp4 mpeg mplayer msn mtp mudflap multilib musicbrainz ncurses njb nls nowlistening nptl nptlonly nsplugin ntfs ogg opengl openmp pam pcre pdf pdflib perl png ppds pppd python qt3 qt3support qt4 quicktime rar readline realmedia reflection reiser4 reiserfs ruby samba sdl session smp sndfile spell spl sqlite3 sse sse2 ssl startup-notification subtitles subversion svg symlink sysfs syslog taglib tagwriting tcpd theora tiff truetype type1 udev unicode unzip usb vorbis wavpack wifi winbind wireshark wma wmp x264 xcomposite xfs xine xml xorg xv xvid zip zlib" ALSA_CARDS="hda-intel" 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 filterheaders 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="mouse keyboard evdev synaptics" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="it" USERLAND="GNU" VIDEO_CARDS="vesa radeon"
Unset:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, FFLAGS, INSTALL_MASK, LANG, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS


dev-db/mysql-community-5.0.51a
Comment 6 Ian Monroe 2008-09-23 19:45:10 UTC
Related mysql bug:
http://bugs.mysql.com/bug.php?id=39288
Comment 7 Robin Johnson archtester Gentoo Infrastructure gentoo-dev Security 2008-10-03 20:06:06 UTC
kde folk: FYI jmbsvicetto spoke to me about the needs of Amarok a few days ago.

Forcing -fPIC into a static library isn't the correct option either, because it hurts people that actually want to build a static binary when C++ code is involved. That's why libstdc++ builds both libstdc++.a and libstdc++_pic.a.

A core question here is why is Amarok trying to link against a library that is designed for building static binaries? libmysqld is esp bad, weighing in at nearly 14Mb on many systems.

It's not sufficiently high on my priority list at the moment, I'm busy with the porting of the mysql patchset up to the latest version. After that, I'll see about a patch to give you a shared version of libmysqld, unless Sveta upstream, being the fun girl that she is, beats me to it.
Comment 8 Diego Elio Pettenò (RETIRED) gentoo-dev 2008-10-03 20:28:10 UTC
I'm not interested in maintaining Amarok 2 in this life, less than less to deal with MySQL Embedded. The amarok-packagers mailing list has some notes about that, Fedora has a patch to build MySQL Embedded as a shared library, get in touch with Amarok devs, they should have it.
Comment 9 Tomáš Chvátal (RETIRED) gentoo-dev 2008-10-03 21:26:20 UTC
Agreed. Fedora really has the patch:
http://cvs.fedoraproject.org/viewvc/devel/mysql/mysql.spec?r1=1.108&r2=1.109

Hope you find it useful. :]

Currently we are somehow maintainin all packages together and it works without specified package maintainer :}

Flameeyes i know that cmake suck but i hope they fix all flaws :] (still have some hope left)
Comment 10 Robin Johnson archtester Gentoo Infrastructure gentoo-dev Security 2008-10-03 22:21:54 UTC
tomas: that patch is only against their RPM .spec. It's not also ideal because it forces -fPIC and then uses all of the .o files to build a shared library, but also still builds the static library using the -fPIC .o files.

Somebody needs to grab a little bit out of the server/Makefile.am that builds *.lo from the libmysqld .c files with -fPIC, and then uses the *.lo to create the shared library.
Comment 11 Mikko C. 2008-10-04 07:56:45 UTC
If you weren't aware already, here's the related discussion: http://lists.mysql.com/internals/35947
Comment 12 Matt Whitlock 2008-10-10 08:42:41 UTC
Though it's ugly, this is a usable workaround for now:

( source /etc/make.conf && CFLAGS="${CFLAGS} -DFPIC -fPIC" emerge -1 dev-db/mysql ) && emerge =media-sound/amarok-1.92.2 && emerge -1 dev-db/mysql

Thus Amarok can pull in the static libmysqld PIC library, but other applications built subsequently won't suffer the performance penalty since libmysqld is then rebuilt without PIC immediately after building Amarok.  It's ugly and is not a long-term solution, but it will get you Amarok on KDE4 today.
Comment 13 Edward "Hades" 2008-10-10 09:08:35 UTC
(In reply to comment #12)
> Though it's ugly, this is a usable workaround for now:
> 
> ( source /etc/make.conf && CFLAGS="${CFLAGS} -DFPIC -fPIC" emerge -1
> dev-db/mysql ) && emerge =media-sound/amarok-1.92.2 && emerge -1 dev-db/mysql
> 

One can also build two binary packages (with fPIC and without fPIC) to avoid compiling mysql twice each time amarok is needed.

Don't know how to automate that this nicely, though :(
Comment 14 Matt Whitlock 2008-10-10 10:28:52 UTC
By the way, if anyone is wondering how to migrate their collection statistics from the old Amarok 1.4 SQLite database to the new Amarok 2 MySQL Embedded database, I've posted a nice "How To" at:
http://dot.kde.org/1223401559/1223422090/1223634717/
Comment 15 Dennis Schridde 2008-10-11 08:34:08 UTC
Your line seems not to be exactly correct. I needed this:
( source /etc/make.conf && CFLAGS="${CFLAGS} -DPIC -fPIC" CXXFLAGS="${CXXFLAGS} -DPIC -fPIC" emerge -1 dev-db/mysql ) && emerge =media-sound/amarok-1.92.2 && emerge -1 dev-db/mysql

Changes: -DPIC and CXXFLAGS
Comment 16 Timo Gurr (RETIRED) gentoo-dev 2008-10-11 23:47:09 UTC
*** Bug 239531 has been marked as a duplicate of this bug. ***
Comment 17 Marco Napetti 2008-10-13 12:27:13 UTC
Created attachment 168288 [details]
Mysql eclass with experimental pic support
Comment 18 Marco Napetti 2008-10-13 12:28:33 UTC
I created an experimental mysql.eclass that supports the pic USE flag, but the amarok2 problem is still present...
Comment 19 Matt Whitlock 2008-10-13 15:32:17 UTC
(In reply to comment #18)
> I created an experimental mysql.eclass that supports the pic USE flag, but the
> amarok2 problem is still present...
> 

Ideally what we need is for the 'pic' flag to enable the building of an _additional_ libmysqld static library, say libmysqld_pic.a, that is built with PIC, and then patch up the Amarok build to require || ( mysql[embedded,-minimal,pic] mysql-community[embedded,-minimal,pic] ) and to link with libmysqld_pic.a.

Or we could try to help the MySQL goofballs actually generate a libmysqld.so, which would naturally be PIC.  Who knows why they thought only offering MySQL Embedded as a static library was a good/sustainable/maintainable idea!
Comment 20 Marco Napetti 2008-10-27 22:34:04 UTC
I enabled the static use flag mysql-commmunity but amarok2 still can't build right, how is it possible?
Comment 21 Thomas Kuther 2008-10-30 17:22:48 UTC
Created attachment 170337 [details, diff]
mysql_eclass_pic.patch

As the configure switch seems broken for both mysql and mysql-community, adding -fPIC -DPIC to C(XX)FLAGS seems to be the only way now.

Attached patch adds that to mysql.eclass

While that's not really nice, it at least makes amarok2 compile and work.
Comment 22 Mikko C. 2008-10-30 17:27:47 UTC
I can confirm that the above patch + mysql-community-5.0.51a from portage makes amarok compile and run correctly :)
Comment 23 Thomas Kuther 2008-10-30 17:49:44 UTC
PS: I have USE="+embedded -static" for mysql if it matters.

If I understood correctly, any shared lib on amd64 should be compiled -fPIC -DPIC anyway, so the patch might look like

use amd64 && append-flags "-fPIC -DPIC"

Looking at the b0xen at my company, OpenSUSE and RedHat add this in their .spec's for mysql.
Comment 24 Matt Whitlock 2008-10-30 17:57:24 UTC
The issue is that MySQL Embedded is available only as a static library, which, when compiled into an executable, will have better performance if it is not position-independent code.  Amarok uses MySQL Embedded in an unexpected (by MySQL) way: Amarok links the MySQL Embedded static library into its collection plugin, which is a shared library.  Shared libraries on amd64 need to be position-independent code, so we run into a problem.  Yes, compiling the MySQL Embedded static library with PIC does solve the problem with Amarok, but it will result in unnecessarily slower code in regular executables that incorporate the MySQL Embedded static library.
Comment 25 Edward "Hades" 2008-10-30 20:12:16 UTC
(In reply to comment #24)
> The issue is that MySQL Embedded is available only as a static library, which,
> when compiled into an executable, will have better performance if it is not
> position-independent code.  Amarok uses MySQL Embedded in an unexpected (by
> MySQL) way: Amarok links the MySQL Embedded static library into its collection
> plugin, which is a shared library.  Shared libraries on amd64 need to be
> position-independent code, so we run into a problem.  Yes, compiling the MySQL
> Embedded static library with PIC does solve the problem with Amarok, but it
> will result in unnecessarily slower code in regular executables that
> incorporate the MySQL Embedded static library.

Just for general knowledge: how many programs are there using mysql embedded?

Also, shouldn't it be a use-flag?
Comment 26 Markos Chandras (RETIRED) gentoo-dev 2008-11-09 11:36:02 UTC
I keep reading this bug but I cant find a solution to that. Im not sure how to use the attached files or what.

Any specific instructions to test/fix/deal with this bug?
Comment 27 Edward "Hades" 2008-11-09 11:57:51 UTC
If you know how to use overlays, you could try installing mysql-community from this one: http://hades.redsecure.ru/aeacus/

(In reply to comment #26)
> I keep reading this bug but I cant find a solution to that. Im not sure how to
> use the attached files or what.
> 
> Any specific instructions to test/fix/deal with this bug?
> 

Comment 28 Markos Chandras (RETIRED) gentoo-dev 2008-11-09 12:11:08 UTC
(In reply to comment #27)
> If you know how to use overlays, you could try installing mysql-community from
> this one: http://hades.redsecure.ru/aeacus/
> 
> (In reply to comment #26)
> > I keep reading this bug but I cant find a solution to that. Im not sure how to
> > use the attached files or what.
> > 
> > Any specific instructions to test/fix/deal with this bug?
> > 
> 

Which version? Cause there is mysql-community already in portage  :)
Comment 29 Edward "Hades" 2008-11-09 12:13:47 UTC
I use 5.0.51a, you could try it or 5.1.21_beta.

Version in portage is not compatible with Amarok, use the overlayed.

(In reply to comment #28)
> 
> Which version? Cause there is mysql-community already in portage  :)
> 

Comment 30 Markos Chandras (RETIRED) gentoo-dev 2008-11-09 16:25:05 UTC
Thanks :)
Comment 31 Markos Chandras (RETIRED) gentoo-dev 2008-11-09 16:38:38 UTC
Sorry for asking again ( and hijack this bug ) but how can I pick the overlays version rather than portage?Overlay and portage have 5.0.51a . So when I try emerge -av mysql-community it picks the portage version not the overlays. Is there a way to force emerge to use the overlays ebuild? I couldnt find anything about this on the official gentoo overlay guide

Many thanks
Comment 32 Edward "Hades" 2008-11-09 16:51:24 UTC
IIRC, Portage always prefers overlay version, so most probably you haven't configured overlay correctly. Does 'emerge --info | grep PORTDIR_OVERLAY' show it?

(In reply to comment #31)
> Sorry for asking again ( and hijack this bug ) but how can I pick the overlays
> version rather than portage?Overlay and portage have 5.0.51a . So when I try
> emerge -av mysql-community it picks the portage version not the overlays. Is
> there a way to force emerge to use the overlays ebuild? I couldnt find anything
> about this on the official gentoo overlay guide
> 
> Many thanks
> 

Comment 33 Markos Chandras (RETIRED) gentoo-dev 2008-11-09 17:44:27 UTC
Fixed . Thank you . I had badly configured overlay on /etc/make.conf
Comment 34 Robin Johnson archtester Gentoo Infrastructure gentoo-dev Security 2008-11-09 21:11:49 UTC
As the sole active MySQL maintainer, it seems that nearly everybody here has ignored my responses in comment #7 and comment #10.

I will NOT accept patches that just modify the existing stuff to build the .a library with -fPIC. We need to have a libmysqld.so instead. It is on my TODO list, but I just haven't got there yet. Please stop using your .a -fPIC hack, it has the potential to cause other problems.
Comment 35 Matt Whitlock 2008-11-09 23:46:08 UTC
(In reply to comment #34)
> Please stop using your .a -fPIC hack,
> it has the potential to cause other problems.

So you are effectively asking us to stop using Amarok until you can figure out how to make a libmysqld.so.  No sir, the -fPIC hack gives us a working Amarok today.  I eagerly anticipate a libmysqld.so from you, but I won't ignore a viable workaround in the meantime.
Comment 36 Wormo (RETIRED) gentoo-dev 2008-11-10 00:26:43 UTC
*** Bug 246101 has been marked as a duplicate of this bug. ***
Comment 37 Tony Murray 2008-11-12 19:32:25 UTC
Is there any reason not to create a mysql-embedded ebuild?  For programs that don't need mysql server etc it would save a lot of extra stuff.  The only consideration is mysql-embedded needs to be able to installed on the same box as mysql for the users that want both.
Comment 38 Robin Johnson archtester Gentoo Infrastructure gentoo-dev Security 2008-11-12 19:51:08 UTC
tonymurray: it should in theory be possible to have a USE=minimal build but with the embedded lib, however there wouldn't be much actual benefit in doing so, since many of the object files from embedded are also used for other parts of the full.
Comment 39 Peter Alfredsen (RETIRED) gentoo-dev 2008-11-19 09:26:09 UTC
*** Bug 247264 has been marked as a duplicate of this bug. ***
Comment 40 Tony Murray 2008-11-19 15:27:33 UTC
USE=minimal causes Amarok to fail at configure with:

-- Performing Test HAVE_MYSQL_OPT_EMBEDDED_CONNECTION                                                           
-- Performing Test HAVE_MYSQL_OPT_EMBEDDED_CONNECTION - Success                                                 
-- Found MySQL: /usr/include/mysql, /usr/lib64/libmysqlclient.so                                                
-- MySQL Embedded not found.   
Comment 41 Maciej Mrozowski gentoo-dev 2008-11-20 10:27:37 UTC
It fails, because  USE="minimal"  disables building embedded-server.
MySQL ebuild should be split to separate packages imho, client library (containing libmysqlclient), embedded server (libmysqld) and the rest ('proper server with all USE flags related to alternative db engines) - but that's an offtopic.

Could anybody change summary of this bug and add 'MySQL' to the summary? It gives more chance that someone will find it (like me) before opening new *duplicated* bug about this MySQL issue.

Amarok looks for 'mysqld' library (by name, either static or shared, doesn't matter) and for 'mysqlclient' library (as well, either static or shared, Amarok/cmake favors shared libraries), so privding mysql embedded server (a'ka libmysqld) as shared library (as well) would solve the issue.
Comment 42 Maciej Mrozowski gentoo-dev 2008-12-07 05:14:42 UTC
As a side note it applies to dev-db/mysql as well
Comment 43 Marek Sapota 2008-12-11 07:51:39 UTC
I've tried (source /etc/make.conf && CFLAGS="${CFLAGS} -DPIC -fPIC" CXXFLAGS="${CXXFLAGS}} -DPIC -fPIC" emerge -1 dev-db/mysql) as in above posts, but in about half of the build it starts eating up memory really fast until in a few seconds it hangs my system. What more should I do to make it work?
Comment 44 Tomáš Chvátal (RETIRED) gentoo-dev 2008-12-11 12:26:44 UTC
*** Bug 250591 has been marked as a duplicate of this bug. ***
Comment 45 Marek Sapota 2008-12-12 09:18:16 UTC
(In reply to comment #43)
> I've tried (source /etc/make.conf && CFLAGS="${CFLAGS} -DPIC -fPIC"
> CXXFLAGS="${CXXFLAGS}} -DPIC -fPIC" emerge -1 dev-db/mysql) as in above posts,
> but in about half of the build it starts eating up memory really fast until in
> a few seconds it hangs my system. What more should I do to make it work?
> 

In reply to my own post, it was my fault, '-j' in make opts. Sorry.
Comment 46 Tomáš Chvátal (RETIRED) gentoo-dev 2008-12-13 13:06:14 UTC
*** Bug 250794 has been marked as a duplicate of this bug. ***
Comment 47 Jorge Manuel B. S. Vicetto Gentoo Infrastructure gentoo-dev 2009-01-03 02:45:51 UTC
Created attachment 177179 [details]
Update to MySQL build system to enable a shared libmysqld

This is a draft patch I've been working for some time now with great help from Diego "flameeyes" Pettenò and Robin "robbat2" Johnson.
This isn't final and still causes the build to fail, but I'm posting here so that it doesn't dissapear into "thin air".
Comment 48 Jens Mueller 2009-01-10 18:04:15 UTC
(source /etc/make.conf && CFLAGS="${CFLAGS} -DPIC -fPIC"
CXXFLAGS="${CXXFLAGS}} -DPIC -fPIC" emerge -1 dev-db/mysql) does not work for me: It makes the mysql build fail during configure:

>>> Failed to emerge dev-db/mysql-5.0.72-r1, Log file:

>>>  '/mnt/sda5/usr-tmp-portage/portage/dev-db/mysql-5.0.72-r1/temp/build.log'

 * Messages for package dev-db/mysql-5.0.72-r1:

 * Your CXXFLAGS contains "-fPIC" which can break packages.
 *
 * Before you file a bug, please remove these flags and
 * re-compile the package in question as well as all its dependencies
 * Berkeley DB support is deprecated and will be removed in future versions!
 * MySQL MY_DATADIR is /var/lib/mysql
 * MySQL datadir found in /var/lib/mysql
 * A new one will not be created.
 * Berkeley DB support was disabled due to build failures
 * on multiple arches, go to a version earlier than 5.0.60
 * if you want it again. Gentoo bug #224067.
 *
 * ERROR: dev-db/mysql-5.0.72-r1 failed.
 * Call stack:
 *               ebuild.sh, line   49:  Called src_compile
 *             environment, line 3695:  Called mysql_src_compile
 *             environment, line 3288:  Called econf '--libexecdir=/usr/sbin' '--sysconfdir=/etc/mysql' '--localstatedir=/var/lib/mysql' '--sharedstatedir=/usr/share/mysql' '--libdir=/usr/lib64/mysql' '--includedir=/usr/include/mysql' '--with-low-memory' '--with-client-ldflags=-lstdc++' '--enable-thread-safe-client' '--with-comment=Gentoo Linux mysql-5.0.72-r1' '--without-docs' '--without-big-tables' '--enable-local-infile' '--with-extra-charsets=all' '--with-mysqld-user=mysql' '--with-server' '--with-unix-socket-path=/var/run/mysqld/mysqld.sock' '--without-libwrap' '--enable-shared' '--enable-static' '--without-debug' '--with-charset=utf8' '--with-collation=utf8_general_ci' '--with-embedded-privilege-control' '--with-embedded-server' '--with-bench' '--enable-assembler' '--with-extra-tools' '--with-innodb' '--without-readline' '--with-openssl' '--without-berkeley-db' '--with-geometry' '--without-ndbcluster'
 *               ebuild.sh, line  529:  Called die
 * The specific snippet of code:
 *                      die "econf failed"
 *  The die message:
 *   econf failed
 *
 * If you need support, post the topmost build error, and the call stack if relevant.
 * A complete build log is located at '/mnt/sda5/usr-tmp-portage/portage/dev-db/mysql-5.0.72-r1/temp/build.log'.
 * The ebuild environment file is located at '/mnt/sda5/usr-tmp-portage/portage/dev-db/mysql-5.0.72-r1/temp/environment'.

That error does not occur without that cflags hacking ...
Comment 49 Magnus O. Hansen 2009-01-12 06:56:00 UTC
(In reply to comment #34)
> As the sole active MySQL maintainer, it seems that nearly everybody here has
> ignored my responses in comment #7 and comment #10.
> 
> I will NOT accept patches that just modify the existing stuff to build the .a
> library with -fPIC. We need to have a libmysqld.so instead. It is on my TODO
> list, but I just haven't got there yet. Please stop using your .a -fPIC hack,
> it has the potential to cause other problems.
> 

So the easiest solution for getting Amarok2 on Gentoo (amd64 only?) is to wait until the mysql ebuild is updated with some way of providing additional shared libs that will satisfy the needs of Amarok2 - correct?

Any more information at this point when that will be worked on?

Comment 50 manolis 2009-01-20 12:48:24 UTC
If the only one ebuild that uses Mysql embedded as PIC is amarok, and since the mysqlebedded is only needed in linking and not runtime. Why not make amarok ebuild to build "temporary" only the needed pic library before it compiles/links itshelf?
It seems stupid to me, to have an "extra" version of mysql only to link amarok...
Comment 51 Markos Chandras (RETIRED) gentoo-dev 2009-01-20 20:50:38 UTC
(In reply to comment #48)
> (source /etc/make.conf && CFLAGS="${CFLAGS} -DPIC -fPIC"
> CXXFLAGS="${CXXFLAGS}} -DPIC -fPIC" emerge -1 dev-db/mysql) does not work for
> me: It makes the mysql build fail during configure:
> .... ...

Unfortunately, same thing happen here :( . I remember being able to build mysql with this hack in the past, but it doesnt work now :(

Comment 52 Peter Alfredsen (RETIRED) gentoo-dev 2009-01-28 18:40:30 UTC
*** Bug 256310 has been marked as a duplicate of this bug. ***
Comment 53 Patrizio Bassi 2009-02-08 10:27:25 UTC
actually for me amarok doesn't compile even with PIC fix in mysql.

--as-needed problem???

[ 92%] Building CXX object src/scriptengine/generator/generator/CMakeFiles/qtscript_gui.dir/generated_cpp/com_trolltech_qt_gui/qtscriptshell_QWizardPage.o                              
[ 92%] Building CXX object src/scriptengine/generator/generator/CMakeFiles/qtscript_gui.dir/generated_cpp/com_trolltech_qt_gui/qtscriptshell_QWorkspace.o                               
Linking CXX shared module ../../../../lib/libqtscript_gui.so                                                                                                                            
[ 92%] Built target qtscript_gui                                                                                                                                                        
make: *** [all] Error 2       

Portage 2.1.6.7 (default/linux/amd64/2008.0/desktop, gcc-4.3.3, glibc-2.9_p20081201-r1, 2.6.28 x86_64)
=================================================================                                     
System uname: Linux-2.6.28-x86_64-Intel-R-_Core-TM-2_CPU_6300_@_1.86GHz-with-glibc2.2.5               
Timestamp of tree: Sat, 07 Feb 2009 10:45:01 +0000                                                    
distcc 3.1 x86_64-pc-linux-gnu [disabled]                                                             
ccache version 2.4 [disabled]                                                                         
app-shells/bash:     3.2_p48                                                                          
dev-java/java-config: 1.3.7-r1, 2.1.7                                                                 
dev-lang/python:     2.5.4-r2                                                                         
dev-python/pycrypto: 2.0.1-r6                                                                         
dev-util/ccache:     2.4-r8                                                                           
dev-util/cmake:      2.6.2-r1                                                                         
sys-apps/baselayout: 2.0.0                                                                            
sys-apps/openrc:     0.4.2                                                                            
sys-apps/sandbox:    1.3.2
sys-devel/autoconf:  2.13, 2.63
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.2
sys-devel/binutils:  2.19.1
sys-devel/gcc-config: 1.4.1
sys-devel/libtool:   2.2.6a
virtual/os-headers:  2.6.28-r1
ACCEPT_KEYWORDS="amd64 ~amd64"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-O3 -pipe -mtune=core2 -march=core2 -fomit-frame-pointer -mmmx -msse -msse2 -msse3 -mfpmath=sse"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /etc/mail/dspam /usr/lib/mozilla/defaults/pref /usr/share/config /var/run/dspam"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/env.d/java/ /etc/eselect/compiler /etc/eselect/postgresql /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/php/apache2-php5/ext-active/ /etc/php/cgi-php5/ext-active/ /etc/php/cli-php5/ext-active/ /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo /etc/texmf/language.dat.d /etc/texmf/language.def.d /etc/texmf/updmap.d /etc/texmf/web2c /etc/udev/rules.d"
CXXFLAGS="-O3 -pipe -mtune=core2 -march=core2 -fomit-frame-pointer -mmmx -msse -msse2 -msse3 -mfpmath=sse"
DISTDIR="/usr/portage/distfiles"
FEATURES="distlocks fixpackages parallel-fetch protect-owned sandbox sfperms strict unmerge-orphans userfetch"
GENTOO_MIRRORS="http://distfiles.gentoo.org http://distro.ibiblio.org/pub/linux/distributions/gentoo"
LANG="39"
LC_ALL="it_IT.utf8"
LDFLAGS="-Wl,-O1 -Wl,--sort-common -Wl,--enable-new-dtags -Wl,--as-needed -Wl,--hash-style=gnu"
LINGUAS="it"
MAKEOPTS="-j3"
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="/mnt/Dati/Gentoo/tmp/"
PORTDIR="/mnt/Dati/Gentoo/portage/"
PORTDIR_OVERLAY="/usr/local/portage/myportage"
SYNC="rsync://rsync.europe.gentoo.org/gentoo-portage"
USE="X a52 aac aalib ace acl acpi alias alsa amd64 ao apache2 audacious bash-completion branding bzip2 cairo caps cddb cdio cdparanoia cdr chroot clamav cli connectionstatus cracklib crypt cscope css ctype cups curl custom-cpuopts custom-optimization cvs daemon dbus dga dhcp directfb divx djbfft dri dvd dvdr dvdread emboss encode evo exif expat ffmpeg fftw firefox firefox3 flac fortran ftp gcj gd gdbm gif glibc-omitfp glitz glut gnutls gpm gstreamer gtk hal hddtemp iconv idn ipod ipv6 irc isdnlog java java6 javascript jpeg jpeg2k justify kde kde4 kdeenablefinal kdehiddenvisibility kqemu lame ldap libnotify libv4l2 lilo live lm_sensors lzo mad matroska mdnsresponder-compat midi mikmod mime mmx mmxext mng mono mozdevelop mp3 mp4 mp4live mpeg mpeg2 mplayer msn mudflap multilib musepack mysql ncurses network networkmanager nls nntp nptl nptlonly nsplugin ntfs nvidia oav ogg opengl openmp openssl pam pcre pdf perl php plasma png ppds pppd python qt3support qt4 quicktime readline reflection reiserfs rtc samba scanner sdl session slang smp sockets socks5 speex spell spl sse sse2 sse3 ssl ssse3startup-notification sysfs tao tcpd theora threads tiff truetype unicode usb userlocales v4l v4l2 vhook vorbis webkit wma wmf wxwindows x264 xanim xcomposite xine xml xorg xpm xprint xsl xulrunner xv xvid xvmc zlib" ALSA_CARDS="hda-intel" 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" LINGUAS="it" USERLAND="GNU" VIDEO_CARDS="vga nv nvidia"
Unset:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, FFLAGS, INSTALL_MASK, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS
Comment 54 Maciej Mrozowski gentoo-dev 2009-02-08 12:45:11 UTC
I wonder when people will finally learn to post *relevant* and *informative* part of build log...
Comment 55 Nicolas Uda 2009-02-09 17:49:41 UTC
> I wonder when people will finally learn to post *relevant* and *informative*
> part of build log...

Agreed but what he says there is valid. Amarok no longer compiles for some strange reason. I was able to compile it perfectly 2 months ago but now this hack doesn't want to work. And actually the useful stuff (i think):

[ 94%] Building CXX object src/collection/sqlcollection/CMakeFiles/amarok_collection-sqlcollection.dir/XesamCollectionBuilder.o
[ 94%] Building CXX object src/collection/sqlcollection/CMakeFiles/amarok_collection-sqlcollection.dir/SqlCollectionAdaptor.o
Linking CXX shared module ../../../lib/libamarok_collection-sqlcollection.so
[ 94%] Built target amarok_collection-sqlcollection
make: *** [all] Error 2
 * 
 * ERROR: media-sound/amarok-2.0.1.1 failed.
 * Call stack:
 *               ebuild.sh, line   49:  Called src_compile
 *             environment, line 3155:  Called kde4-base_src_compile
 *             environment, line 2284:  Called kde4-base_src_make
 *             environment, line 2344:  Called cmake-utils_src_make
 *             environment, line  805:  Called die
 * The specific snippet of code:
 *           emake "$@" || die "Make failed!";
 *  The die message:
 *   Make 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/media-sound/amarok-2.0.1.1/temp/build.log'.
 * The ebuild environment file is located at '/var/tmp/portage/media-sound/amarok-2.0.1.1/temp/environment'.
 * 

>>> Failed to emerge media-sound/amarok-2.0.1.1, Log file:

>>>  '/var/tmp/portage/media-sound/amarok-2.0.1.1/temp/build.log'

 * Messages for package media-sound/amarok-2.0.1.1:

 * 
 * Compilation will fail if dev-db/mysql[-community] is built without -fPIC in your CFLAGS!
 * Related bug: http://bugs.gentoo.org/show_bug.cgi?id=238487
 * 
 * To fix this, and to avoid using -fPIC globally in your make.conf	(which is not recommended),
 * put the following into /etc/portage/env/dev-db/mysql (or	mysql-community, depending on which you use;
 * create dirs and the file if they don't exist):
 * 
 * CFLAGS="-march=k8 -msse3 -O2 -pipe -DPIC -fPIC"
 * CXXFLAGS="-march=k8 -msse3 -O2 -pipe -DPIC -fPIC"
 * 
 * 
 * ERROR: media-sound/amarok-2.0.1.1 failed.
 * Call stack:
 *               ebuild.sh, line   49:  Called src_compile
 *             environment, line 3155:  Called kde4-base_src_compile
 *             environment, line 2284:  Called kde4-base_src_make
 *             environment, line 2344:  Called cmake-utils_src_make
 *             environment, line  805:  Called die
 * The specific snippet of code:
 *           emake "$@" || die "Make failed!";
 *  The die message:
 *   Make 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/media-sound/amarok-2.0.1.1/temp/build.log'.
 * The ebuild environment file is located at '/var/tmp/portage/media-sound/amarok-2.0.1.1/temp/environment'.
 *


I am going to try using an earlier version of MySQL to see if that helps.
Comment 56 Tomáš Chvátal (RETIRED) gentoo-dev 2009-02-09 19:37:59 UTC
Actualy we need complete build log, and FYI we wont fix it in this bug i guess :P
Comment 57 Patrizio Bassi 2009-02-10 18:14:12 UTC
ok Tomas, my build log contains that...i mean it's just a partial part.

how to "unmask" cmake script and show normal gcc cmd and output?

i guess we should proced by steps:
1) include mysql patch in portage (and recompile)
2) recompile amarok and open a new bug.

do you agree?
Comment 58 Tomáš Chvátal (RETIRED) gentoo-dev 2009-02-10 18:18:39 UTC
(In reply to comment #57)
> ok Tomas, my build log contains that...i mean it's just a partial part.
> 
> how to "unmask" cmake script and show normal gcc cmd and output?
> 
> i guess we should proced by steps:
> 1) include mysql patch in portage (and recompile)
> 2) recompile amarok and open a new bug.
> 
> do you agree?
> 
The thing this bug is focused on the fpic issue, so you should open new bug and paste whole build.log file :]
we might spot what is wrong from that :]
Comment 59 Matt Whitlock 2009-02-10 18:24:11 UTC
The thing about cmake is that it keeps going, even after it encounters a fatal error in one module, to continue building as much as it can before exiting.  The intent is to reduce the amount of time you have to wait after correcting the small error.  It's not entirely appropriate for the Portage model, though, since Portage usually starts over with a virgin build environment every time.

You can more easily find the problem if, after Portage fails to build a cmake project, you invoke the 'ebuild' utility directly on the ebuild file in the Portage tree, specifying the 'compile' action.  Then cmake will pick up where it left off, it will immediately fail, and the cause of the problem will be the only thing in the log, since everything that could compile successfully has already done so in the first pass.
Comment 60 Patrizio Bassi 2009-02-10 20:51:57 UTC
ok i tried to be complete in 258501 
Comment 61 Nicolas Uda 2009-02-12 16:09:23 UTC
(In reply to comment #56)
> Actualy we need complete build log, and FYI we wont fix it in this bug i guess
> :P
> 

Ok ill continue to try and hackaway at this to see if i can find a solution but a assumed with would be the correct bug because it delt with the -fPIC flag not working. And for future reference can someone PLEASE tell me what you mean by full build log. Would that be (for my example) '/var/tmp/portage/media-sound/amarok-2.0.1.1/temp/build.log'.
Comment 62 Jorge Manuel B. S. Vicetto Gentoo Infrastructure gentoo-dev 2009-03-15 14:28:23 UTC
Created attachment 185083 [details]
Partial patch to MySQL build system to enable a shared libmysqld

This is the patch that Diego Pettenò (flameeyes) sent me yesterday after he worked on this issue. This patch fixes the issues of the previous patch and enables the build to go on further. It still fails, though.
I've been working on this and keep nagging him about this issue, so we're still making progress. I'll add a new patch later.
We've moved the work on this for mysql-5.0.76.
Comment 63 Leonid Podolny 2009-03-15 14:45:21 UTC
(In reply to comment #62)
> I've been working on this and keep nagging him about this issue, so we're still
> making progress. I'll add a new patch later.
> We've moved the work on this for mysql-5.0.76.
> 
Jorge,
Thanks for all the effort you put into this bug. Personally for me, this is very important, it's a no. 1 usability issue in gentoo.
Comment 64 Jorge Manuel B. S. Vicetto Gentoo Infrastructure gentoo-dev 2009-03-15 16:32:07 UTC
Created attachment 185098 [details]
Partial patch to MySQL build system to enable a shared libmysqld

Updated patch for the MySQL build system. It reverts the work on ha_myisam and now allows to go further in the build process. It's currently failing on sql/*.
Comment 65 Jorge Manuel B. S. Vicetto Gentoo Infrastructure gentoo-dev 2009-03-16 05:23:12 UTC
Created attachment 185133 [details, diff]
Update to MySQL build system to enable a shared libmysqld

Current state of the patch
Comment 66 Jorge Manuel B. S. Vicetto Gentoo Infrastructure gentoo-dev 2009-03-29 01:33:25 UTC
Created attachment 186606 [details, diff]
Update to MySQL build system to enable a shared libmysqld 

First working version of the patch. This needs some testing and may require some clean-ups, but is working on my box.
Comment 67 Jorge Manuel B. S. Vicetto Gentoo Infrastructure gentoo-dev 2009-03-29 13:29:31 UTC
I just want to leave a note here that I finally got amarok-2.0.2 working on amd64 and I have the collection working. The updated amarok ebuild has been added to the kde-testing overlay. I'll talk to Robin to see if we can do anything about a testing mysql version.
Please don't add any comments here about amarok-2 working. If you want, talk to us in #gentoo-kde, mail me or move to the amarok-2.0.2 bump bug.
Comment 68 Dror Levin (RETIRED) gentoo-dev 2009-03-29 22:55:24 UTC
dev-db/mysql-5.0.76 merged successfully with the patch on my ~amd64 system, and produced the long awaited libmysqld.so :)
Amarok 2.0.1.1 also compiled fine and now runs well.
Thanks for all your hard work! It really is very much appreciated.

Here's more info, thought it might help:

$ ls /usr/lib/mysql/libmysqld.so.0.0.0
-rwxr-xr-x 1 root root 4.8M 2009-03-30 01:28 /usr/lib/mysql/libmysqld.so.0.0.0

emerge --info:
Portage 2.2_rc28 (default/linux/amd64/2008.0, gcc-4.3.3, glibc-2.9_p20081201-r2, 2.6.29 x86_64)
=================================================================
System uname: Linux-2.6.29-x86_64-Intel-R-_Core-TM-2_Duo_CPU_T8300_@_2.40GHz-with-gentoo-2.0.0
Timestamp of tree: Sun, 29 Mar 2009 20:25:01 +0000
app-shells/bash:     4.0_p10-r1
dev-java/java-config: 2.1.7
dev-lang/python:     2.6.1-r1
dev-python/pycrypto: 2.0.1-r8
dev-util/cmake:      2.6.3
sys-apps/baselayout: 2.0.0
sys-apps/openrc:     0.4.3-r1
sys-apps/sandbox:    1.6
sys-devel/autoconf:  2.13, 2.63
sys-devel/automake:  1.5, 1.7.9-r1, 1.9.6-r2, 1.10.2
sys-devel/binutils:  2.19.1-r1
sys-devel/gcc-config: 1.4.1
sys-devel/libtool:   2.2.6a
virtual/os-headers:  2.6.28-r1
ACCEPT_KEYWORDS="amd64 ~amd64"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-march=core2 -O2 -pipe"
CHOST="x86_64-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 /var/lib/hsqldb"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/env.d/java/ /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo /etc/texmf/language.dat.d /etc/texmf/language.def.d /etc/texmf/updmap.d /etc/texmf/web2c /etc/udev/rules.d"
CXXFLAGS="-march=core2 -O2 -pipe"
DISTDIR="/usr/portage/distfiles"
EMERGE_DEFAULT_OPTS="--with-bdeps y --keep-going --jobs=3"
FEATURES="distlocks fixpackages parallel-fetch preserve-libs protect-owned sandbox sfperms strict unmerge-orphans userfetch usersync"
GENTOO_MIRRORS="http://mirror.isoc.org.il/pub/gentoo http://distfiles.gentoo.org http://www.ibiblio.org/pub/Linux/distributions/gentoo"
LANG="he_IL.UTF-8"
LDFLAGS="-Wl,--as-needed -Wl,--hash-style=gnu"
LINGUAS="en he"
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"
PORTDIR_OVERLAY="/usr/local/portage/layman/java-overlay /usr/local/portage/layman/mozilla"
SYNC="rsync://dagobah/gentoo-portage"
USE="X a52 aac acl acpi aiglx aim alsa amd64 amr amrnb amrwb bash-completion berkdb bidi bugzilla bzip2 cairo cdr cli cracklib crypt cscope cups cupsddk curl dbus dell dga divx dri dts dvd dvdr dvdread enca encode exif ffmpeg firefox flac fortran gd gdbm gif git glib glitz gpg gpm gstreamer gtk hal iconv icq icu idn ieee1394 ipv6 isdnlog jabber java java5 java6 jpeg jpeg2k juju kde lame latex lyx mad matroska midi mmx mng mozilla mp3 mp4 mpeg mpeg2 mpeg4 mplayer msn mudflap multilib ncurses network networkmanager nls nptl nptlonly nsplugin ntp ogg opengl openmp oscar pam pch pcre pdf plasma png pppd python qt3 qt3support qt4 quicktime readline reflection sasl sdl session smp speex spell spl sqlite sqlite3 srt sse sse2 ssl ssse3 subversion svg symlink sysfs tcpd theora threads tiff truetype unicode usb v4l2 vdpau vim-syntax vorbis webdav webkit wifi x264 xcb xcomposite xine xinerama xorg xulrunner xv xvid zlib" ALSA_CARDS="hda-intel" 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="evdev keyboard mouse synaptics" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="en he" USERLAND="GNU" VIDEO_CARDS="vesa nv nvidia"
Unset:  CPPFLAGS, CTARGET, FFLAGS, INSTALL_MASK, LC_ALL, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS
Comment 69 Jorge Manuel B. S. Vicetto Gentoo Infrastructure gentoo-dev 2009-03-30 03:01:02 UTC
Created attachment 186704 [details, diff]
Update to MySQL build system to enable a shared libmysqld

Cleaned-up the patch a bit and got readline and libedit to build with libtool.
Comment 70 Alex Alexander (RETIRED) gentoo-dev 2009-03-30 10:42:34 UTC
tested the latest mysql patch, works nicely =]
also tested amarok 2.0.2 (with external qtscriptgenerator), which builds and works OK with it :D

thank you for your hard work Jorge!
Comment 71 Rafał Mużyło 2009-04-03 22:49:23 UTC
While patch from comment 69 doesn't seem to break anything,
at least on x86 with USE="perl ssl" (yes, I'm not using
embedded, was simply curious about this patch), it creates
text relocations in libmysys.so.
Result of 'scanelf -qRT .' on WORKDIR is:
  libmysys.so.0.0.0: tab_jisx0208_uni9 [0x313B5] in (optimized out: previous .strstr_end) [0x313AB]
  ./.libs/libmysys.so.0.0.0

So, perhaps somebody should get a look at that, before it gets committed.
Comment 72 Mohammed Khoory 2009-04-05 03:28:46 UTC
I haven't seen this mentioned here, so I just wanted to say that this problem isn't only happening with dev-db/mysql-community. It seems to happen with dev-db/mysql as well.
Comment 73 Rafał Mużyło 2009-04-05 22:01:03 UTC
(In reply to comment #72)
> I haven't seen this mentioned here, so I just wanted to say that this problem
> isn't only happening with dev-db/mysql-community. It seems to happen with
> dev-db/mysql as well.
> 

In that case, look more closely - this bug is talking about both of them.

One more thing I forgot to mention last time:
it seems mysql.eclass wasn't updated, when eutoreconf
became recursive - the result is that eautoreconf is run twice
on innobase dir.
Comment 74 Robin Johnson archtester Gentoo Infrastructure gentoo-dev Security 2009-04-06 01:17:57 UTC
jmbsvicetto/flameeyes:
1. So far it's very very close, but not quite perfect yet. It works on my 'common' desktop box, but I'm seeing failures under hardened.
2. Could you look at those textrels, I think they might be causing some obscure failures in my testcases.
3. I think the prefix devs might be able to tell us more conclusively if dropping the Darwin bits are going to cause problems for them.
4. Per my .away, I'm offline April 6-9.
Comment 75 Jorge Manuel B. S. Vicetto Gentoo Infrastructure gentoo-dev 2009-04-06 17:05:36 UTC
I'm not getting any textrels on my default amd64 install.
Can anyone getting the textrels either attach the zip of the emerge log or send it to me through mail?
Comment 76 Rafał Mużyło 2009-04-07 12:00:11 UTC
Created attachment 187558 [details]
my build.log with patch from comment 69

Well, actually my comment seems to have more info,
than the log, but if you really want it...
Comment 77 Fabian Groffen gentoo-dev 2009-04-07 16:13:12 UTC
I would like to try this patch out to tell you if Darwin is affected or not, but I'm probably just too stupid.  Is there an easy way to apply it before autoreconf is run, without hacking the eclass or faking a patchball myself?  I'm probably just overlooking it.  Running autoreconf three times takes ages here.
Comment 78 Rafał Mużyło 2009-04-08 01:40:35 UTC
After reading (and greping) a bit more,
I think the source of that TEXTREL
may be strings/strings-x86.s.
The strange thing is that 'scanelf -qT' on the installed
lib results in:
libmysys.so: strstr [0x31B35] in (optimized out: previous strinstr) [0x31B2B]
  /usr/lib/mysql/libmysys.so

I wonder, what's the reason of this difference
(or is that actually the effect of a TEXTREL ?)
Comment 79 Rafał Mużyło 2009-04-08 15:24:24 UTC
Perhaps, the experts may give some insight.
Lets hear it from that team.
Comment 80 Fabian Groffen gentoo-dev 2009-04-09 18:09:40 UTC
The patch does not seem to break the darwin build, and the mysqld seems to function properly afterwards as well.
Comment 81 PaX Team 2009-04-09 21:35:03 UTC
(In reply to comment #78)
> The strange thing is that 'scanelf -qT' on the installed
> lib results in:
> libmysys.so: strstr [0x31B35] in (optimized out: previous strinstr) [0x31B2B]
>   /usr/lib/mysql/libmysys.so

this is due to the 'call strstr' in strinstr, it should go through the plt instead: call strstr@plt or something like that.
Comment 82 Rafał Mużyło 2009-04-09 23:24:28 UTC
(In reply to comment #81)
>
> this is due to the 'call strstr' in strinstr, it should go through the plt
> instead: call strstr@plt or something like that.
> 
This seems to work.
Any hints what should I read, to learn about it,
cause I see textrels in one of transcode plugins
(probably caused by 'lea 0f, %%edx' line of aclib/memcpy.c), so perhaps
 I should consider learning more about it ?

Comment 83 Jorge Manuel B. S. Vicetto Gentoo Infrastructure gentoo-dev 2009-04-11 21:28:57 UTC
Created attachment 188019 [details, diff]
Update to MySQL build system to enable a shared libmysqld

Added to the patch the changes proposed to fix the textrel issues.
Comment 84 PaX Team 2009-04-11 21:49:56 UTC
(In reply to comment #82)
> Any hints what should I read, to learn about it,
> cause I see textrels in one of transcode plugins
> (probably caused by 'lea 0f, %%edx' line of aclib/memcpy.c), so perhaps
>  I should consider learning more about it ?

http://www.gentoo.org/proj/en/hardened/pic-fix-guide.xml
Comment 85 Jorge Manuel B. S. Vicetto Gentoo Infrastructure gentoo-dev 2009-04-11 22:57:36 UTC
Created attachment 188025 [details, diff]
Partial patch to MySQL build system to enable a shared libmysqld

Seems the last attachment was broken. This one is based on the previous one with the fix for the textrels.
Comment 86 Robin Johnson archtester Gentoo Infrastructure gentoo-dev Security 2009-04-11 23:47:34 UTC
We're very close now. I'm just working on final test runs, the patch now lives in the mysql-extras repo, and I'm going to mark the old ones obsolete.
http://git.overlays.gentoo.org/gitweb/?p=proj/mysql-extras.git;a=summary
Comment 87 Robin Johnson archtester Gentoo Infrastructure gentoo-dev Security 2009-04-11 23:48:12 UTC
Comment on attachment 168288 [details]
Mysql eclass with experimental pic support

Forcing -fPIC wasn't the real solution.
Comment 88 Robin Johnson archtester Gentoo Infrastructure gentoo-dev Security 2009-04-11 23:48:17 UTC
Comment on attachment 170337 [details, diff]
mysql_eclass_pic.patch

Forcing -fPIC wasn't the real solution.
Comment 89 Robin Johnson archtester Gentoo Infrastructure gentoo-dev Security 2009-04-11 23:48:34 UTC
Comment on attachment 188025 [details, diff]
Partial patch to MySQL build system to enable a shared libmysqld

Obsoleted by the version in the mysql-extras repo.
Comment 90 Robin Johnson archtester Gentoo Infrastructure gentoo-dev Security 2009-04-11 23:48:58 UTC
Comment on attachment 188025 [details, diff]
Partial patch to MySQL build system to enable a shared libmysqld

Obsoleted by the version in the mysql-extras repo.
Comment 91 Robin Johnson archtester Gentoo Infrastructure gentoo-dev Security 2009-04-12 00:11:53 UTC
mysql-5.0.76-r1 is in the tree now.
No mysql-community with the patch yet, I've got to go out now.
Also to come, porting it to mysql-5.0.79 that was recently released (unless 5.0.80 comes out first).
Comment 92 Jorge Manuel B. S. Vicetto Gentoo Infrastructure gentoo-dev 2009-04-12 05:22:40 UTC
Created attachment 188057 [details, diff]
Update to MySQL build system to enable a shared libmysqld 

For completeness, here's a modified patch for mysql-community-5.0.77.
Comment 93 Mikko C. 2009-04-12 07:37:13 UTC
I just installed dev-db/mysql-5.0.76-r1 from portage.
For some reason Amarok still fails:

/usr/lib/gcc/x86_64-pc-linux-gnu/4.3.3/../../../../x86_64-pc-linux-gnu/bin/ld: /usr/lib64/mysql/libmysqld.a(libmysqld.o): relocation R_X86_64_32S against `embedded_methods' can not be used when making a shared object; recompile with -fPIC
/usr/lib64/mysql/libmysqld.a: could not read symbols: Bad value
collect2: ld returned 1 exit status
Comment 94 Robin Johnson archtester Gentoo Infrastructure gentoo-dev Security 2009-04-12 07:46:49 UTC
jmbsvicetto: thanks for porting, done in mysql-community-5.0.77-r1 now too.

mikko.cal: it should be using the libmysqld.so, not the .a.

kde: your bug again.
Comment 95 Mikko C. 2009-04-12 07:48:50 UTC
Nevermind, I delete the CMake cache and now it works, thanks!
Comment 96 Matt Whitlock 2009-04-12 08:16:53 UTC
 *
 * Compilation will fail if dev-db/mysql[-community] is built without -fPIC in your CFLAGS!
 * Related bug: http://bugs.gentoo.org/show_bug.cgi?id=238487
 *
 * To fix this, and to avoid using -fPIC globally in your make.conf (which is not recommended),
 * put the following into /etc/portage/env/dev-db/mysql (or mysql-community, depending on which you use;
 * create dirs and the file if they don't exist):
 *
 * CFLAGS="-march=native -O3 -pipe -DPIC -fPIC"
 * CXXFLAGS="-march=native -O3 -pipe -DPIC -fPIC"
 *

This comment should probably be removed from the media-sound/amarok-2.0.1.1 ebuild now.

Before:
-rwxr-xr-x 1 root root 8471216 2009-01-15 03:08 /usr/lib64/kde4/libamarok_collection-sqlcollection.so*
        libmysqlclient.so.15 => /usr/lib64/libmysqlclient.so.15 (0x00007f5765b67000)

After:
-rwxr-xr-x 1 root root 521624 2009-04-12 04:15 /usr/lib64/kde4/libamarok_collection-sqlcollection.so*
        libmysqld.so.0 => /usr/lib64/libmysqld.so.0 (0x00007f58ba079000)
        libmysqlclient.so.15 => /usr/lib64/libmysqlclient.so.15 (0x00007f58b9cfe000)
        libheap.so.0 => /usr/lib64/mysql/libheap.so.0 (0x00007f58b0b9c000)
        libinnobase.so.0 => /usr/lib64/mysql/ib/libinnobase.so.0 (0x00007f58b0846000)
        libmysys.so.0 => /usr/lib64/mysql/libmysys.so.0 (0x00007f58b04c7000)
        libvio.so.0 => /usr/lib64/mysql/libvio.so.0 (0x00007f58b02c1000)

Nice work, everyone!
Comment 97 Mikko C. 2009-04-12 08:27:27 UTC
Ok, Amarok compiles, but it doesn't work!
Starting Amarok the first time results in a crash which can be solved by deleting the database:
rm -rf $HOME/.kde/share/apps/amarok/my*

After that a new database should be created, but it seems not. This is the last part of the output of a full collection re-scan:



   1.
      amarok: [ERROR!] GREPME MySQLe query failed! No database selected on "SELECT id, changedate FROM directories_temp WHERE deviceid = -1 AND dir = './mnt/mybook/Mp3/Z/Zombies, The - [1968] Odessey And Oracle/';"
   2.
      amarok: [ERROR!] GREPME MySQLe query failed! No database selected on "INSERT INTO urls_temp(directory,deviceid,rpath,uniqueid) VALUES ( 0, -1, './mnt/mybook/Mp3/Z/Zombies, The - [1968] Odessey And Oracle/12 - Time of the Season.mp3', 'amarok-sqltrackuid://8b5a3c4347ed2261f3105b3817acad83' );"
   3.
      amarok: [ERROR!] GREPME MySQLe query failed! No database selected on "REPLACE INTO tracks_temp(url,artist,album,genre,composer,year,title,comment,tracknumber,discnumber,bitrate,length,samplerate,filesize,filetype,bpm,createdate,modifydate,albumgain,albumpeakgain,trackgain,trackpeakgain) VALUES ( 0,0,0,0,0,0,'Time of the Season','',12,0,192,214,44100,5142656,0,0,1201893948,1200164249,NULL,NULL,NULL,NULL);"
   4.
      amarok: END__: void ScanResultProcessor::processDirectory(const QList<QMap<QString, QVariant> >&) - Took 0.054s
   5.
      amarok: [ERROR!] GREPME MySQLe query failed! No database selected on "DELETE FROM composers;"
   6.
      amarok: [ERROR!] GREPME MySQLe query failed! No database selected on "DELETE FROM genres;"
   7.
      amarok: [ERROR!] GREPME MySQLe query failed! No database selected on "DELETE FROM images;"
   8.
      amarok: [ERROR!] GREPME MySQLe query failed! No database selected on "DELETE FROM albums;"
   9.
      amarok: [ERROR!] GREPME MySQLe query failed! No database selected on "DELETE FROM years;"
  10.
      amarok: [ERROR!] GREPME MySQLe query failed! No database selected on "DELETE FROM artists;"
  11.
      amarok: [ERROR!] GREPME MySQLe query failed! No database selected on "DELETE FROM tracks;"
  12.
      amarok: [ERROR!] GREPME MySQLe query failed! No database selected on "DELETE FROM urls;"
  13.
      amarok: [ERROR!] GREPME MySQLe query failed! No database selected on "DELETE FROM directories"
  14.
      amarok: BEGIN: void DatabaseUpdater::copyToPermanentTables()
  15.
      amarok: [ERROR!] GREPME MySQLe query failed! No database selected on "SELECT artists.id FROM artists;"
  16.
      amarok: [ERROR!] GREPME MySQLe query failed! No database selected on "INSERT INTO artists SELECT * FROM artists_temp WHERE artists_temp.id NOT IN ( -1 );"
  17.
      amarok: [ERROR!] GREPME MySQLe query failed! No database selected on "DELETE FROM images;"
  18.
      amarok: [ERROR!] GREPME MySQLe query failed! No database selected on "INSERT INTO images SELECT * FROM images_temp;"
  19.
      amarok: [ERROR!] GREPME MySQLe query failed! No database selected on "SELECT albums.id FROM albums;"
  20.
      amarok: [ERROR!] GREPME MySQLe query failed! No database selected on "INSERT INTO albums SELECT * FROM albums_temp WHERE albums_temp.id NOT IN ( -1 );"
  21.
      amarok: [ERROR!] GREPME MySQLe query failed! No database selected on "SELECT composers.id FROM composers;"
  22.
      amarok: [ERROR!] GREPME MySQLe query failed! No database selected on "INSERT INTO composers SELECT * FROM composers_temp WHERE composers_temp.id NOT IN ( -1 );"
  23.
      amarok: [ERROR!] GREPME MySQLe query failed! No database selected on "SELECT genres.id FROM genres;"
  24.
      amarok: [ERROR!] GREPME MySQLe query failed! No database selected on "INSERT INTO genres SELECT * FROM genres_temp WHERE genres_temp.id NOT IN ( -1 );"
  25.
      amarok: [ERROR!] GREPME MySQLe query failed! No database selected on "SELECT years.id FROM years;"
  26.
      amarok: [ERROR!] GREPME MySQLe query failed! No database selected on "INSERT INTO years SELECT * FROM years_temp WHERE years_temp.id NOT IN ( -1 );"
  27.
      amarok: [ERROR!] GREPME MySQLe query failed! No database selected on "SELECT urls.id FROM urls;"
  28.
      amarok: [ERROR!] GREPME MySQLe query failed! No database selected on "REPLACE INTO urls SELECT * FROM urls_temp;"
  29.
      amarok: [ERROR!] GREPME MySQLe query failed! No database selected on "DELETE FROM directories;"
  30.
      amarok: [ERROR!] GREPME MySQLe query failed! No database selected on "INSERT INTO directories SELECT * FROM directories_temp;"
  31.
      amarok: [ERROR!] GREPME MySQLe query failed! No database selected on "SELECT tracks.id FROM tracks;"
  32.
      amarok: [ERROR!] GREPME MySQLe query failed! No database selected on "REPLACE INTO tracks SELECT * FROM tracks_temp;"
  33.
      amarok: BEGIN: void ScanManager::slotFinished()
  34.
      amarok: END__: void ScanManager::slotFinished() - Took 0.00016s
  35.
      amarok: END__: void DatabaseUpdater::copyToPermanentTables() - Took 0.18s
  36.
      amarok: BEGIN: void DatabaseUpdater::removeTemporaryTables()
  37.
      amarok: [ERROR!] GREPME MySQLe query failed! No database selected on "DROP TABLE tracks_temp;"
  38.
      amarok: [ERROR!] GREPME MySQLe query failed! No database selected on "DROP TABLE images_temp;"
  39.
      amarok: [ERROR!] GREPME MySQLe query failed! No database selected on "DROP TABLE albums_temp;"
  40.
      amarok: [ERROR!] GREPME MySQLe query failed! No database selected on "DROP TABLE genres_temp;"
  41.
      amarok: [ERROR!] GREPME MySQLe query failed! No database selected on "DROP TABLE years_temp;"
  42.
      amarok: [ERROR!] GREPME MySQLe query failed! No database selected on "DROP TABLE composers_temp;"
  43.
      amarok: [ERROR!] GREPME MySQLe query failed! No database selected on "DROP TABLE artists_temp;"
  44.
      amarok: [ERROR!] GREPME MySQLe query failed! No database selected on "DROP TABLE urls_temp;"
  45.
      amarok: [ERROR!] GREPME MySQLe query failed! No database selected on "DROP TABLE directories_temp"
  46.
      amarok: END__: void DatabaseUpdater::removeTemporaryTables() - Took 0.001s
  47.
      amarok: Sending changed signal
  48.
      amarok: BEGIN: virtual ScanResultProcessor::~ScanResultProcessor()
  49.
      amarok: END__: virtual ScanResultProcessor::~ScanResultProcessor() - Took 8.8e-05s 
Comment 98 H.-Peter Pfeufer 2009-04-12 08:58:48 UTC
Well, I have another failure now, after update mysql:

Building CXX object src/scriptengine/generator/generator/CMakeFiles/qtscript_gui.dir/generated_cpp/com_trolltech_qt_gui/qtscriptshell_QTextFrame.o              
make[2]: *** [src/scriptengine/generator/generator/CMakeFiles/qtscript_gui.dir/generated_cpp/com_trolltech_qt_gui/qtscriptshell_QTextCodecPlugin.o] Fehler 1    
make[2]: *** Warte auf noch nicht beendete Prozesse...                          
make[1]: *** [src/scriptengine/generator/generator/CMakeFiles/qtscript_gui.dir/all] Fehler 2                                                                    
make: *** [all] Fehler 2                                                        
 *                                                                              
 * ERROR: media-sound/amarok-2.0.1.1 failed.                                    
 * Call stack:                                                                  
 *               ebuild.sh, line   49:  Called src_compile                      
 *             environment, line 3223:  Called kde4-base_src_compile            
 *             environment, line 2418:  Called cmake-utils_src_compile          
 *             environment, line  792:  Called cmake-utils_src_make             
 *             environment, line  871:  Called die                              
 * The specific snippet of code:                                                
 *           emake "$@" || die "Make failed!";                                  
 *  The die message:                                                            
 *   Make failed!
Comment 99 Jorge Manuel B. S. Vicetto Gentoo Infrastructure gentoo-dev 2009-04-12 09:25:05 UTC
I have to update amarok in the tree. I meant to do it yesterday, but opted to look at mysql-coummnity instead. Please wait for a new version in the tree today.
The issue is no longer mysql, so please don't add more comments here.
Comment 100 Jason A. Donenfeld archtester Gentoo Infrastructure gentoo-dev Security 2009-04-18 08:36:37 UTC
I too am having this error!

(In reply to comment #97)
> Ok, Amarok compiles, but it doesn't work!
> Starting Amarok the first time results in a crash which can be solved by
> deleting the database:
> rm -rf $HOME/.kde/share/apps/amarok/my*
> 
> After that a new database should be created, but it seems not. This is the last
> part of the output of a full collection re-scan:
> 
> 
> 
>    1.
>       amarok: [ERROR!] GREPME MySQLe query failed! No database selected on
> "SELECT id, changedate FROM directories_temp WHERE deviceid = -1 AND dir =
> './mnt/mybook/Mp3/Z/Zombies, The - [1968] Odessey And Oracle/';"
>    2.
>       amarok: [ERROR!] GREPME MySQLe query failed! No database selected on
> "INSERT INTO urls_temp(directory,deviceid,rpath,uniqueid) VALUES ( 0, -1,
> './mnt/mybook/Mp3/Z/Zombies, The - [1968] Odessey And Oracle/12 - Time of the
> Season.mp3', 'amarok-sqltrackuid://8b5a3c4347ed2261f3105b3817acad83' );"
>    3.
>       amarok: [ERROR!] GREPME MySQLe query failed! No database selected on
> "REPLACE INTO
> tracks_temp(url,artist,album,genre,composer,year,title,comment,tracknumber,discnumber,bitrate,length,samplerate,filesize,filetype,bpm,createdate,modifydate,albumgain,albumpeakgain,trackgain,trackpeakgain)
> VALUES ( 0,0,0,0,0,0,'Time of the
> Season','',12,0,192,214,44100,5142656,0,0,1201893948,1200164249,NULL,NULL,NULL,NULL);"
>    4.
>       amarok: END__: void ScanResultProcessor::processDirectory(const
> QList<QMap<QString, QVariant> >&) - Took 0.054s
>    5.
>       amarok: [ERROR!] GREPME MySQLe query failed! No database selected on
> "DELETE FROM composers;"
>    6.
>       amarok: [ERROR!] GREPME MySQLe query failed! No database selected on
> "DELETE FROM genres;"
>    7.
>       amarok: [ERROR!] GREPME MySQLe query failed! No database selected on
> "DELETE FROM images;"
>    8.
>       amarok: [ERROR!] GREPME MySQLe query failed! No database selected on
> "DELETE FROM albums;"
>    9.
>       amarok: [ERROR!] GREPME MySQLe query failed! No database selected on
> "DELETE FROM years;"
>   10.
>       amarok: [ERROR!] GREPME MySQLe query failed! No database selected on
> "DELETE FROM artists;"
>   11.
>       amarok: [ERROR!] GREPME MySQLe query failed! No database selected on
> "DELETE FROM tracks;"
>   12.
>       amarok: [ERROR!] GREPME MySQLe query failed! No database selected on
> "DELETE FROM urls;"
>   13.
>       amarok: [ERROR!] GREPME MySQLe query failed! No database selected on
> "DELETE FROM directories"
>   14.
>       amarok: BEGIN: void DatabaseUpdater::copyToPermanentTables()
>   15.
>       amarok: [ERROR!] GREPME MySQLe query failed! No database selected on
> "SELECT artists.id FROM artists;"
>   16.
>       amarok: [ERROR!] GREPME MySQLe query failed! No database selected on
> "INSERT INTO artists SELECT * FROM artists_temp WHERE artists_temp.id NOT IN (
> -1 );"
>   17.
>       amarok: [ERROR!] GREPME MySQLe query failed! No database selected on
> "DELETE FROM images;"
>   18.
>       amarok: [ERROR!] GREPME MySQLe query failed! No database selected on
> "INSERT INTO images SELECT * FROM images_temp;"
>   19.
>       amarok: [ERROR!] GREPME MySQLe query failed! No database selected on
> "SELECT albums.id FROM albums;"
>   20.
>       amarok: [ERROR!] GREPME MySQLe query failed! No database selected on
> "INSERT INTO albums SELECT * FROM albums_temp WHERE albums_temp.id NOT IN ( -1
> );"
>   21.
>       amarok: [ERROR!] GREPME MySQLe query failed! No database selected on
> "SELECT composers.id FROM composers;"
>   22.
>       amarok: [ERROR!] GREPME MySQLe query failed! No database selected on
> "INSERT INTO composers SELECT * FROM composers_temp WHERE composers_temp.id NOT
> IN ( -1 );"
>   23.
>       amarok: [ERROR!] GREPME MySQLe query failed! No database selected on
> "SELECT genres.id FROM genres;"
>   24.
>       amarok: [ERROR!] GREPME MySQLe query failed! No database selected on
> "INSERT INTO genres SELECT * FROM genres_temp WHERE genres_temp.id NOT IN ( -1
> );"
>   25.
>       amarok: [ERROR!] GREPME MySQLe query failed! No database selected on
> "SELECT years.id FROM years;"
>   26.
>       amarok: [ERROR!] GREPME MySQLe query failed! No database selected on
> "INSERT INTO years SELECT * FROM years_temp WHERE years_temp.id NOT IN ( -1 );"
>   27.
>       amarok: [ERROR!] GREPME MySQLe query failed! No database selected on
> "SELECT urls.id FROM urls;"
>   28.
>       amarok: [ERROR!] GREPME MySQLe query failed! No database selected on
> "REPLACE INTO urls SELECT * FROM urls_temp;"
>   29.
>       amarok: [ERROR!] GREPME MySQLe query failed! No database selected on
> "DELETE FROM directories;"
>   30.
>       amarok: [ERROR!] GREPME MySQLe query failed! No database selected on
> "INSERT INTO directories SELECT * FROM directories_temp;"
>   31.
>       amarok: [ERROR!] GREPME MySQLe query failed! No database selected on
> "SELECT tracks.id FROM tracks;"
>   32.
>       amarok: [ERROR!] GREPME MySQLe query failed! No database selected on
> "REPLACE INTO tracks SELECT * FROM tracks_temp;"
>   33.
>       amarok: BEGIN: void ScanManager::slotFinished()
>   34.
>       amarok: END__: void ScanManager::slotFinished() - Took 0.00016s
>   35.
>       amarok: END__: void DatabaseUpdater::copyToPermanentTables() - Took 0.18s
>   36.
>       amarok: BEGIN: void DatabaseUpdater::removeTemporaryTables()
>   37.
>       amarok: [ERROR!] GREPME MySQLe query failed! No database selected on
> "DROP TABLE tracks_temp;"
>   38.
>       amarok: [ERROR!] GREPME MySQLe query failed! No database selected on
> "DROP TABLE images_temp;"
>   39.
>       amarok: [ERROR!] GREPME MySQLe query failed! No database selected on
> "DROP TABLE albums_temp;"
>   40.
>       amarok: [ERROR!] GREPME MySQLe query failed! No database selected on
> "DROP TABLE genres_temp;"
>   41.
>       amarok: [ERROR!] GREPME MySQLe query failed! No database selected on
> "DROP TABLE years_temp;"
>   42.
>       amarok: [ERROR!] GREPME MySQLe query failed! No database selected on
> "DROP TABLE composers_temp;"
>   43.
>       amarok: [ERROR!] GREPME MySQLe query failed! No database selected on
> "DROP TABLE artists_temp;"
>   44.
>       amarok: [ERROR!] GREPME MySQLe query failed! No database selected on
> "DROP TABLE urls_temp;"
>   45.
>       amarok: [ERROR!] GREPME MySQLe query failed! No database selected on
> "DROP TABLE directories_temp"
>   46.
>       amarok: END__: void DatabaseUpdater::removeTemporaryTables() - Took
> 0.001s
>   47.
>       amarok: Sending changed signal
>   48.
>       amarok: BEGIN: virtual ScanResultProcessor::~ScanResultProcessor()
>   49.
>       amarok: END__: virtual ScanResultProcessor::~ScanResultProcessor() - Took
> 8.8e-05s 
> 

Comment 101 Patrizio Bassi 2010-03-20 13:10:18 UTC
has this been ported to 5.1?

because as you know that's a block with amarok ...