Missing symbols for dialog.so on Mac OS X

Bug #1671357 reported by monty solomon
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Percona Server moved to https://jira.percona.com/projects/PS
New
Undecided
Unassigned

Bug Description

I built a fresh copy of Percona Server on OS X and then tried to use dialog.so with the Percona PAM authentication plugin for MySQL.

MySQL said: Authentication plugin 'dialog' cannot be loaded: dlopen(/usr/local/lib/plugin/dialog.so, 2): Symbol not found: _my_stpnmov
  Referenced from: /usr/local/lib/plugin/dialog.so
  Expected in: /Applications/Sequel Pro.app/Contents/MacOS/Sequel Pro
 in /usr/local/lib/plugin/dialog.so

Tags: mac pam
Revision history for this message
monty solomon (monty+launchpad) wrote :

I built Percona Server different ways and the dialog.so failed to find the symbols

cmake .. -G Xcode -DWITH_BOOST=/Users/monty/boost_1_59_0/ -DCMAKE_VERBOSE_MAKEFILE=ON -DCMAKE_BUILD_TYPE=RelWithDebInfo -DWITH_PAM=yes -DHAVE_STRUCT_IFREQ_IFR_NAME=yes -DCMAKE_FIND_FRAMEWORK=LAST -DWITHOUT_TOKUDB=1

xcodebuild -configuration RelWithDebInfo

Revision history for this message
monty solomon (monty+launchpad) wrote :

brew install percona-server

after modifying the formula to include

      -DWITH_PAM=yes
      -DHAVE_PAM=yes
      -DHAVE_STRUCT_IFREQ_IFR_NAME=yes

Revision history for this message
monty solomon (monty+launchpad) wrote :

percona-server-5.7.17-11

Revision history for this message
monty solomon (monty+launchpad) wrote :

$ nm -gu dialog.so
___stack_chk_fail
___stack_chk_guard
___stdinp
_dlsym
_fgets
_free
_getpass
_my_stpnmov
_strcmp
_strdup
_strlen
_strncpy
dyld_stub_binder

tags: added: mac
Revision history for this message
monty solomon (monty+launchpad) wrote :

There appears to be an issue with the build and enabling dialog.so to find my_stpnmov in libperconaserverclient.dylib.

Copying the code for my_stpnmov into the dialog.c file before building permits it to work.

Revision history for this message
monty solomon (monty+launchpad) wrote :

An additional incompatibility is the moving of the plugins to a different directory.

Upstream
 SET(INSTALL_PLUGINDIR_STANDALONE "lib/plugin")

Percona
 SET(INSTALL_PLUGINDIR_STANDALONE "lib/mysql/plugin")

Revision history for this message
monty solomon (monty+launchpad) wrote :

The library should be named libmysqlclient instead of libperconaserverclient on OS X.

Excerpt from MySQL C API Implementations
https://dev.mysql.com/doc/refman/5.7/en/c-api-implementations.html

On Unix (and Unix-like) sytems, the static library is libmysqlclient.a. The dynamic library is libmysqlclient.so on most Unix systems and libmysqlclient.dylib on OS X.

For distributions that include embedded server libraries, the corresponding library names begin with libmysqld rather than libmysqlclient.

tags: added: pam
Revision history for this message
Shahriyar Rzayev (rzayev-sehriyar) wrote :

Percona now uses JIRA for bug reports so this bug report is migrated to: https://jira.percona.com/browse/PS-3658

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.