1 (edited by mvug 2017-01-18 08:50:02)

Topic: [php 7.1.1] Unable to load dynamic library '/usr/lib64/php/modules/int

I updated today to php 7.1.1 and I get this error:

It seems to happen when using composer, or command line php..


PHP Warning:  PHP Startup: Unable to load dynamic library '/usr/lib64/php/modules/intl.so' - /usr/lib64/php/modules/intl.so: undefined symbol: __cxa_throw_bad_array_new_length in Unknown on line 0

php -v
PHP 7.1.1 (cli) (built: Jan 18 2017 08:16:38) ( NTS )
Copyright (c) 1997-2017 The PHP Group
Zend Engine v3.1.0, Copyright (c) 1998-2017 Zend Technologies
    with Zend OPcache v7.1.1, Copyright (c) 1999-2017, by Zend Technologies
    with blackfire v1.14.2~linux-x64-non_zts71, https://blackfire.io, by Blackfireio Inc.

Re: [php 7.1.1] Unable to load dynamic library '/usr/lib64/php/modules/int

Distro, version, arch ?

Laptop:  Fedora 38 + rpmfusion + remi (SCL only)
x86_64 builder: Fedora 39 + rpmfusion + remi-test
aarch64 builder: RHEL 9 with EPEL
Hosting Server: CentOS 8 Stream with EPEL, rpmfusion, remi

3 (edited by mvug 2017-01-18 08:56:02)

Re: [php 7.1.1] Unable to load dynamic library '/usr/lib64/php/modules/int

centos 7 x86_64

Re: [php 7.1.1] Unable to load dynamic library '/usr/lib64/php/modules/int

Indeed, I can reproduce.... need to understand why...


P.S. 7.1.1 removed from EL-7 repo, working on it, seems a devtoolset-6 (gcc 6.2) issue, will try to rebuild using old gcc.

Laptop:  Fedora 38 + rpmfusion + remi (SCL only)
x86_64 builder: Fedora 39 + rpmfusion + remi-test
aarch64 builder: RHEL 9 with EPEL
Hosting Server: CentOS 8 Stream with EPEL, rpmfusion, remi

Re: [php 7.1.1] Unable to load dynamic library '/usr/lib64/php/modules/int

Remi wrote:

Indeed, I can reproduce.... need to understand why...


P.S. 7.1.1 removed from EL-7 repo, working on it, seems a devtoolset-6 (gcc 6.2) issue, will try to rebuild using old gcc.


cool thanks :-)

Re: [php 7.1.1] Unable to load dynamic library '/usr/lib64/php/modules/int

Fixed by https://github.com/remicollet/remirepo/ … 3d09b140aa

New build (7.1.1-2) just uploaded to the repository (test welcome to confirm everything is now ok)

So, seems really a gcc 6.2 issue, reported as https://bugzilla.redhat.com/1414348

If the bug is fixed upstream (Red Hat Developer Toolset), I will try for next RC to re-enable it, as it gives an interesting ~3% perf. gain.

BTW, big thanks for the quick report of this breakage, and sorry for the inconvenience.

Laptop:  Fedora 38 + rpmfusion + remi (SCL only)
x86_64 builder: Fedora 39 + rpmfusion + remi-test
aarch64 builder: RHEL 9 with EPEL
Hosting Server: CentOS 8 Stream with EPEL, rpmfusion, remi

Re: [php 7.1.1] Unable to load dynamic library '/usr/lib64/php/modules/int

After a few more work, and thanks to the help of gcc RH guy, we found this is not a dts/gcc issue, but rather a PHP bug.
https://bugs.php.net/73956

So, back using GCC 6.2: https://git.io/vMXRg

New build (7.1.1-3) are now available in the testing repository (remi-php71-test for base packages, remi-test for SCL)

If you can give them a try, feedback welcome.

I plan to push in stable for next version (7.1.2RC1 in 2 weeks, 7.1.2 next month).

Laptop:  Fedora 38 + rpmfusion + remi (SCL only)
x86_64 builder: Fedora 39 + rpmfusion + remi-test
aarch64 builder: RHEL 9 with EPEL
Hosting Server: CentOS 8 Stream with EPEL, rpmfusion, remi

8 (edited by shripatel 2018-01-06 07:33:13)

Re: [php 7.1.1] Unable to load dynamic library '/usr/lib64/php/modules/int

Hi,
i have installed php72-php-intl.x86_64 with PHP 7.2.0 (cli) (built: Nov 28 2017 20:22:21) ( NTS )

But getting following error,
/usr/lib64/php/modules/intl.so (/lib64/libicuio.so.50: undefined symbol: _ZN6icu_5013UnicodeString9doReplaceEiiPKtii)) in Unknown on line 0


Can you please guide how do i resolve the same? sorry if a newbie question.

OS: CENTOS 7 .

Re: [php 7.1.1] Unable to load dynamic library '/usr/lib64/php/modules/int

> i have installed php72-php-intl.x86_64 with PHP 7.2.0 (cli) (built: Nov 28 2017 20:22:21) ( NTS )
> /usr/lib64/php/modules/intl.so (/lib64/libicuio.so.50: undefined symbol: _ZN6icu_5013UnicodeString9doReplaceEiiPKtii)) in Unknown on line 0

This looks inconsistent.

php72-php-intl (SCL packages) install extension in /opt/remi/php72/root/usr/lib64/php/modules/intl.so

And I cannot reproduce

# php72 -v
PHP 7.2.1 (cli) (built: Jan  3 2018 07:51:38) ( NTS )
Copyright (c) 1997-2017 The PHP Group
Zend Engine v3.2.0, Copyright (c) 1998-2017 Zend Technologies

# php72 -m | grep intl
intl

php-intl (base package) install extension in /usr/lib64/php/modules/intl.so

Also cannot reproduce

# php -v
PHP 7.2.1 (cli) (built: Jan  3 2018 08:53:04) ( NTS )
Copyright (c) 1997-2017 The PHP Group
Zend Engine v3.2.0, Copyright (c) 1998-2017 Zend Technologies

# php -m | grep intl
intl

Please check

# ldd /usr/lib64/php/modules/intl.so | grep icu
    libicui18n.so.50 => /lib64/libicui18n.so.50 (0x00007f8b32b86000)
    libicuuc.so.50 => /lib64/libicuuc.so.50 (0x00007f8b3280d000)
    libicudata.so.50 => /lib64/libicudata.so.50 (0x00007f8b31239000)
    libicuio.so.50 => /lib64/libicuio.so.50 (0x00007f8b3102a000)

# rpm -qf /lib64/libicuio.so.50
libicu-50.1.2-15.el7.x86_64

# rpm --verify libicu
Laptop:  Fedora 38 + rpmfusion + remi (SCL only)
x86_64 builder: Fedora 39 + rpmfusion + remi-test
aarch64 builder: RHEL 9 with EPEL
Hosting Server: CentOS 8 Stream with EPEL, rpmfusion, remi

Re: [php 7.1.1] Unable to load dynamic library '/usr/lib64/php/modules/int

Thanks alot for helping,
in ldd there is difference in output,

ldd /usr/lib64/php/modules/intl.so | grep icu
        libicui18n.so.50 => /lib/libicui18n.so.50 (0x00007ff1ed4a2000)
        libicuuc.so.50 => /lib/libicuuc.so.50 (0x00007ff1ed0b9000)
        libicudata.so.50 => /lib/libicudata.so.50 (0x00007ff1ebae6000)
        libicuio.so.50 => /lib64/libicuio.so.50 (0x00007ff1eb8d7000)
[root]# rpm -qf /lib64/libicuio.so.50
libicu-50.1.2-15.el7.x86_64

[root]# rpm --verify libicu

[root]# php --version
PHP Warning:  PHP Startup: Unable to load dynamic library 'intl' (tried: /usr/lib64/php/modules/intl (/usr/lib64/php/modules/intl: cannot open shared object file: No such file or directory), /usr/lib64/php/modules/intl.so (/lib64/libicuio.so.50: undefined symbol: _ZN6icu_5013UnicodeString9doReplaceEiiPKtii)) in Unknown on line 0
PHP 7.2.1 (cli) (built: Jan  3 2018 08:53:04) ( NTS )
Copyright (c) 1997-2017 The PHP Group
Zend Engine v3.2.0, Copyright (c) 1998-2017 Zend Technologies

Re: [php 7.1.1] Unable to load dynamic library '/usr/lib64/php/modules/int

Where does the 32-bit library comes from ?

rpm -qf  /lib/libicui18n.so.50

I don't understand how this can happens, /lib should never be used on a 64-bit distro...

Laptop:  Fedora 38 + rpmfusion + remi (SCL only)
x86_64 builder: Fedora 39 + rpmfusion + remi-test
aarch64 builder: RHEL 9 with EPEL
Hosting Server: CentOS 8 Stream with EPEL, rpmfusion, remi

Re: [php 7.1.1] Unable to load dynamic library '/usr/lib64/php/modules/int

how to confirm its 64 bit ?

rpm -qf  /lib/libicui18n.so.50
file /lib/libicui18n.so.50 is not owned by any package

i removed libicu and all dependent packages reinstalled php-intl.
But still same error.

Installing:
php-intl        x86_64        7.2.1-1.el7.remi         remi-php72        211 k
Installing for dependencies:
libicu          x86_64        50.1.2-15.el7            base              6.9 M


Same error i am getting.

Re: [php 7.1.1] Unable to load dynamic library '/usr/lib64/php/modules/int

ldd output again ?

Laptop:  Fedora 38 + rpmfusion + remi (SCL only)
x86_64 builder: Fedora 39 + rpmfusion + remi-test
aarch64 builder: RHEL 9 with EPEL
Hosting Server: CentOS 8 Stream with EPEL, rpmfusion, remi

Re: [php 7.1.1] Unable to load dynamic library '/usr/lib64/php/modules/int

ldd /usr/lib64/php/modules/intl.so | grep icu
        libicui18n.so.50 => /lib/libicui18n.so.50 (0x00007f0c598bc000)
        libicuuc.so.50 => /lib/libicuuc.so.50 (0x00007f0c594d3000)
        libicudata.so.50 => /lib/libicudata.so.50 (0x00007f0c57f00000)
        libicuio.so.50 => /lib64/libicuio.so.50 (0x00007f0c57cf1000)

Re: [php 7.1.1] Unable to load dynamic library '/usr/lib64/php/modules/int

What is the output of

 file /lib/libicu*

BTW, you should remove the /lib/libicu* files (as not provided by anything)

Notice: if you have any manually installed 32-bit app which rely on it, it will be broken

Laptop:  Fedora 38 + rpmfusion + remi (SCL only)
x86_64 builder: Fedora 39 + rpmfusion + remi-test
aarch64 builder: RHEL 9 with EPEL
Hosting Server: CentOS 8 Stream with EPEL, rpmfusion, remi

Re: [php 7.1.1] Unable to load dynamic library '/usr/lib64/php/modules/int

file /lib/libicu*
/lib/libicudata.so.50:   ELF 64-bit LSB shared object, x86-64, version 1 (SYSV), dynamically linked, BuildID[sha1]=d44d66e2fc0f36bc57e6e1807aae8ef41f16791d, not stripped
/lib/libicudecnumber.so: ELF 64-bit LSB shared object, x86-64, version 1 (SYSV), dynamically linked, BuildID[sha1]=90795181e93f1f352cbcb8479049ff0f3f7f2e6e, not stripped
/lib/libicui18n.so.50:   ELF 64-bit LSB shared object, x86-64, version 1 (SYSV), dynamically linked, BuildID[sha1]=a40fe88d2e7739095b8e26f7b9d6e1d59089ceae, not stripped
/lib/libicuuc.so.50:     ELF 64-bit LSB shared object, x86-64, version 1 (SYSV), dynamically linked, BuildID[sha1]=be9ca888fd397b6b0329100ad6bf600e26a10e70, not stripped

removing, no i have not installed any 32 bit application.

Re: [php 7.1.1] Unable to load dynamic library '/usr/lib64/php/modules/int

great , many many thanks,

intl not giving any error now.

By the way , i did not understand how it was not working, i use yum only to install packages.

Re: [php 7.1.1] Unable to load dynamic library '/usr/lib64/php/modules/int

shripatel wrote:

file /lib/libicu*
/lib/libicudata.so.50:   ELF 64-bit LSB shared object, x86-64, version 1 (SYSV), dynamically linked, BuildID[sha1]=d44d66e2fc0f36bc57e6e1807aae8ef41f16791d, not stripped
/lib/libicudecnumber.so: ELF 64-bit LSB shared object, x86-64, version 1 (SYSV), dynamically linked, BuildID[sha1]=90795181e93f1f352cbcb8479049ff0f3f7f2e6e, not stripped
/lib/libicui18n.so.50:   ELF 64-bit LSB shared object, x86-64, version 1 (SYSV), dynamically linked, BuildID[sha1]=a40fe88d2e7739095b8e26f7b9d6e1d59089ceae, not stripped
/lib/libicuuc.so.50:     ELF 64-bit LSB shared object, x86-64, version 1 (SYSV), dynamically linked, BuildID[sha1]=be9ca888fd397b6b0329100ad6bf600e26a10e70, not stripped

removing, no i have not installed any 32 bit application.

These files are obviously some manually installed libraries (build from sources).

shripatel wrote:

intl not giving any error now.

Great smile

Laptop:  Fedora 38 + rpmfusion + remi (SCL only)
x86_64 builder: Fedora 39 + rpmfusion + remi-test
aarch64 builder: RHEL 9 with EPEL
Hosting Server: CentOS 8 Stream with EPEL, rpmfusion, remi