Opened 10 years ago

Last modified 9 years ago

#45136 new request

Sphinx plugin for percona

Reported by: gulios@… Owned by: macports-tickets@…
Priority: Normal Milestone:
Component: ports Version: 2.3.1
Keywords: Cc:
Port: percona-sphinx-plugin

Description

Hi,

I'm looking for port: percona-sphinx-plugin because i had a problem with enabling Sphinx plugin:

INSTALL PLUGIN sphinx SONAME 'ha_sphinx.so';

#1126 - Can't open shared library '/opt/local/lib/percona/plugin/ha_sphinx.so' (errno: 2 dlopen(/opt/local/lib/percona/plugin/ha_sphinx.so, 2): image not found)

Thank you

Change History (7)

comment:1 Changed 10 years ago by pixilla (Bradley Giesbrecht)

I have found no easy build process for the sphinx mysql plugin.

The mariadb-10.0 port includes the sphinx storage engine (plugin) by default, will the mariadb-10.0 serve your needs?

comment:2 Changed 10 years ago by gulios@…

ok, it can be mariadb.10.0 but there is another problem with Sphinx, because it tries install older version of maria:

port install sphinx +mariadb
--->  Computing dependencies for sphinx
--->  Dependencies to be installed: mariadb
--->  Fetching archive for mariadb
--->  Attempting to fetch mariadb-5.5.39_0.darwin_13.x86_64.tbz2 from http://nue.de.packages.macports.org/macports/packages/mariadb

Can you add support for mariadb.10.0 in Sphinx ? Thank you

comment:3 in reply to:  2 Changed 10 years ago by pixilla (Bradley Giesbrecht)

Replying to gulios@…:

ok, it can be mariadb.10.0 but there is another problem with Sphinx, because it tries install older version of maria:

The mysql MacPorts naming convention is changing.

The current MariaDB stable release is mariadb-10.0 and MariaDB development is mariadb_10.1:

port info mariadb-10.0
Last edited 10 years ago by pixilla (Bradley Giesbrecht) (previous) (diff)

comment:4 Changed 10 years ago by gulios@…

you are right. I've installed

mariadb-10.0 @10.0.12_0 (active)
mariadb-10.0-server @10.0.12_0 (active)

but when i try to instal sphinx @2.2.4 (textproc, net) it tries to install older version of maria

port install sphinx +mariadb
--->  Computing dependencies for sphinx
--->  Dependencies to be installed: mariadb
--->  Fetching archive for mariadb
--->  Attempting to fetch mariadb-5.5.39_0.darwin_13.x86_64.tbz2 from http://nue.de.packages.macports.org/macports/packages/mariadb

and that's why i'm asking to upgrade(if possible) Sphinx port to integrate with the newest, stable version "mariadb-10.0".

Thx

comment:5 Changed 9 years ago by gulios@…

Hi,

After a couple of months i have to back to this problem. I need Percona server >5.6 not mariaDB because of GTID functionality.

There is no problem with installing "port install sphinx +percona"

--->  Installing sphinx @2.2.4_0+percona
--->  Activating sphinx @2.2.4_0+percona
--->  Cleaning sphinx
--->  Updating database of binaries
--->  Scanning binaries for linking errors
--->  No broken files found.

but still if i want to install plugin to MySql "INSTALL PLUGIN sphinx SONAME 'ha_sphinx.so'; "

#1126 - Can't open shared library '/opt/local/lib/percona/plugin/ha_sphinx.so' (errno: 2 dlopen(/opt/local/lib/percona/plugin/ha_sphinx.so, 2): image not found) 

I need this plugin enabled for searching data from SQL side in tables like this:

CREATE TABLE `sphinx_example_table` (
  `id` bigint(20) unsigned NOT NULL,
  `example_column` varchar(3072) NOT NULL,
  KEY `query` (`query`(1024))
) ENGINE=SPHINX DEFAULT CHARSET=utf8;

I tried to copy file ha_sphinx.so from mariadb-10 and got

#1126 - Can't open shared library '/opt/local/lib/percona/plugin/ha_sphinx.so' (errno: 2 dlopen(/opt/local/lib/percona/plugin/ha_sphinx.so, 2): Symbol not found: __ZN7handler11print_errorEim
  Referenced from: /opt/lo) 

Can you help me with this?

Thank you.

comment:6 Changed 9 years ago by thejoyboy@…

There's a solution for your issue ;)

  1. Install percona-server and sphinx via MacPorts
port install percona-server
port install sphinx +percona
  1. Download percona-server (v 5.6.21-69.0 - compatible with percona-server port's version) and sphinx (v 2.2.4 - compatible with sphinx port) sources
port installed percona

percona @5.6.21-69.0_2 (active)
percona-server @5.6.21-69.0_0 (active)
port installed sphinx

sphinx @2.2.4_0+percona (active)
cd ~; mkdir percona_sphinx; cd percona_sphinx
wget http://www.percona.com/downloads/Percona-Server-5.6/Percona-Server-5.6.21-69.0/source/tarball/percona-server-5.6.21-69.0.tar.gz 
tar -xzf percona-server-5.6.21-69.0.tar.gz

wget http://sphinxsearch.com/files/sphinx-2.2.4-release.tar.gz 
tar -xzf sphinx-2.2.4-release.tar.gz
  1. Copy SphinxSE plugin sources to percona-server sources
mkdir percona-server-5.6.21-69.0/storage/sphinx
cp sphinx-2.2.4-release/mysqlse/* percona-server-5.6.21-69.0/storage/sphinx/
  1. Compile SphinxSE plugin
cd percona-server-5.6.21-69.0; sh BUILD/autorun.sh; ./configure --with-plugins=sphinx
cd storage/sphinx; make
  1. Copy ha_sphinx.so to percona-server plugin location
sudo cp ~/percona_sphinx/percona-server-5.6.21-69.0/storage/sphinx/ha_sphinx.so /opt/local/lib/percona/plugin
  1. Start / restart percona-server
sudo port load percona-server
  1. Finally, install SphinxSE plugin for Percona (Percona client)
[Percona]> INSTALL PLUGIN sphinx SONAME 'ha_sphinx.so';

More info:

Last edited 9 years ago by thejoyboy@… (previous) (diff)

comment:7 Changed 9 years ago by gulios@…

Thank you, it works fine !

@pixilla maybe you are able now to add this plugin to percona-server port by default.

Thx

Note: See TracTickets for help on using tickets.