Bug #80376 mysql router crashes on Mac OS X - linked libraries issues with plugins

Submitted: 15 Feb 2016 16:01 Modified: 5 Sep 2016 12:40
Reporter: Franck Horlaville Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Router Severity:S2 (Serious)
Version:2.0.2 OS:MacOS (v10.11)
Assigned to: Mats Kindahl CPU Architecture:Any
Tags: compiling, linking, plugins

[15 Feb 2016 16:01] Franck Horlaville
Description:
Hi,

Following the documentation on how to install MySQL Router on MacOSX, I have successfully compiled it and installed it in /usr/local/bin.

When I run it with the -h or -v options it runs fine, e.g:

$ sudo mysqlrouter -v
MySQL Router v2.0.2 on OS X v10.11 (64-bit) (GPL community edition)

When trying to use the fabric plugin however, I get a linking issue - apparently the @rpath variable doesn't contain the correct path.

$ sudo mysqlrouter 
Logging to /var/log/mysqlrouter/mysqlrouter.log
Error: dlopen(/usr/local/lib/mysqlrouter/fabric_cache.so, 9): Library not loaded: @rpath/logger.so
  Referenced from: /usr/local/lib/mysqlrouter/fabric_cache.so
  Reason: image not found

Please see below for attempted fixes and their results

Thanks a lot

Franck Horlaville

How to repeat:
Here is some additional information:

$ otool -L /usr/local/lib/mysqlrouter/fabric_cache.so
/usr/local/lib/mysqlrouter/fabric_cache.so:
	@rpath/fabric_cache.so (compatibility version 0.0.0, current version 0.0.0)
	@rpath/logger.so (compatibility version 0.0.0, current version 0.0.0)
	@rpath/libmysqlrouter.1.dylib (compatibility version 1.0.0, current version 0.0.0)
	libmysqlclient.18.dylib (compatibility version 18.0.0, current version 18.0.0)
	@rpath/libmysqlharness.0.dylib (compatibility version 0.0.0, current version 0.0.0)
	/usr/lib/libc++.1.dylib (compatibility version 1.0.0, current version 120.1.0)
	/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1226.10.1)

$ ls -iAlF /usr/local/lib/mysqlrouter/
total 1848
37927545 -rwxr-xr-x  1 root  wheel  432460 12 Feb 13:25 fabric_cache.so*
37927543 -rwxr-xr-x  1 root  wheel   23252 12 Feb 13:25 keepalive.so*
37927544 -rwxr-xr-x  1 root  wheel   89968 12 Feb 13:25 logger.so*
37927548 -rwxr-xr-x  1 root  wheel  396832 12 Feb 13:25 routing.so*

Suggested fix:
When replacing the @rpath with hard-coded locations in the cmake files I get past those initial errors but then arrive to others about the location of the mysql Harness libraries
[29 Mar 2016 9:13] Geert Vanderkelen
Since OS X 10.11 I am always using -DWITH_STATIC=yes option for building Router.
Can you check with that option?
[30 Apr 2016 1:00] Bugs System
No feedback was provided for this bug for over a month, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to "Open".
[29 Aug 2016 18:47] Philip Olson
Posted by developer:
 
Fixed as of the upcoming MySQL Router 2.0.4 release, and here's the changelog entry:

On OS X, linking Router to Fabric would fail to function by default due to
linking problems.

Thank you for the bug report.
[5 Sep 2016 12:40] Franck Horlaville
Thank you very much - is there a way to download this upcoming version already, such as a git repo? Or is there a planned release date?

Thanks!

Franck Horlaville

Portions of this website are copyright © 2001, 2002 The PHP Group

Page generated in 0.041 sec. using MySQL 8.4.7-u6-cloud

Timestamp references displayed by the system are UTC.
Content reproduced on this site is the property of the respective copyright holders.
It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.