[ZBX-12798] configure: error: Unable to use libpcre (libpcre check failed) on HP-UX Created: 2017 Sep 29  Updated: 2025 Sep 23  Resolved: 2017 Nov 24

Status: Closed
Project: ZABBIX BUGS AND ISSUES
Component/s: Installation (I)
Affects Version/s: 3.4.2
Fix Version/s: 3.4.5rc1, 4.0.0alpha1, 4.0 (plan)

Type: Problem report Priority: Minor
Reporter: Andrius Umbrasas Assignee: Valdis Kauķis (Inactive)
Resolution: Fixed Votes: 0
Labels: agent, configure, hp-ux
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

HP-UX 11.31


Attachments: Zip Archive config.zip    
Issue Links:
Duplicate
Team: Team A
Sprint: Sprint 21
Story Points: 0.25

 Description   

pcre libs from http://hpux.connect.org.uk/hppd/hpux/Languages/pcre-8.41/

Configuring source with options:
./configure --enable-agent --with-iconv-include=/usr/local/include --with-iconv-lib=/usr/local/lib/hpux32 --with-libpcre=/usr/local/lib/hpux32 --with-libpcre-include=/usr/local/include
fails with:
checking for libpcre support... configure: error: Unable to use libpcre (libpcre check failed)

According to config.log, pcreposix lib is wrongly expected at /usr/local/lib/hpux32/lib, though should be at /usr/local/lib/hpux32/
configure:10511: gcc -o conftest -g -O2 -I/usr/local/include -L/usr/local/lib/hpux32/lib conftest.c -lm -lpcreposix -lpcre >&5
ld: Can't find library for -lpcreposix
Fatal error.

Configuring --with-libpcre=/usr/local/lib/hpux32/lib fails when searching in /usr/local/lib/hpux32/lib/lib

Workaround:
Create /usr/local/lib/hpux32/lib and link libpcre*, libpcreposix* files to /usr/local/lib/hpux32/
-bash-4.4# ll /usr/local/lib/hpux32/lib
lrwxr-xr-x 1 root sys 31 Sep 29 14:42 libpcre.a -> /usr/local/lib/hpux32/libpcre.a
lrwxr-xr-x 1 root sys 32 Sep 29 14:42 libpcre.la -> /usr/local/lib/hpux32/libpcre.la
lrwxr-xr-x 1 root sys 32 Sep 29 14:42 libpcre.so -> /usr/local/lib/hpux32/libpcre.so
lrwxr-xr-x 1 root sys 36 Sep 22 00:56 libpcreposix.a -> /usr/local/lib/hpux32/libpcreposix.a
lrwxr-xr-x 1 root sys 37 Sep 22 00:57 libpcreposix.la -> /usr/local/lib/hpux32/libpcreposix.la
lrwxr-xr-x 1 root sys 37 Sep 22 00:57 libpcreposix.so -> /usr/local/lib/hpux32/libpcreposix.so



 Comments   
Comment by Andris Mednis [ 2017 Sep 29 ]

I think we should add '--with-libpcre-lib' to "configure" script for such situations.

Comment by Fernando Rogerio [ 2017 Oct 11 ]

install libpcre3-dev

Comment by Vladislavs Sokurenko [ 2017 Nov 24 ]

Successfully tested with small related improvement in r74987

Comment by Valdis Kauķis (Inactive) [ 2017 Nov 24 ]

Available in:

  • 3.4.5rc1 r74995
  • 4.0.0alpha1 r74996
Comment by Valdis Kauķis (Inactive) [ 2017 Nov 24 ]

User is supposed to use ./configure --help where the option is described.

Comment by Bill Maloney [ 2018 Jul 17 ]

I am getting configure: error: Unable to use libpcre (libpcre check failed).

Comment by Andris Mednis [ 2018 Jul 17 ]

Is there libpcre (with header files) installed on your HP-UX ?

Generated at Wed Sep 24 23:09:36 EEST 2025 using Jira 9.12.4#9120004-sha1:625303b708afdb767e17cb2838290c41888e9ff0.