wget https://zlib.net/zlib-1.2.11.tar.gz tar xzf zlib-*.tar.gz cd zlib-*/ CC=musl-gcc ./configure --static make ls -l libz.a cd .. wget https://www.sqlite.org/2021/sqlite-amalgamation-3360000.zip unzip sqlite-amalgamation-*.zip cd sqlite-amalgamation-*/ ln -s . include # Workaround for a bug in the Zabbix proxy makefile ln -s . lib musl-gcc -DSQLITE_ENABLE_FTS5 -DSQLITE_ENABLE_JSON1 -DSQLITE_ENABLE_DBSTAT_VTAB -Wall -g -O2 -c sqlite3.c ar rcs libsqlite3.a sqlite3.o cd .. wget https://www.openssl.org/source/openssl-1.1.1l.tar.gz # Dependency for libevent tar xzf openssl-*.tar.gz cd openssl-*/ CC=musl-gcc ./Configure --prefix=/ linux-x86_64 no-shared no-engine no-async -DOPENSSL_NO_SECURE_MEMORY make depend make cd .. wget https://github.com/libevent/libevent/releases/download/release-2.1.12-stable/libevent-2.1.12-stable.tar.gz tar xzf libevent-*-stable.tar.gz cd libevent-*-stable/ CC=musl-gcc CPPFLAGS="-g -I $PWD/../openssl-*/include" LDFLAGS="-L$(echo $PWD/../openssl-*/)" ./configure V=1 make cd .. wget https://sourceforge.net/projects/pcre/files/pcre/8.45/pcre-8.45.tar.bz2 tar xjf pcre-*.tar.bz2 cd pcre-*/ CC=musl-gcc ./configure --disable-shared V=1 make cd .. CC=musl-gcc \ CPPFLAGS="-g" \ LDFLAGS="-g" ./configure \ --prefix="/opt/zabbix-proxy" \ --disable-server \ --disable-agent \ --enable-proxy \ --enable-static \ --with-zlib-include="$(echo $PWD/zlib-*/)" \ --with-zlib-lib="$(echo $PWD/zlib-*/)" \ --with-sqlite3="$(echo $PWD/sqlite-amalgamation-*/)" \ --with-libevent-include="$(echo $PWD/libevent-*-stable/include/)" \ --with-libevent-lib="$(echo $PWD/libevent-*-stable/.libs/)" \ --with-libpcre-include="$(echo $PWD/pcre-*/)" \ --with-libpcre-lib="$(echo $PWD/pcre-*/.libs/)" make