Closed sshilko closed 6 years ago
Seems the busybox version doesn't support 'binary' option. Provide a Dockerfile to reproduce the issue.
As workaround you could install the gnu patch.
Attached log & Dockerfile
We use original source of RE2 from google (well, one concrete revision, m.b. quite ancient) and patch it with our own patch.
For this we use one of two approaches: one is use git apply
, another is use binutils patch
. Even these two is quite over-engineering for such simple task as 'apply patch', but it works since you may not have 'git' and build directly from source tarball, say, on windows. '-binary' flag helps to avoid any issues with different cr/lf symbols in the code/ in the patch (otherwise they WILL arise on win).
So, no other zoo of tools (like 'patch' from busybox vs 'patch' from binutils) is planned to support; these two are enough.
So sorry, but you have either to patch the sources, either to install git or 'real' patch tool in the build env.
OR as a variant - you can configure the build on another host where all the tools persists, set 'WITH_RE2_FORCE_STATIC' (and m.b. also 'WITH_STEMMER_FORCE_STATIC') and perform 'make tarball' then. It will produce your own tarball with all these things prepared, so when building on apline they will not need any patching (and also not need other tools like 'flex' and 'bison' btw.).
Just for reference: for building on alpine this basic docker is enogh:
FROM alpine
RUN apk add --no-cache \
git \
cmake \
make \
g++ \
mariadb-dev \
bison \
flex-dev
Okay, i can install my own gnu patch or use other -b compatible patch. For now compiling without RE2 support works too.
Updating documentation would fix issue for futute.Thx.
Are you in the right place?
Yes
For general questions, post a question to Forum or Slack
If you open a Github issue, it must be a bug or feature request and you need to provide the below information.
Describe the environment
Alpine Linux 3.7 (Docker)
Manticore Search version: 2.7.3 and 2.7.4
OS version: OSX host Build version: Github release (not github clone)
Describe the problem
Compiling from github tar.gz tarball has issues with RE2 Probably due to
https://github.com/manticoresoftware/manticoresearch/blob/master/cmake/GetRE2.cmake#L94
/usr/bin/patch -p1 --binary -i
under AlpineDescription of the issue:
Steps to reproduce: