Summary: | net-analyzer/zabbix-1.8-r1 fails to compile w/ USE='server openipmi' | ||
---|---|---|---|
Product: | Gentoo Linux | Reporter: | Yuri Vasilevski (RETIRED) <yvasilev> |
Component: | Current packages | Assignee: | Patrick Lauer <patrick> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | esigra |
Priority: | High | ||
Version: | unspecified | ||
Hardware: | All | ||
OS: | Linux | ||
URL: | https://support.zabbix.com/browse/ZBX-494 | ||
Whiteboard: | |||
Package list: | Runtime testing required: | --- | |
Bug Depends on: | |||
Bug Blocks: | 129413 | ||
Attachments: |
zabbix-as-needed.patch
Patch from upstream for 1.8.3 |
Description
Yuri Vasilevski (RETIRED)
2010-02-16 22:40:44 UTC
Sorry, forgot to include zabbix's custom USE flags:
# grep zabbix /etc/portage/package.use
net-analyzer/zabbix postgres -sqlite3 agent curl frontend jabber openipmi proxy server snmp
>>> Emerging (1 of 1) net-analyzer/zabbix-1.8-r1
* zabbix-1.8.tar.gz RMD160 SHA1 SHA256 size ;-) ... [ ok ]
* checking ebuild checksums ;-) ... [ ok ]
* checking auxfile checksums ;-) ... [ ok ]
* checking miscfile checksums ;-) ... [ ok ]
* CPV: net-analyzer/zabbix-1.8-r1
* REPO: gentoo
* USE: agent amd64 curl elibc_glibc frontend ipv6 jabber kernel_linux multilib openipmi postgres proxy server snmp userland_GNU
*
* Using dev-lang/php-5.2.12
Yes, it is because of the --as-needed flag. If I change the order the libs are passed for linking the final binary moving "-lOpenIPMI -lOpenIPMIposix" to the end of the list, it links fine. (More info on: http://www.gentoo.org/proj/en/qa/asneeded.xml -> Importance of linking order. The gcc invocation that works is: x86_64-pc-linux-gnu-gcc -DZABBIX_DAEMON -march=nocona -Os -fomit-frame-pointer -pipe -I/usr/include/postgresql-8.4 -I. -I/usr/include -I/usr/include -L/usr/lib64/postgresql-8.4/lib64 -lpq -liksemel -lcurl -lrt -lz -lgnutls -L/usr/lib64 -lnetsnmp -lcrypto -L/usr/lib64 -lnetsnmp -lcrypto -Wl,-O1 -Wl,--as-needed -L/usr/lib -o zabbix_server zabbix_server-actions.o zabbix_server-operations.o zabbix_server-events.o zabbix_server-zlog.o zabbix_server-server.o alerter/libzbxalerter.a dbsyncer/libzbxdbsyncer.a dbconfig/libzbxdbconfig.a discoverer/libzbxdiscoverer.a pinger/libzbxpinger.a poller/libzbxpoller.a housekeeper/libzbxhousekeeper.a timer/libzbxtimer.a trapper/libzbxtrapper.a nodewatcher/libzbxnodewatcher.a utils/libzbxutils.a httppoller/libzbxhttppoller.a watchdog/libzbxwatchdog.a escalator/libzbxescalator.a ../../src/libs/zbxsysinfo/libzbxserversysinfo.a ../../src/libs/zbxsysinfo/linux/libspecsysinfo.a ../../src/libs/zbxsysinfo/common/libcommonsysinfo.a ../../src/libs/zbxsysinfo/simple/libsimplesysinfo.a ../../src/libs/zbxlog/libzbxlog.a ../../src/libs/zbxdbcache/libzbxdbcache.a ../../src/libs/zbxnix/libzbxnix.a ../../src/libs/zbxsys/libzbxsys.a ../../src/libs/zbxconf/libzbxconf.a ../../src/libs/zbxemail/libzbxemail.a ../../src/libs/zbxsms/libzbxsms.a ../../src/libs/zbxcommon/libzbxcommon.a ../../src/libs/zbxcrypto/libzbxcrypto.a ../../src/libs/zbxcomms/libzbxcomms.a ../../src/libs/zbxjson/libzbxjson.a ../../src/libs/zbxserver/libzbxserver.a ../../src/libs/zbxicmpping/libzbxicmpping.a ../../src/libs/zbxdbhigh/libzbxdbhigh.a ../../src/libs/zbxdb/libzbxdb.a ../../src/libs/zbxjabber/libzbxjabber.a -liksemel -lcurl -lnetsnmp -lm -lresolv -lOpenIPMI -lOpenIPMIposix Created attachment 219957 [details, diff]
zabbix-as-needed.patch
This patch fixes compiling zabbix with --as-needed in LDFLAGS, all versions in portage are affected and this patch works with them.
Upstream bug URL: https://support.zabbix.com/browse/ZBX-494 + 20 Feb 2010; Patrick Lauer <patrick@gentoo.org> zabbix-1.8-r1.ebuild, + +files/zabbix-as-needed.patch: + Fix for as-needed building by Yuri Vasilevski, fixes #305449 Created attachment 258570 [details, diff]
Patch from upstream for 1.8.3
zabbix-1.8.3 still fails to build
Patch from upstream bug (ZBX-494) helps.
|