MySQL library initialization failed (on "init")

Jeff Mitchell mitchell at kde.org
Sat Oct 3 15:15:05 UTC 2009


Thomas Klausner wrote:
> On Sat, Oct 03, 2009 at 08:59:30AM -0400, Jeff Mitchell wrote:
>> If you want to test it and let me know how it goes, that would be great.
>> Change the lines from
>>
>> if( NOT WIN32 AND NOT APPLE )
>>     SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wl,--as-needed")
>> endif( NOT WIN32 AND NOT APPLE )
>>
>> to
>>
>> if(${CMAKE_SYSTEM_NAME} MATCHES "Linux")
>>     SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wl,--as-needed")
>> endif(${CMAKE_SYSTEM_NAME} MATCHES "Linux")
>>
>> You'll need a full rebuild (from a clean build dir) afterwards. Let me
>> know how it goes!
> 
> Thanks, Jeff.
> 
> I've used the attached patch.
> Now amarok complains much earlier, during startup I get a messagebox:
> 
> KLibLoader could not load the plugin:
> amarok_collection-mysqlecollection
> Error message:
> Cannot load library /usr/pkg/lib/kde4/amarok_collection-mysqlecollection.so: (Shared object "libmysqlclient.so.16" not found)
> 
> This looks like I need a "-Wl,-R/usr/pkg/mysqld/lib/mysql" (that's
> where I installed the libmysqlclient.so) when linking this object. Can
> someone tell me how/where to add that?

Try running cmake with

-DCMAKE_CXX_FLAGS='-Wl,-R/usr/pkg/mysqld/lib/mysql'

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 261 bytes
Desc: OpenPGP digital signature
URL: <http://mail.kde.org/pipermail/amarok/attachments/20091003/159491ad/attachment.sig>


More information about the Amarok mailing list