maria-discuss team mailing list archive
-
maria-discuss team
-
Mailing list archive
-
Message #06035
Re: Building mariadb without PCRE?
-
To:
Vladislav Vaintroub <vvaintroub@xxxxxxxxx>, Sergei Golubchik <serg@xxxxxxxxxxx>
-
From:
"Chris Ross (cross2)" <cross2@xxxxxxxxx>
-
Date:
Wed, 21 Apr 2021 17:31:51 +0000
-
Accept-language:
en-US
-
Arc-authentication-results:
i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=cisco.com; dmarc=pass action=none header.from=cisco.com; dkim=pass header.d=cisco.com; arc=none
-
Arc-message-signature:
i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=GkY6OqqfWVW0CfKc46VAbS+5P5RTj9udZoZhpzRJ7MU=; b=kr6C6LLYf2O5gTkWTTSwbBteJ0fRQZOXwjt9f7Xeuwueh136XzFO99DfdizO9OI9wU6wPYvR7uJYL3NzkL9x8JzVberENUma//B8XvSvxENp/2ifE44uaeQxlHDvmDmFvmo7EpLe4IQW3Vc6J+TpzLeyhVPnaBLlN6oFD9c7voPtH6723J/hZgUKNote2W0ZoeUNdrD2GhKd6fC//miqYvDAl7yhnyVo3kG4cqBY/mMk+HseeCbkTKomV7wfHd49PKkBaJmkDae/by0oyAqQ4Gr5/CwGJNcfC+h1bsIaFSulneG4WoC5Y1+hEzd1EifwPrx0Jy2tQSsKJGY9jw66Gw==
-
Arc-seal:
i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=io1v6B223Spi3nNJv65ucA3vC8s4WbxL+sw1YmhvWnL0ezd9CXq0lNZN/GBCWHzCOlq7UVLPVAsSUajQquL56KMuq5PI2fOWimSxQ0gkrksl8nvUYhjpaqrVVBh8UyqYvGaiU4ge8x+/CU+aHigkIyVVtfowiSje6VUqSzQ9aoWYdBodnNFnv7IIz7pKYsxo3eLr2023xW1gmCxJDFH7u8eH1N7coIW8eL6knoo0MRaEkHyo23U/wqhWnVfHpXFXQCFj71dXG8rCK8GSo0H3F6A9Aq6CDxAX4YCgDVB0TEvxqtNNfdk7UhRx7I+9ontCRxvMDzrmkXUUMF293s714g==
-
Authentication-results:
gmail.com; dkim=none (message not signed) header.d=none;gmail.com; dmarc=none action=none header.from=cisco.com;
-
Cc:
"maria-discuss@xxxxxxxxxxxxxxxxxxx" <maria-discuss@xxxxxxxxxxxxxxxxxxx>
-
In-reply-to:
<2011911E-5E2E-4B13-9606-4D7FA84917BF@cisco.com>
-
Ironport-hdrordr:
A9a23:lh8zFKNw4a0mKsBcT4Px55DYdL4zR+YMi2QD/3taDTRIb82VkN 2vlvwH1RnyzA0cQm0khMroAsi9aFvm39pQ7ZMKNbmvGDPntmyhMZ144eLZrQHIMxbVstRQ3a IIScdDIfX7B1RikILe6A63D94vzLC8gd+VrM31pk0dKj1CQadm8gt/F0K/Gkp5WAFJCfMCZe Shz+BAoCetfmlSU9SjChA+Lqn+jvDotLajWx4JABY79BKD5AnJ1JfWGwWVty1uKA9n7qwl9Q H+4mnEz4Wl98q20xrNk1LUhq4m5OfJ7vtmKIiyhtMOKjPq4zzYJLhJf7GZpjg6rKWOxT8R4a PxiiwtNchy9H/dF1vdyXCGtmWQs0dN11bYxVCVmnflq8DiLQhKdvZpv55TcRfS9iMbzbdB+Z 9LxG6Qut52Ch7NjU3GlqD1fixqjUa9rD4el/cShRVkIPIjQYJWxLZvmH99IdMlJmbX+YonGO 5hAIX3//BNa26XaHjfoy1G3MGsdm5bJGbEfmEy/uiulxRGlnFwyEUVgOYFmG0byZ47Q55Yo8 zZL6VTkq1URMN+V9M+OM4xBe+MTkDdSxPFN2yfZX79ErscBn7Lo5nrpJI4+f+tY55N6Jcpgp zOXBd5uAcJCgfTIPzL+KcO3gHGQW27Uzio4NpZ/YJFtrr1Q6euPjaETFwojsu8s/QSCsDWQJ +ISdVrKs6mCVGrNZdC3gX4VZUXA2IZStcpttEyXE/Los+jEPytisXrNNLo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y47B3gUTUWZnAg9pLjuPXt+brXmlTqZqCsXVXdptKWldFjMgNhAUvDYaDDlGzN//laSE2X aEgHF9o9n22Kw5ZTcD5YVCBrXi77DpUERL6ZkJ5I+3vEdvUiMK6n+m555zUZVBOgzywKbN/J Rm7t0PfrM4T1IBjMa02jBDOpyggRg==
-
Thread-index:
AQHXNWC4F1TLPDr86UOqDecXf9v2e6q9KLMAgAADZgCAAGg8AP//x3MAgAGe1YA=
-
Thread-topic:
[Maria-discuss] Building mariadb without PCRE?
-
User-agent:
Microsoft-MacOutlook/16.48.21041102
Hello all. So I’ve made some progress on this, but I seem to be missing something.
I modified my invocation of cmake to have CFLAGS="-I$(PCRE2)/include" LDFLAGS="-L$(PCRE2)/lib64" in the environment so that it can find the alternate install of static pcre2 libraries. This allows it to find symbols on startup, and get into compiling.
However, I see the following failure now. As this is a C++ program, I found the CXXFLAGS symbol in many of the build scripts, so I set that too in my environment when running cmake. However, that seemed to have no effect. Looking at line 63 of build.make there, I see that all of “$(CXX_DEFINES) $(CXX_INCLUDES) $(CXX_FLAGS)” are used, but not the CXXFLAGS variable that I see used elsewhere.
Can someone help me understand how to provide alternate include/library paths in the recommended way to cmake for mariadb? Thank you.
- Chris
[ 46%] Built target async_example
/data/cross2/sfprefix/wrims-7_1_0/work/mariadb-x86_64/mariadb-10.5.8/client/mysqltest.cc:49:10: fatal error: pcre2posix.h: No such file or directory
#include "pcre2posix.h" /* pcreposix regex library */
^~~~~~~~~~~~~~
compilation terminated.
make[3]: *** [client/CMakeFiles/mariadb-test.dir/build.make:63: client/CMakeFiles/mariadb-test.dir/mysqltest.cc.o] Error 1
From: Maria-discuss <maria-discuss-bounces+cross2=cisco.com@xxxxxxxxxxxxxxxxxxx> on behalf of "Chris Ross (cross2)" <cross2@xxxxxxxxx>
Date: Tuesday, April 20, 2021 at 12:48
To: Vladislav Vaintroub <vvaintroub@xxxxxxxxx>, Sergei Golubchik <serg@xxxxxxxxxxx>
Cc: "maria-discuss@xxxxxxxxxxxxxxxxxxx" <maria-discuss@xxxxxxxxxxxxxxxxxxx>
Subject: Re: [Maria-discuss] 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
References