[ZBX-20107] Make Install does not work with ODBC Created: 2021 Oct 20  Updated: 2021 Oct 27  Resolved: 2021 Oct 27

Status: Closed
Project: ZABBIX BUGS AND ISSUES
Component/s: Server (S)
Affects Version/s: 5.4.6
Fix Version/s: None

Type: Problem report Priority: Trivial
Reporter: Victor Sklyarov Assignee: Andrei Gushchin (Inactive)
Resolution: Won't fix Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

SLES 15 SP3



 Description   

1. ./configure --enable-server --enable-agent --with-mysql --disable-ipv6 --with-net-snmp --with-libcurl --with-libxml2 --with-ssh2 --with-openipmi --with-libpcre --with-unixodbc
Result: OK
2. make instal
Result:
make[1]: Entering directory '/var/distrib/zabbix-5.4.6/src/zabbix_server/odbc'
cc -DHAVE_CONFIG_H -I. -I../../../include -I/usr/include -g -O2 -I/usr/include -MT libzbxodbc_a-odbc.o -MD -MP -MF .deps/libzbxodbc_a-od bc.Tpo -c -o libzbxodbc_a-odbc.o `test -f 'odbc.c' || echo './'`odbc.c
odbc.c:24:10: fatal error: sql.h: No such file or directory
#include <sql.h>
^~~~~~~
compilation terminated.
make[1]: *** [Makefile:470: libzbxodbc_a-odbc.o] Error 1
make[1]: Leaving directory '/var/distrib/zabbix-5.4.6/src/zabbix_server/odbc'
make: *** [Makefile:807: install-recursive] Error 1

Installation of zabbix 5.4.5 with ODBC support went without errors



 Comments   
Comment by Andrei Gushchin (Inactive) [ 2021 Oct 21 ]

Hello Victor,

I cannot reproduce this for me all configured fine without any issues.
Did you get that sources from tarball or from git?

Best regards,
Andrei

Comment by Victor Sklyarov [ 2021 Oct 21 ]

I got the sources from tarball.

Comment by Victor Sklyarov [ 2021 Oct 21 ]

I noticed a difference between the archives. In version 5.4.5, the file size of .deps/libzbxodbc-a_odbc.Po is 15177. In version 5.4.6, its size is 8.

Comment by Andrei Gushchin (Inactive) [ 2021 Oct 21 ]

Thank you.
Hmm strange. What OS there?
Did you tried to clean that all:

make clean all 

And configure again.

Comment by Victor Sklyarov [ 2021 Oct 21 ]

OS: cat /etc/issue

Welcome to SUSE Linux Enterprise Server for SAP Applications 15 SP3 (x86_64) - Kernel \r (\l).

eth0: \4

{eth0} \6{eth0}

----------------
I had made: make clean all

After configuration
Configuration:

Detected OS: linux-gnu
Install path: /usr/local
Compilation arch: linux

Compiler: cc
Compiler flags: -g -O2 -I/usr/include

Library-specific flags:
database: -I/usr/include/mysql -I/usr/include/mysql/mysql
libXML2: -I/usr/include/libxml2
unixODBC: -I/usr/include
Net-SNMP: -I/usr/lib/perl5/5.26.1/x86_64-linux-thread-multi/CORE -I. -I/usr/include
OpenIPMI: -I/usr/local/include
libssh2: -I/usr/include

Enable server: yes
Server details:
With database: MySQL
WEB Monitoring: cURL
SSL certificates: /usr/local/share/zabbix/ssl/certs
SSL keys: /usr/local/share/zabbix/ssl/keys
SNMP: yes
IPMI: yes
SSH: yes (libssh2)
TLS: no
ODBC: yes
Linker flags: -L/usr/lib64 -L/usr/lib64/ -L/usr/lib64 -L/usr/lib -L/usr/local/lib -rdynamic -L/usr/lib
Libraries: -lmariadb -lodbc -lnetsnmp -lssh2 -lOpenIPMI -lOpenIPMIposix -lz -lpthread -levent -lcurl -lm -ldl -lresolv -lxml2 -lpcre
Configuration file: /usr/local/etc/zabbix_server.conf
External scripts: /usr/local/share/zabbix/externalscripts
Alert scripts: /usr/local/share/zabbix/alertscripts
Modules: /usr/local/lib/modules

Enable proxy: no

Enable agent: yes
Agent details:
TLS: no
Modbus: no
Linker flags: -rdynamic -L/usr/lib
Libraries: -lz -lpthread -lcurl -lm -ldl -lresolv -lxml2 -lpcre
Configuration file: /usr/local/etc/zabbix_agentd.conf
Modules: /usr/local/lib/modules

Enable agent 2: no

Enable web service: no

Enable Java gateway: no

LDAP support: no
IPv6 support: no

***********************************************************

  • Now run 'make install' *
  • *
  • Thank you for using Zabbix! *
  • <http://www.zabbix.com> *
    ***********************************************************
    After "make" I got the same error
Comment by Michael Veksler [ 2021 Oct 26 ]

Can't reproduce with fresh SLES 15.3:

localhost:~ # cat /etc/os-release
NAME="SLES"
VERSION="15-SP3"
VERSION_ID="15.3"
PRETTY_NAME="SUSE Linux Enterprise Server 15 SP3"
ID="sles"
ID_LIKE="suse"
ANSI_COLOR="0;32"
CPE_NAME="cpe:/o:suse:sles:15:sp3"
DOCUMENTATION_URL="https://documentation.suse.com/" 

with:

zypper install yast
zypper install yast2*
zypper install -t pattern devel_basis
zypper install sqlite3-devel
zypper install mariadb-connector-odbc
zypper install libmariadb-devel
zypper install libevent-devel
zypper install libxml2-devel
zypper install net-snmp-devel
zypper install libssh2-devel
zypper install OpenIPMI-devel
zypper install libcurl-devel 

and:

user:~/work/zabbix (release/5.4)$./configure --enable-server --enable-agent --with-mysql --disable-ipv6 --with-net-snmp --with-libcurl --with-libxml2 --with-ssh2 --with-openipmi --with-libpcre --with-unixodbc -q 

Compiled without the error.

Comment by Michael Veksler [ 2021 Oct 27 ]

Closing this for now, if you have any more questions, feel free to reopen this ticket!

Generated at Thu May 22 06:48:23 EEST 2025 using Jira 9.12.4#9120004-sha1:625303b708afdb767e17cb2838290c41888e9ff0.