[ZBX-23015] Zabbix 7.0.0alpha2 build failed in Solaris 11 sparc Created: 2023 Jun 23  Updated: 2023 Jul 19  Resolved: 2023 Jul 19

Status: Closed
Project: ZABBIX BUGS AND ISSUES
Component/s: Agent (G)
Affects Version/s: 7.0.0alpha2
Fix Version/s: None

Type: Problem report Priority: Major
Reporter: Yuuki Enomoto Assignee: Artjoms Rimdjonoks
Resolution: Duplicate Votes: 0
Labels: agent
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:
  • SunOS sol11 5.11 11.1 sun4v sparc SUNW,SPARC-Enterprise-T5120
  • gcc (GCC) 6.5.0

Issue Links:
Causes

 Description   

Steps to reproduce:

  1. Do configure in Zabbix 7.0.0alpha2 source directory
    # CC=/usr/pkg/gcc6/bin/gcc LDFLAGS+=-L/usr/pkg/gcc6/lib CFLAGS+='-I/usr/pkg/gcc6/include -lnsl' ./configure '--prefix=/usr/local/zabbix' '--sysconfdir=/etc/zabbix' --enable-agent --with-libpcre2 '--with-libpcre2-lib=/usr/local/pcre2-10.42/lib' '--with-libpcre2-include=/usr/local/pcre2-10.42/include' '--with-openssl-lib=/usr/pkg/lib' '--with-openssl-include=/usr/pkg/include/openssl' 
  1. Do build
    # make

Result:

	/usr/bin/gcc -DHAVE_CONFIG_H -I../../include/common -I../../include    -DZABBIX_DAEMON  -I/usr/local/openssl-1.1.1u/include -std=gnu99  -I/usr/local/pcre2-10.42/include -MT libzbxagent_a-zbxkstat.o -MD -MP -MF .deps/libzbxagent_a-zbxkstat.Tpo -c -o libzbxagent_a-zbxkstat.o `test -f 'zbxkstat.c' || echo './'`zbxkstat.c
	mv -f .deps/libzbxagent_a-zbxkstat.Tpo .deps/libzbxagent_a-zbxkstat.Po
	rm -f libzbxagent.a
	ar cru libzbxagent.a libzbxagent_a-listener.o  libzbxagent_a-zbxconf.o  libzbxagent_a-zbxkstat.o 
	ranlib libzbxagent.a
	/usr/bin/gcc -DZABBIX_DAEMON  -DDEFAULT_CONFIG_FILE="\"/etc/zabbix/zabbix_agentd.conf\""  -DDEFAULT_LOAD_MODULE_PATH="\"/usr/local/lib/modules\""  -I/usr/local/openssl-1.1.1u/include -std=gnu99  -I/usr/local/pcre2-10.42/include  -L/usr/local/openssl-1.1.1u/lib   -L/usr/local/pcre2-10.42/lib  -o zabbix_agentd zabbix_agentd-zabbix_agentd.o libzbxagent.a  active_checks/libzbxactive_checks.a  logfiles/libzbxlogfiles.a  ../../src/libs/zbxsysinfo/libzbxagentsysinfo.a  ../../src/libs/zbxsysinfo/hpux/libspecsysinfo.a  ../../src/libs/zbxsysinfo/hpux/libspechostnamesysinfo.a  ../../src/libs/zbxsysinfo/agent/libagentsysinfo.a  ../../src/libs/zbxsysinfo/common/libcommonsysinfo.a  ../../src/libs/zbxsysinfo/common/libcommonsysinfo_httpmetrics.a  ../../src/libs/zbxsysinfo/common/libcommonsysinfo_http.a  ../../src/libs/zbxsysinfo/simple/libsimplesysinfo.a  ../../src/libs/zbxsysinfo/alias/libalias.a  ../../src/libs/zbxlog/libzbxlog.a  ../../src/libs/zbxregexp/libzbxregexp.a  ../../src/libs/zbxthreads/libzbxthreads.a  ../../src/libs/zbxmutexs/libzbxmutexs.a  ../../src/libs/zbxprof/libzbxprof.a  ../../src/libs/zbxnix/libzbxnix.a  ../../src/libs/zbxcomms/libzbxcomms.a  ../../src/libs/zbxcommshigh/libzbxcommshigh.a  ../../src/libs/zbxconf/libzbxconf.a  ../../src/libs/zbxjson/libzbxjson.a  ../../src/libs/zbxalgo/libzbxalgo.a  ../../src/libs/zbxvariant/libzbxvariant.a  ../../src/libs/zbxcommon/libzbxcommon.a  ../../src/libs/zbxgetopt/libzbxgetopt.a  ../../src/libs/zbxhash/libzbxhash.a  ../../src/libs/zbxcrypto/libzbxcrypto.a  ../../src/libs/zbxexec/libzbxexec.a  ../../src/libs/zbxcompress/libzbxcompress.a  ../../src/libs/zbxmodules/libzbxmodules.a  ../../src/libs/zbxhttp/libzbxhttp.a  ../../src/libs/zbxfile/libzbxfile.a  ../../src/libs/zbxip/libzbxip.a  ../../src/libs/zbxtime/libzbxtime.a  ../../src/libs/zbxnum/libzbxnum.a  ../../src/libs/zbxstr/libzbxstr.a  ../../src/libs/zbxparam/libzbxparam.a  ../../src/libs/zbxexpr/libzbxexpr.a  -lssl -lcrypto   -lpthread -lm    -lpcre2-8 -liconv
ld: Unsatisfied symbol "zbx_get_diskstat" in file ../../src/libs/zbxsysinfo/common/libcommonsysinfo.a[libcommonsysinfo_a-diskdevices.o]
1 errors.
collect2: ld returned 1 exit status
*** Error exit code 1

Expected:
Pass build in Solaris 11 sparc.



 Comments   
Comment by Andris Mednis [ 2023 Jun 28 ]

The issue is on Solaris, but the build issue description is identical with one reported on HP-UX in ZBX-23014.

It mentions hpux libraries

../../src/libs/zbxsysinfo/hpux/libspecsysinfo.a  ../../src/libs/zbxsysinfo/hpux/libspechostnamesysinfo.a

Not from Solaris.

Comment by Andris Mednis [ 2023 Jun 28 ]

Hello, uki!

Can you try to build from development branch  'feature/DEV-2324-6.5-5' on HP-UX and Solaris?

Comment by Yuuki Enomoto [ 2023 Jun 29 ]

Sorry, I've mistake report description. Solaris error is:

/usr/pkg/gcc6/bin/gcc -DHAVE_CONFIG_H -I../../../../include/common -I../../../../include     -m64 -I/usr/pkg/gcc6/include -lnsl -DZBX_OLD_SOLARIS  -I/usr/local/pcre2-10.42/include -MT libcommonsysinfo_a-zbxsysinfo_common.o -MD -MP -MF .deps/libcommonsysinfo_a-zbxsysinfo_common.Tpo -c -o libcommonsysinfo_a-zbxsysinfo_common.o `test -f 'zbxsysinfo_common.c' || echo './'`zbxsysinfo_common.c
mv -f .deps/libcommonsysinfo_a-zbxsysinfo_common.Tpo .deps/libcommonsysinfo_a-zbxsysinfo_common.Po
/usr/pkg/gcc6/bin/gcc -DHAVE_CONFIG_H -I../../../../include/common -I../../../../include     -m64 -I/usr/pkg/gcc6/include -lnsl -DZBX_OLD_SOLARIS  -I/usr/local/pcre2-10.42/include -MT libcommonsysinfo_a-cpustat.o -MD -MP -MF .deps/libcommonsysinfo_a-cpustat.Tpo -c -o libcommonsysinfo_a-cpustat.o `test -f 'cpustat.c' || echo './'`cpustat.c
In file included from cpustat.c:22:0:
stats.h:35:23: fatal error: zbxkstat.h: No such file or directory
 # include "zbxkstat.h" 

I tried feature/DEV-2324-6.5-5 branch. Success build in Solaris.

root@sol11:~/zabbix-7.0.0alpha3# CC=/usr/pkg/gcc6/bin/gcc LDFLAGS+=-L/usr/pkg/gcc6/lib CFLAGS+='-I/usr/pkg/gcc6/include -lnsl' ./configure '--prefix=/usr/local/zabbix' '--sysconfdir=/etc/zabbix' --enable-agent --with-libpcre2 '--with-libpcre2-lib=/usr/local/pcre2-10.42/lib' '--with-libpcre2-include=/usr/local/pcre2-10.42/include' '--with-openssl-lib=/usr/pkg/lib' '--with-openssl-include=/usr/pkg/include/openssl'
root@sol11:~/zabbix-7.0.0alpha3# make

...

root@sol11:~/zabbix-7.0.0alpha3# ./src/zabbix_agent/zabbix_agentd -V
zabbix_agentd (daemon) (Zabbix) 7.0.0alpha3
Revision 510cfd62f92 20 June 2023, compilation time: Jun 29 2023 07:56:07Copyright (C) 2023 Zabbix SIA
License GPLv2+: GNU GPL version 2 or later <https://www.gnu.org/licenses/>.
This is free software: you are free to change and redistribute it according to
the license. There is NO WARRANTY, to the extent permitted by law. 

But it show same build error in HP-UX.

# PATH=/usr/local/bin:/usr/local/sbin:/usr/local/ia64/bin/gcc:$PATH CFLAGS=-std=gnu99 ./configure --enable-agent --sysconfdir=/etc/zabbix --localstatedir=/var --with-libpcre2 --with-libpcre2-lib=/usr/local/pcre2-10.42/lib --with-libpcre2-include=/usr/local/pcre2-10.42/include --with-openssl=/usr/local/openssl-1.1.1u CC=/usr/bin/gcc
# make

...

        /usr/bin/gcc -DZABBIX_DAEMON  -DDEFAULT_CONFIG_FILE="\"/etc/zabbix/zabbix_agentd.conf\""  -DDEFAULT_LOAD_MODULE_PATH="\"/usr/local/lib/modules\""  -I/usr/local/openssl-1.1.1u/include -std=gnu99  -I/usr/local/pcre2-10.42/include  -L/usr/local/openssl-1.1.1u/lib   -L/usr/local/pcre2-10.42/lib  -o zabbix_agentd zabbix_agentd-zabbix_agentd.o libzbxagent.a  active_checks/libzbxactive_checks.a  logfiles/libzbxlogfiles.a  ../../src/libs/zbxsysinfo/libzbxagentsysinfo.a  ../../src/libs/zbxsysinfo/hpux/libspecsysinfo.a  ../../src/libs/zbxsysinfo/hpux/libspechostnamesysinfo.a  ../../src/libs/zbxsysinfo/agent/libagentsysinfo.a  ../../src/libs/zbxsysinfo/common/libcommonsysinfo.a  ../../src/libs/zbxsysinfo/common/libcommonsysinfo_httpmetrics.a  ../../src/libs/zbxsysinfo/common/libcommonsysinfo_http.a  ../../src/libs/zbxsysinfo/simple/libsimplesysinfo.a  ../../src/libs/zbxsysinfo/alias/libalias.a  ../../src/libs/zbxlog/libzbxlog.a  ../../src/libs/zbxregexp/libzbxregexp.a  ../../src/libs/zbxthreads/libzbxthreads.a  ../../src/libs/zbxmutexs/libzbxmutexs.a  ../../src/libs/zbxprof/libzbxprof.a  ../../src/libs/zbxnix/libzbxnix.a  ../../src/libs/zbxcomms/libzbxcomms.a  ../../src/libs/zbxcommshigh/libzbxcommshigh.a  ../../src/libs/zbxconf/libzbxconf.a  ../../src/libs/zbxjson/libzbxjson.a  ../../src/libs/zbxalgo/libzbxalgo.a  ../../src/libs/zbxvariant/libzbxvariant.a  ../../src/libs/zbxcommon/libzbxcommon.a  ../../src/libs/zbxgetopt/libzbxgetopt.a  ../../src/libs/zbxhash/libzbxhash.a  ../../src/libs/zbxcrypto/libzbxcrypto.a  ../../src/libs/zbxexec/libzbxexec.a  ../../src/libs/zbxcompress/libzbxcompress.a  ../../src/libs/zbxmodules/libzbxmodules.a  ../../src/libs/zbxhttp/libzbxhttp.a  ../../src/libs/zbxfile/libzbxfile.a  ../../src/libs/zbxip/libzbxip.a  ../../src/libs/zbxtime/libzbxtime.a  ../../src/libs/zbxnum/libzbxnum.a  ../../src/libs/zbxstr/libzbxstr.a  ../../src/libs/zbxparam/libzbxparam.a  ../../src/libs/zbxexpr/libzbxexpr.a  -lssl -lcrypto   -lpthread -lm    -lpcre2-8 -liconv
ld: Unsatisfied symbol "zbx_get_diskstat" in file ../../src/libs/zbxsysinfo/common/libcommonsysinfo.a[libcommonsysinfo_a-diskdevices.o]
1 errors.
collect2: ld returned 1 exit status
*** Error exit code 1 
Comment by Artjoms Rimdjonoks [ 2023 Jun 29 ]

Available in versions:

Comment by Andris Mednis [ 2023 Jun 29 ]

Thanks, uki, for confirming that Solaris build now works!

Generated at Wed Jan 22 06:03:30 EET 2025 using Jira 9.12.4#9120004-sha1:625303b708afdb767e17cb2838290c41888e9ff0.