[ZBXNEXT-4826] Hardcoded in configure.ac ranlib executable name breaks compilation with LTO Created: 2018 Aug 03 Updated: 2018 Oct 29 |
|
Status: | Open |
Project: | ZABBIX FEATURE REQUESTS |
Component/s: | Installation (I) |
Affects Version/s: | None |
Fix Version/s: | None |
Type: | Change Request | Priority: | Trivial |
Reporter: | Sergey Kuritsin | Assignee: | Zabbix Support Team |
Resolution: | Unresolved | Votes: | 0 |
Labels: | ranlib | ||
Remaining Estimate: | Not Specified | ||
Time Spent: | Not Specified | ||
Original Estimate: | Not Specified | ||
Environment: |
Debian Wheezy, gcc 8.2 |
Description |
When compiling Zabbix with gcc -flto compilation breaks due to using wrong ranlib executable name. ranlib is a essenital part of LTO compilation process. Starting with gcc 4.9, LTO compilation requires to use gcc-specific versions of ar, nm and ranlib: gcc-ar, gcc-nm and gcc-ranlib. In packaged gcc versions of the most Linux distributions ranlib and gcc-ranlib usually are the same. But in the cross compilation toolchains they are not. So there is a need to tell the configure process that we are not going to use deault ranlib. RANLIB="ranlib" It means that generated configure will be in all the cases set RANLIB variable to be equal just "ranlib". |
Comments |
Comment by dimir [ 2018 Oct 24 ] |
Do you think it's OK to specify it during ./configure: ./configure RANLIB=gcc-ranlib --enable-server [...] ? |
Comment by Sergey Kuritsin [ 2018 Oct 24 ] |
Yes, it's OK and should be considered as expected behaviour. There is no way for libtool to automatically determine which version of ranlib you are considering to use. |
Comment by dimir [ 2018 Oct 25 ] |
As I understood the patch would be: Index: configure.ac =================================================================== --- configure.ac (revision 86007) +++ configure.ac (working copy) @@ -39,6 +39,7 @@ AC_PROG_CC([cc c99 gcc clang]) AM_PROG_CC_C_O +AM_PROG_LIBTOOL dnl ***************************************************************** dnl * * @@ -1643,9 +1644,6 @@ AC_SUBST(ICONV_CFLAGS) -RANLIB="ranlib" -AC_SUBST(RANLIB) - SERVER_CONFIG_FILE="${sysconfdir}/zabbix_server.conf" PROXY_CONFIG_FILE="${sysconfdir}/zabbix_proxy.conf" AGENT_CONFIG_FILE="${sysconfdir}/zabbix_agentd.conf" Useful links: https://mail.gnome.org/archives/commits-list/2017-February/msg03967.html
|
Comment by Sergey Kuritsin [ 2018 Oct 25 ] |
There is no need for libtool macro AM_PROG_LIBTOOL. Just delete RANLIB="ranlib" and keep AC_SUBST(RANLIB). |