[ZBX-20892] Cannot build Zabbix Proxy from sources with static libs Created: 2022 Apr 13  Updated: 2023 Nov 20

Status: Confirmed
Project: ZABBIX BUGS AND ISSUES
Component/s: Installation (I), Packages (C), Proxy (P)
Affects Version/s: 5.0.22
Fix Version/s: None

Type: Incident report Priority: Minor
Reporter: Khatsayuk Alexander Assignee: Zabbix Development Team
Resolution: Unresolved Votes: 3
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Ubuntu 20.04.4 with updates


Attachments: PNG File 2022-04-13_21-52.png     File config.log     PNG File image-2022-04-13-21-45-06-180.png     PNG File image-2022-04-13-21-45-20-097.png     PNG File image-2022-04-13-21-47-07-520.png    

 Description   

Steps to reproduce:

  1. Run ./configure with "--enable-static" option (e.g. I run ./configure  --with-libcurl --with-libevent --with-libpcre --with-libpthread --with-openssl --with-zlib --with-sqlite3 --with-libxml2 --with-gnutls --enable-proxy --enable-static)
  2. Process fails with error "configure: error: Not found libxml2 library"

I have installed libxml2-dev and all necessary build instruments. If I remove "--enable-static" option configure script end successfully and I can start make process.

config.log{}



 Comments   
Comment by Aigars Kadikis [ 2022 Apr 25 ]

I'm trying to minimize the problem to a single dependency. This works fine on Ubuntu 18 LTS:

apt update
apt -y install gcc make wget libsqlite3-dev libevent-dev libxml2-dev
wget https://cdn.zabbix.com/zabbix/sources/stable/5.0/zabbix-5.0.22.tar.gz
tar xvf zabbix-5.0.22.tar.gz
cd zabbix-5.0.22
./configure --enable-proxy --with-sqlite3 --with-libxml2

But on Ubuntu 20 LTS there still is a dedicated 'libxml2-dev' package. However, at the end of 'configure', it says:

configure: error: LIBXML2 library not found
Comment by Aigars Kadikis [ 2022 Apr 25 ]

Confirming

Comment by Zaur Azimov [ 2023 Nov 20 ]

Same problem with any static compilation:

`--with-unixodbc`  then: configure: error: unixODBC library not found

`--with-ssh2`  then: configure: error: SSH2 library not found

If you compile only: `./configure --prefix=/usr --enable-proxy --with-sqlite3 --enable-static`   then:  configure: error: Unable to use libevent (libevent check failed)

 

If the --enable-static flag is removed: 

./configure --prefix=/usr --enable-proxy --with-net-snmp --with-sqlite3 --with-ssh2 --with-libcurl --with-libxml2 --with-openipmi --with- openssl --with-unixodbc --with-openssl --with-unixodbc

then succeeds.

 

Debian10/Zabbix-6.4.8

Generated at Tue Jul 01 16:05:30 EEST 2025 using Jira 9.12.4#9120004-sha1:625303b708afdb767e17cb2838290c41888e9ff0.