[MXS-83] linkage fails when system pcre library is recent Created: 2015-04-01  Updated: 2015-06-17  Resolved: 2015-04-17

Status: Closed
Project: MariaDB MaxScale
Component/s: Core
Affects Version/s: None
Fix Version/s: 1.1.1

Type: Bug Priority: Minor
Reporter: Yuval Hager Assignee: markus makela
Resolution: Fixed Votes: 0
Labels: None
Environment:

Archlinux, develop branch



 Description   

MariaDB includes a bundled and patched pcre source tree. When building mariadb, with WITH_PCRE=auto (the default), cmake checks the system pcre for a specific patch (existence of the symbol pcre_stack_guard). If the system pcre has that, mysqld will be dynamically linked to it, and the bundled pcre version will not be used.

For Ubuntu and debian, the system pcre is too old, so the bundled pcre ends up being statically linked to libmysqld.

MaxScale assumes that libmysqld defines the PCRE symbols. Linkage thus fails on missing pcre_* symbols.

Adding -lpcre to the linkage command, or adding pcre to target_link_libraries fixes the issue.

Probably the correct fix would be to test for the existence of pcre_stack_guard in libmysqld or in the system's libpcre, and link appropriately. If this is correct, let me know, I'll work on a patch.



 Comments   
Comment by Dipti Joshi (Inactive) [ 2015-04-01 ]

Changed the severity to Minor, as ArchLinux is not officially support OS for MaxScale at this time.
Supported OS are RHEL, CentOS, Fedora, OpenSUSE, SLES, Debian and Ubuntu.

Comment by Yuval Hager [ 2015-04-01 ]

Okay, I'll open future archlinux related issues with Minor severity in the future.

This one is not specific to archlinux/gentoo, rather to any system with a recent pcre. It might pop up on supported distros as they update their pcre.

Will you accept a patch for this though?

Comment by markus makela [ 2015-04-17 ]

CMake now checks for pcre_stack_guard and if it is not found, looks for an installed PCRE library. If successful, MaxScale is linked with -lpcre.

Comment by Timofey Turenko [ 2015-05-12 ]

verified by checking cmake files. Actual test on ArchLinux is not implemented due to minor severity of bug and significant amount of work to setup ArchLinux env. Please reopen if problem is still present.

Generated at Thu Feb 08 03:56:39 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.