Bug #71265 Library name mismatch for PCRE on Ubuntu

Submitted: 1 Jan 2014 11:21 Modified: 22 Jan 2014 19:02
Reporter: Daniël van Eeden Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server: JSON User-defined function ( UDF ) Severity:S3 (Non-critical)
Version:0.3.0 OS:Linux (Ubuntu 13.04)
Assigned to: CPU Architecture:Any

[1 Jan 2014 11:21] Daniël van Eeden
Description:
ERROR 1126 (HY000) at line 33: Can't open shared library 'libmy_json_udf.so' (errno: 2 libpcreposix.so.0: cannot open shared object file: No such file or directory)
ERROR 1126 (HY000) at line 33: Can't open shared library 'libmy_json_udf.so' (errno: 0 libpcre.so.0: cannot open shared object file: No such file or directory)

How to repeat:
Download pre-compiled UDFs and try to install them.

Some extra info (with the symlink work-around in place!)
root:/usr/lib/x86_64-linux-gnu# ls -l libpcre{posix,}.so*
lrwxrwxrwx 1 root root    22 Mar 11  2013 libpcreposix.so -> libpcreposix.so.3.13.1
lrwxrwxrwx 1 root root    15 Jan  1 11:45 libpcreposix.so.0 -> libpcreposix.so
lrwxrwxrwx 1 root root    22 Mar 11  2013 libpcreposix.so.3 -> libpcreposix.so.3.13.1
-rw-r--r-- 1 root root 10312 Mar 11  2013 libpcreposix.so.3.13.1
lrwxrwxrwx 1 root root    34 Mar 11  2013 libpcre.so -> /lib/x86_64-linux-gnu/libpcre.so.3
lrwxrwxrwx 1 root root    10 Jan  1 11:47 libpcre.so.0 -> libpcre.so

root:/usr/lib/x86_64-linux-gnu# dpkg -S /usr/lib/x86_64-linux-gnu/libpcre{posix,}.so*
libpcre3-dev:amd64: /usr/lib/x86_64-linux-gnu/libpcreposix.so
dpkg-query: no path found matching pattern /usr/lib/x86_64-linux-gnu/libpcreposix.so.0
libpcre3:amd64: /usr/lib/x86_64-linux-gnu/libpcreposix.so.3
libpcre3:amd64: /usr/lib/x86_64-linux-gnu/libpcreposix.so.3.13.1
libpcre3-dev:amd64: /usr/lib/x86_64-linux-gnu/libpcre.so
dpkg-query: no path found matching pattern /usr/lib/x86_64-linux-gnu/libpcre.so.0

root:/usr/lib/x86_64-linux-gnu# apt-cache policy libpcre3-dev libpcre3:amd64
libpcre3-dev:
  Installed: 1:8.31-2
  Candidate: 1:8.31-2
  Version table:
 *** 1:8.31-2 0
        500 http://nl.archive.ubuntu.com/ubuntu/ raring/main amd64 Packages
        100 /var/lib/dpkg/status
libpcre3:
  Installed: 1:8.31-2
  Candidate: 1:8.31-2
  Version table:
 *** 1:8.31-2 0
        500 http://nl.archive.ubuntu.com/ubuntu/ raring/main amd64 Packages
        100 /var/lib/dpkg/status

Suggested fix:
A quick work-around is to symlink the libraries

root:/usr/lib/x86_64-linux-gnu# ln -s libpcreposix.so libpcreposix.so.0
root:/usr/lib/x86_64-linux-gnu# ln -s libpcre.so libpcre.so.0

An option would be to ship a different .so file for Ubuntu or make sure the UDF uses libpcre.so instead libpcre.so.0
[15 Jan 2014 10:46] Sveta Smirnova
Thank you for the report.

Another workaround is to use cmake option WITH_PCRE=bundled
[22 Jan 2014 19:01] Sveta Smirnova
Posted by developer:
 
Fixed in versions 0.2.2 and 0.3.1

Version 0.3.1 contains incompatible change:

Now default value for compile option WITH_PCRE is bundled independent from the
platform (Bug #71265/18081332 Library name mismatch for PCRE on Ubuntu)

For version 0.2.2 only binaries built with option WITH_PCRE=bundled

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

Page generated in 0.051 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.