Skip to content

Commit 444665c

Browse files
committed
Add a README.md detailing how to build the Native Binaries
1 parent 0d292d8 commit 444665c

File tree

1 file changed

+43
-0
lines changed

1 file changed

+43
-0
lines changed

exist-service/bin/README.md

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
# Note on Native Binaries
2+
3+
## Windows Binary
4+
The Windows Binary is taken directly from the native binaries for Windows package provided by the Apache Commons Daemon project. For example:
5+
```
6+
wget https://dlcdn.apache.org/commons/daemon/binaries/windows/commons-daemon-1.3.3-bin-windows.zip
7+
unzip commons-daemon-1.3.3-bin-windows.zip
8+
```
9+
10+
## macOS Binary
11+
The macOS Binary is compiled as a Universal Binary for x86_64 and arm64 from the native source code for unix provided by the Apache Commons Daemon project.
12+
It is compiled for a minimum version of 10.13 of macOS so as to provide some backwards compatibility.
13+
14+
For example:
15+
16+
```bash
17+
wget https://dlcdn.apache.org/commons/daemon/source/commons-daemon-1.3.3-native-src.tar.gz
18+
tar zxvf commons-daemon-1.3.3-native-src.tar.gz
19+
cd commons-daemon-1.3.3-native-src/unix
20+
export CFLAGS="-mmacosx-version-min=10.13 -arch x86_64 -arch arm64"
21+
export LDFLAGS="-mmacosx-version-min=10.13 -arch x86_64 -arch arm64"
22+
./configure
23+
make
24+
```
25+
26+
## Linux Binary
27+
The Linux binary is compiled for x86_64 from the native source code for unix provided by the Apache Commons Daemon project.
28+
It is compiled for a minimum glibc of 2.17 so as to provide some backwards compatibility between Linux distributions.
29+
30+
CentOS 7 provides a glibc 2.17. If you have Docker, you can build it using the following example:
31+
32+
```bash
33+
wget https://dlcdn.apache.org/commons/daemon/source/commons-daemon-1.3.3-native-src.tar.gz
34+
tar zxvf commons-daemon-1.3.3-native-src.tar.gz
35+
docker run -it -v /tmp/commons-daemon-1.3.3-native-src/unix:/commons-daemon-src centos:7
36+
yum install -y gcc make libcap-devel java-1.8.0-openjdk-headless java-1.8.0-openjdk-devel
37+
cd /commons-daemon-src
38+
export CFLAGS=-m64
39+
export LDFLAGS=-m64
40+
export JAVA_HOME=/usr/lib/jvm/java-1.8.0-openjdk
41+
./configure
42+
make
43+
```

0 commit comments

Comments
 (0)