[ZBX-15764] Install agent 4.0 from sources for HP-UX configure error Created: 2019 Mar 05 Updated: 2020 Jan 31 Resolved: 2020 Jan 29 |
|
Status: | Closed |
Project: | ZABBIX BUGS AND ISSUES |
Component/s: | Agent (G) |
Affects Version/s: | None |
Fix Version/s: | None |
Type: | Documentation task | Priority: | Trivial |
Reporter: | 112530641 | Assignee: | Andris Mednis |
Resolution: | Workaround proposed | Votes: | 0 |
Labels: | compilation, hp-ux | ||
Remaining Estimate: | Not Specified | ||
Time Spent: | Not Specified | ||
Original Estimate: | Not Specified | ||
Environment: |
ia64 |
Attachments: | config.log config.log |
Team: | Team A |
Sprint: | Sprint 56 (Sep 2019), Sprint 55 (Aug 2019), Sprint 54 (Jul 2019), Sprint 57 (Oct 2019), Sprint 58 (Nov 2019), Sprint 59 (Dec 2019), Sprint 60 (Jan 2020) |
Description |
Steps to reproduce:
error from config.log: Configure:12247:checking for libpcre support Configure:12311:cc -o conftest -D_HPUX_API_LEVEL=20040821 -g -I/usr/local/include -L/usr/local/lib conftest.c -lm -lpcre >&5 Ld:Can't find library for -lpcre
Configure:12340:error:Unable to use libpcre (libpcre check failed) Before: |
Comments |
Comment by Andris Mednis [ 2019 Mar 05 ] | |||
Configure:12311:cc -o conftest -D_HPUX_API_LEVEL=20040821 -g -I/usr/local/include -L/usr/local/lib conftest.c -lm -lpcre >&5 shows that configure script expects PCRE libraries in /usr/local/lib directory. Depot pcre-8.42-ia64_64-11.31.depot.gz installs them in /usr/local/lib/hpux64. You can try something like ./configure --enable-agent --with-libpcre-include=/usr/local/include --with-libpcre-lib=/usr/local/lib/hpux64 | |||
Comment by 112530641 [ 2019 Mar 06 ] | |||
HI ,andris ,thx for answer,but the results as follows: $./configure --enable-agent --with-libpcre-include=/usr/local/include --with-libpcre-lib=/usr/local/lib/hpux64 configure:12247:chenking for libpcre suppore configure:12311:cc -o conftest -D_HPUX_API_LEVEL=20040821 -g -I/usr/local/include -L/usr/local/lib/hpux64 conftest.c -lm -lpcre>&5
configure:12340:error:Unable to use libpcre(libpcre check failed)
ls /usr/local/include pcre.h pcre_scanner.h pcre_stringpiece.h pcrecpp.h pcrecpparg.h pcreposix.h
ls /usr/local/lib/hpux64 libpcre.a libpcre.so libpcrecpp.la libpcreposix.a libpcreposix.so libpcre.la libpcrecpp.a libpcrecpp.so libpcreposix.la pkgconfig
| |||
Comment by Andris Mednis [ 2019 Mar 06 ] | |||
Can you upload (as attachment) config.log (produced after running ./configure)? There should be more info how it fails. | |||
Comment by 112530641 [ 2019 Mar 08 ] | |||
hi,andris,I have upload the config.log,please help me analysis the log. | |||
Comment by Andris Mednis [ 2019 Mar 08 ] | |||
Thanks! config.log shows: configure:12247: checking for libpcre support configure:12311: cc -o conftest -D_HPUX_API_LEVEL=20040821 -g -I/usr/local/include -L/usr/local/lib/hpux64 conftest.c -lm -lpcre >&5 ld: Mismatched ABI for -lpcre, found /usr/local/lib/hpux64/libpcre.so Fatal error. configure:12311: $? = 1 configure: failed program was: | /* confdefs.h */ | #define PACKAGE_NAME "Zabbix" | #define PACKAGE_TARNAME "zabbix" | #define PACKAGE_VERSION "4.0.3" | #define PACKAGE_STRING "Zabbix 4.0.3" | #define PACKAGE_BUGREPORT "" | #define PACKAGE_URL "" | #define PACKAGE "zabbix" | #define VERSION "4.0.3" ... | #define HPUX_VERSION 1131 | #define ARCH "hpux" | #define SIZEOF_VOID_P 4 | /* end confdefs.h. */ | | #include <pcre.h> | | int | main () | { | | const char* error = NULL; | int error_offset = -1; | pcre *regexp = pcre_compile("test", PCRE_UTF8, &error, &error_offset, NULL); | pcre_free(regexp); | | ; | return 0; | } configure:12340: error: Unable to use libpcre (libpcre check failed) ... It seems like it fails because pcre-8.42-ia64_64-11.31.depot from http://hpux.connect.org.uk/hppd/hpux/Languages/pcre-8.42/ contains only 64-bit versions of PCRE library (as required by Zabbix agent), but "configure" script tries to build a 32-bit test program to determine if PCRE library is usable. You can try to require 64-bit mode with: CFLAGS="+DD64" ./configure --enable-agent --with-libpcre-include=/usr/local/include --with-libpcre-lib=/usr/local/lib/hpux64 If nothing else helps you can try to build a 32-bit agent. On http://hpux.connect.org.uk/hppd/hpux/Languages/pcre-8.41/ you can find a 32-bit depot http://hpux.connect.org.uk/ftp/hpux/Languages/pcre-8.41/pcre-8.41-ia64_32-11.31.depot.gz. Install it and it should compile successfully. One question is not quite clear - is it ok to use 32-bit agent or do we need 64-bit agent? I remember we have added enforcing for 64-bit compilation for agent on AIX and Solaris, because some items worked incorrectly with 32-bit agents. Probably the right solution is to do the same for HP-UX, too. It could be necessary, for example, to monitor large log files (beyond 2 GB). | |||
Comment by 112530641 [ 2019 Mar 11 ] | |||
HI ,andris ,thank you very much. This problem has been solved. by the command you proposed: "CFLAGS="+DD64" ./configure --enable-agent --with-libpcre-include=/usr/local/include --with-libpcre-lib=/usr/local/lib/hpux64" | |||
Comment by Andris Mednis [ 2019 Mar 11 ] | |||
Thanks, 112530641 ! Nice to hear |