Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[fix] MacOS build.sh failing on 15.2 Beta (24C5089c) #410

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions AUTHORS
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
# Individual Persons

Alexandr Stelnykovych <[email protected]>
Arian Izadi <[email protected]>


# Organizations
Expand Down
29 changes: 17 additions & 12 deletions daemon/References/macOS/scripts/build-openvpn.sh
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ echo "************************************************"
echo "******** Downloading OpenSSL sources..."
echo "************************************************"
cd ${BUILD_DIR}
curl https://www.openssl.org/source/openssl-${OPEN_SSL_VER}.tar.gz | tar zx
curl -L https://www.openssl.org/source/openssl-${OPEN_SSL_VER}.tar.gz | tar zx

# ##############################################################################
# Compilation OpenSSl info:
Expand All @@ -62,7 +62,7 @@ fi
echo "************************************************"
echo "******** Compiling OpenSSL..."
echo "************************************************"
make
make -j $(sysctl -n hw.logicalcpu)

echo "************************************************"
echo "******** Copying OpenSSL include folder and static libraries..."
Expand All @@ -84,7 +84,7 @@ cd lzo-${LZO_VER}
echo "************************************************"
echo "******** Compiling LZO..."
echo "************************************************"
CLFAGS="-mmacosx-version-min=10.6" ./configure --prefix="${INSTALL_DIR}" && make && make install
./configure --prefix="${INSTALL_DIR}" && make -j $(sysctl -n hw.logicalcpu) && make install

echo "************************************************"
echo "******** Cloning OpenVPN sources..."
Expand All @@ -98,10 +98,11 @@ echo "******** Checkout OpenVPN version (${OPEN_VPN_VER})..."
echo "************************************************"
git checkout ${OPEN_VPN_VER}

echo "************************************************"
echo "******** Patching OpenVPN..."
echo "************************************************"
patch -p2 < $BASE_DIR/patches/openvpn-osx-lion.patch
# echo "************************************************"
# echo "******** Patching OpenVPN..."
# echo "************************************************"
# patch -p2 < $BASE_DIR/patches/openvpn-osx-lion.patch
# ! Patching causes error on macOS 15.2 Beta (24C5089c)

echo "************************************************"
echo "******** OpenVPN: Updating generated configuration files..."
Expand All @@ -111,16 +112,20 @@ autoreconf -ivf
echo "************************************************"
echo "******** Configuring OpenVPN..."
echo "************************************************"
CFLAGS="-mmacosx-version-min=10.6 -I${INSTALL_DIR}/include" \
LDFLAGS="-L${INSTALL_DIR}/lib" \
./configure --disable-debug --disable-server --enable-password-save \
--disable-lz4
OPENSSL_LIBS="-L${INSTALL_DIR}/lib -lssl -lcrypto" \
OPENSSL_CFLAGS="-I${INSTALL_DIR}/include" \
CFLAGS="-I${INSTALL_DIR}/include" \
LDFLAGS="-L${INSTALL_DIR}/lib" \
./configure --disable-debug \
--disable-server \
--enable-password-save \
# --disable-lz4 \
# disabling lz4 compression algorithm (there is compilation error on macOS M1 when LZ4 enabled)

echo "************************************************"
echo "******** Compiling OpenVPN..."
echo "************************************************"
make
make -j $(sysctl -n hw.logicalcpu)

echo "********************************"
echo "******** BUILD COMPLETE ********"
Expand Down
2 changes: 1 addition & 1 deletion readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ These instructions enable you to get the project up and running on your local ma

#### macOS

[Go 1.21+](https://golang.org/); Git; [npm](https://www.npmjs.com/get-npm); [Node.js (18)](https://nodejs.org/); Xcode Command Line Tools.
[Go 1.21-1.22.9](https://golang.org/); Git; [npm](https://www.npmjs.com/get-npm); [Node.js (18)](https://nodejs.org/); Xcode Command Line Tools.
To compile the OpenVPN/OpenSSL binaries locally, additional packages are required:
```bash
brew install autoconf automake libtool
Expand Down