← Back to team overview

maria-discuss team mailing list archive

Re: Building mariadb without PCRE?

 

Thank you Vlad.  I may try that if my current path doesn’t work out.

In the short term, I’ve tried to build a static libpcre2 in my development environment, so that I can link mariadb to that.  In doing this, I’m not able to figure out how to get cmake to locate the library.  I am very familiar with make (and autoconf), but much less so with cmake.  CMAKE_EXE_LINKER_FLAGS seems not to affect the test for pcre2_match_8.  Is there an easy option to give mariadb’s cmake to cause it to add a path to these search tests for system library support?

I’ll keep digging around too in docs, but I wanted to check here since I have the discussion open.  :-)

       - Chris


From: Vladislav Vaintroub <vvaintroub@xxxxxxxxx>
Date: Tuesday, April 20, 2021 at 12:09
To: "Chris Ross (cross2)" <cross2@xxxxxxxxx>, Sergei Golubchik <serg@xxxxxxxxxxx>
Cc: "maria-discuss@xxxxxxxxxxxxxxxxxxx" <maria-discuss@xxxxxxxxxxxxxxxxxxx>
Subject: RE: [Maria-discuss] Building mariadb without PCRE?

Hi Chris,

CMake caches files , and  skips download them if  files already exist on disk during the build.
If  pcre2-10.36.zip already exists in the build_directory/extra/pcre2/src/,  then build output will look similar to below

Performing download step (download, verify and extract) for 'pcre2'
  -- verifying file...
         file='C:/work/server/extra/pcre2/src/pcre2-10.36.zip'
  -- File already exists and hash match (skip download):
    file='C:/work/server/extra/pcre2/src/pcre2-10.36.zip'
    MD5='ba9e743af42aac5642f7504b12af4116'
  -- extracting...
...

Note “File already exists and hash match (skip download)”

You see, download does not happen if you have the correct file in the correct place prior to the build.

From: Chris Ross (cross2)<mailto:cross2@xxxxxxxxx>
Sent: Tuesday, 20 April 2021 15:57
To: Sergei Golubchik<mailto:serg@xxxxxxxxxxx>
Cc: maria-discuss@xxxxxxxxxxxxxxxxxxx<mailto:maria-discuss@xxxxxxxxxxxxxxxxxxx>
Subject: Re: [Maria-discuss] Building mariadb without PCRE?

On 4/20/21, 05:43, "Sergei Golubchik" <serg@xxxxxxxxxxx> wrote:
    On Apr 19, Chris Ross (cross2) wrote:
    > Good day.  We have been using MariaDB in our product for a while, and
    > are upgrading to 10.5.8 at the moment.  I’ve just noticed that it’s no
    > longer using the PCRE on our system, it’s grabbing its own from
    > outside since the upgrade to PCRE2.

    There are two options. Either it can link dynamically with a system
    libpcre2-8.so or statically with pcre2 compiled from source, that was
    downloaded by cmake during the build.

Yup.  I see that.  However we run on an embedded Linux, and our platform
team won't want to add a new library for just one application.  In the
short term, I'll need to build it just for MariaDB myself.  But,
for security and data integrity reasons we can't pull it from the
internet at build time.  Can the MariaDB pcre2 build process be given
an alternate URL or file path from which to retrieve the pcre2 source
tarball?

    > We’re not using PCRE extensions at all in our applications, and I’d
    > rather not pull in another extraneous library.  We are a largely
    > embedded product, and adding libraries is a technical and bureaucratic
    > effort.  Can I just build mariadb without PCRE support at all, using
    > the traditional extended POSIX regexps instead?  I don’t see a way to
    > do this in the cmake files/parameters.

    No, it's not possible. It shouldn't be difficult to implement it,
    but at the moment it's not supported.

I saw this upon looking, thank you for clarifying.

        - Chris

_______________________________________________
Mailing list: https://launchpad.net/~maria-discuss
Post to     : maria-discuss@xxxxxxxxxxxxxxxxxxx
Unsubscribe : https://launchpad.net/~maria-discuss
More help   : https://help.launchpad.net/ListHelp


Follow ups

References