LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (https://www.linuxquestions.org/questions/slackware-14/)
-   -   PHP 7.2 Error (https://www.linuxquestions.org/questions/slackware-14/php-7-2-error-4175667716/)

PROBLEMCHYLD 01-14-2020 04:47 PM

PHP 7.2 Error
 
I'm trying to build php 7.2xxx and get the error but I have the latest installed libpcre from current.

Code:

Configuring extensions
checking for strings.h... (cached) yes
checking io.h usability... no
checking io.h presence... no
checking for io.h... no
checking for strtoll... yes
checking for atoll... yes
checking whether to enable LIBXML support... yes
checking libxml2 install dir... /usr
checking for xml2-config path... /usr/bin/xml2-config
checking whether libxml build works... yes
checking for OpenSSL support... yes, shared
checking for Kerberos support... no
checking whether to use system default cipher list instead of hardcoded value... no
checking for RAND_egd... no
checking for pkg-config... /usr/bin/pkg-config
checking for PCRE headers location... /usr/include
checking for PCRE library location... configure: error: Could not find libpcre.(a|so) in /usr


bassmadrigal 01-14-2020 05:11 PM

Is this on 14.2 or -current? On -current, there are actually 2 pcre packages, l/pcre-8.43 and l/pcre2-10.34. If you're on 14.2, only l/pcre is provided and pcre2 is available on SBo.

Either way, looking at the config.log might provide more insight on why it didn't work.

PROBLEMCHYLD 01-14-2020 05:39 PM

2 Attachment(s)
I have 14.2

pcre2-10.34-x86_64-1
pcre-8.39-x86_64-1

I had to split the logs because they were too big for the forum.

astrogeek 01-14-2020 06:31 PM

I run php-7.3x on all my platforms and it builds fine with pcre2 (currently using 10.33 from an SBo build).

Have you rebooted or run ld{config} since installing pcre2?

(Note: I haven't looked at your logs)

PROBLEMCHYLD 01-14-2020 07:20 PM

Quote:

Originally Posted by astrogeek (Post 6078458)
Have you rebooted or run ld since installing pcre2?

What is this ld you speak of? Never done it or don't recall doing it...Help !!!!!! Please !!!!!!!!!

volkerdi 01-14-2020 07:24 PM

Quote:

Originally Posted by PROBLEMCHYLD (Post 6078468)
What is this ld you speak of? Never done it or don't recall doing it...Help !!!!!! Please !!!!!!!!!

I'm guessing "ldconfig", and you wouldn't need to run it manually because it's run automatically by installpkg.

PROBLEMCHYLD 01-14-2020 07:29 PM

Quote:

Originally Posted by volkerdi (Post 6078469)
I'm guessing "ldconfig", and you wouldn't need to run it manually because it's run automatically by installpkg.

Thanks for your response which means this is NOT the problem.

ljb643 01-14-2020 08:51 PM

Did you use --with-pcre-regex=/usr on the configure command line? This overrides use of PHP's included PCRE library. Is there a reason you can't use the PCRE library that is supplied with PHP, which will always build successfully?

PROBLEMCHYLD 01-15-2020 12:42 AM

Quote:

Originally Posted by ljb643 (Post 6078486)
Did you use --with-pcre-regex=/usr on the configure command line? This overrides use of PHP's included PCRE library. Is there a reason you can't use the PCRE library that is supplied with PHP, which will always build successfully?

No I haven't but running php 7.1.33, I had to do no such thing. So why is 7.2.x different?

PROBLEMCHYLD 01-15-2020 08:15 AM

Quote:

Originally Posted by ljb643 (Post 6078486)
Did you use --with-pcre-regex=/usr on the configure command line? This overrides use of PHP's included PCRE library. Is there a reason you can't use the PCRE library that is supplied with PHP, which will always build successfully?

Code:

EXTENSION_DIR=/usr/lib${LIBDIRSUFFIX}/php/extensions \
CFLAGS="$SLKCFLAGS" \
./configure \
  --prefix=/usr \
  --libdir=/usr/lib${LIBDIRSUFFIX} \
  --with-libdir=lib${LIBDIRSUFFIX} \
  --localstatedir=/var \
  --sysconfdir=/etc \
  --datarootdir=/usr/share \
  --datadir=/usr/share \
  --infodir=/usr/info \
  --mandir=/usr/man \
  --with-apxs2=/usr/bin/apxs \
  --enable-fpm \
  --with-fpm-user=apache \
  --with-fpm-group=apache \
  --enable-maintainer-zts \
  --enable-pcntl \
  --enable-mbregex \
  --enable-tokenizer=shared \
  --with-config-file-scan-dir=/etc/php.d \
  --with-config-file-path=/etc \
  --with-layout=PHP \
  --disable-sigchild \
  --enable-xml \
  --with-libxml-dir=/usr \
  --with-xmlrpc=shared \
  --enable-simplexml \
  --enable-xmlreader=shared \
  --enable-dom=shared \
  --enable-filter \
  --disable-debug \
  --with-openssl=shared \
  --with-pcre-regex=/usr \
  --with-zlib=shared,/usr \
  --enable-bcmath=shared \
  --with-bz2=shared,/usr \
  --enable-calendar=shared \
  --enable-ctype=shared \
  --with-curl=shared \
  --with-mcrypt=/usr \
  --enable-dba=shared \
  --with-gdbm=/usr \
  --with-db4=/usr \
  --enable-exif=shared \
  --enable-ftp=shared \
  --with-gd=shared \
  --with-jpeg-dir=/usr \
  --with-png-dir=/usr \
  --with-zlib-dir=/usr \
  --with-xpm-dir=/usr \
  --with-freetype-dir=/usr \
  --enable-gd-native-ttf \
  --with-gettext=shared,/usr \
  --with-gmp=shared,/usr \
  --with-iconv=shared \
  --with-imap-ssl=/usr \
  --with-imap=$IMAPLIBDIR \
  --with-ldap=shared \
  --enable-mbstring=shared \
  --enable-hash \
  --enable-mysqlnd=shared \
  --with-mysqli=shared,mysqlnd \
  --with-mysql-sock=/var/run/mysql/mysql.sock \
  --with-iodbc=shared,/usr \
  --enable-pdo=shared \
  --with-pdo-mysql=shared,mysqlnd \
  --with-pdo-sqlite=shared,/usr \
  --with-pdo-odbc=shared,iODBC,/usr \
  --with-pspell=shared,/usr \
  --with-enchant=shared,/usr \
  --enable-shmop=shared \
  --with-snmp=shared,/usr \
  --enable-soap=shared \
  --enable-sockets \
  --with-sqlite3=shared \
  --enable-sysvmsg \
  --enable-sysvsem \
  --enable-sysvshm \
  --enable-wddx=shared \
  --with-xsl=shared,/usr \
  --enable-zip=shared \
  --with-tsrm-pthreads \
  --enable-intl=shared \
  --enable-opcache \
  --enable-shared=yes \
  --enable-static=no \
  --with-gnu-ld \
  --with-pic \
  --enable-phpdbg \
  --build=$ARCH-slackware-linux || exit 1

Its already set, so that isn't the problem either.

PROBLEMCHYLD 01-15-2020 09:24 AM

Thanks guys...Changing --with-pcre-regex=/usr \ to --with-pcre-regex \ everything compiled. Not sure removing =/usr was the right thing but it works.

PROBLEMCHYLD 01-15-2020 10:34 AM

PHP version 7.3.13 works just fine on 14.2.

ponce 01-15-2020 11:17 AM

Quote:

Originally Posted by PROBLEMCHYLD (Post 6078452)
I have 14.2

pcre2-10.34-x86_64-1
pcre-8.39-x86_64-1

it seems like you installed the pcre2 package for current on 14.2: that could have surely messed the things up.
if you need pcre2 on 14.2 you can install it from SBo.

PROBLEMCHYLD 01-15-2020 11:19 AM

Thanks ponce

PROBLEMCHYLD 01-20-2020 01:17 PM

Quote:

Originally Posted by ponce (Post 6078642)
it seems like you installed the pcre2 package for current on 14.2: that could have surely messed the things up.
if you need pcre2 on 14.2 you can install it from SBo.

I was able to use pcre2 from current with PHP 7.3.13 using the build from http://ponce.cc/slackware/testing/php-7.2/php-7.2/
and replacing --with-pcre-regex=/usr with --with-external-pcre \ Thanks everyone...


All times are GMT -5. The time now is 07:34 AM.