Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 247264 - MySQL builds some static libraries without -fPIC
Summary: MySQL builds some static libraries without -fPIC
Status: RESOLVED DUPLICATE of bug 238487
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: AMD64 Linux
: High normal (vote)
Assignee: Gentoo Linux bug wranglers
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-11-17 20:04 UTC by Maciej Mrozowski
Modified: 2008-11-19 09:26 UTC (History)
0 users

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 Maciej Mrozowski gentoo-dev 2008-11-17 20:04:13 UTC
MySQL is suspected to build its static libraries without -fPIC, resulting with build errors for some packages trying to link statically to them.

Prime example is amarok 2 beta (from upcoming KDE 4.2 release, currently in kde-testing and kde-crazy overlay) on AMD64 platform (x86 are unaffected) - that depends on mysql with 'embedded' USE flag enabled and likning statically to it.

So far, Gentoo KDE team as a workaround urged AMD64 users to recompile whole mysql with -fPIC (using portage/env way) and we know that it can't be considered permanent solution.

Splitting mysql ebuilds to library/server/embedded wouldn't hurt as well but it's separate bug.

Error message for amarok on amd64 (provides affected library name and at least one affected .o module):
<code>
Linking CXX shared module ../../../lib/libamarok_collection-sqlcollection.so                             
/usr/lib/gcc/x86_64-pc-linux-gnu/4.3.2/../../../../x86_64-pc-linux-gnu/bin/ld: /usr/lib64/mysql/libmysqld.a(client.o): relocation R_X86_64_32 against `mysql_server_last_error' 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                                                                      
make[2]: *** [lib/libamarok_collection-sqlcollection.so] Error 1                                         
make[1]: *** [src/collection/sqlcollection/CMakeFiles/amarok_collection-sqlcollection.dir/all] Error 2   
make: *** [all] Error 2                                                                                  
</code>

Applies to:
[ebuild   R   ] dev-db/mysql-5.0.70  USE="embedded ssl -berkdb -big-tables -cluster -debug -extraengine -latin1 -max-idx-128 -minimal -perl (-selinux) -static" 0 kB
Comment 1 Peter Alfredsen (RETIRED) gentoo-dev 2008-11-19 09:26:09 UTC

*** This bug has been marked as a duplicate of bug 238487 ***