[Xapian-tickets] [Xapian] #662: xapian-bindings for php / dl(): Unable to load dynamic library

Xapian nobody at xapian.org
Tue Oct 28 16:36:26 GMT 2014


#662: xapian-bindings for php / dl(): Unable to load dynamic library
-----------------------------------+---------------------------
 Reporter:  Sadrak                 |             Owner:
     Type:  defect                 |            Status:  new
 Priority:  normal                 |         Milestone:
Component:  Xapian-bindings (PHP)  |           Version:  1.2.19
 Severity:  normal                 |        Resolution:
 Keywords:                         |        Blocked By:
 Blocking:                         |  Operating System:  Linux
-----------------------------------+---------------------------
\
\
\
\
\
\
Description changed by Sadrak:
\

Old description:

> I have a strange problem with the xapian-bindings for php with a debian
> wheezy.
>
> When i build as a user with
>
> xapian-core:
> `./configure --prefix=/opt/myproject/xapian-core`
>
> xapian-bindings:
> `./configure --with-php --prefix=/opt/myproject/xapian-bindings-php
> PHP_EXTENSION_DIR=/opt/myproject/php-extensions
> XAPIAN_CONFIG=/opt/myproject/xapian-core/bin/xapian-config`
>
> all is fine and a make check is fine for xapian-bindings.
>
> {{{
> $ make check
> Making check in php
> make[1]: Entering directory `/home/user/myproject/build/xapian-
> bindings-1.2.19/php'
> make  check-am
> make[2]: Entering directory `/home/user/myproject/build/xapian-
> bindings-1.2.19/php'
> make  check-TESTS
> make[3]: Entering directory `/home/user/myproject/build/xapian-
> bindings-1.2.19/php'
> PASS: smoketest.php
> =============
> 1 test passed
> =============
> make[3]: Leaving directory `/home/user/myproject/build/xapian-
> bindings-1.2.19/php'
> make[2]: Leaving directory `/home/user/myproject/build/xapian-
> bindings-1.2.19/php'
> make[1]: Leaving directory `/home/user/myproject/build/xapian-
> bindings-1.2.19/php'
> make[1]: Entering directory `/home/user/myproject/build/xapian-
> bindings-1.2.19'
> make[1]: Leaving directory `/home/user/myproject/build/xapian-
> bindings-1.2.19'
> }}}
>
> The ldd looks fine for this:
> {{{
> $ ldd /home/user/myproject/build/xapian-
> bindings-1.2.19/php/.libs/xapian.so
>         linux-vdso.so.1 =>  (0x00007fff32bff000)
>         libxapian.so.22 => /opt/myproject/xapian-core/lib/libxapian.so.22
> (0x00007ffc95cfc000)
>         libz.so.1 => /lib/x86_64-linux-gnu/libz.so.1 (0x00007ffc95ade000)
>         libuuid.so.1 => /lib/x86_64-linux-gnu/libuuid.so.1
> (0x00007ffc958d8000)
>         libstdc++.so.6 => /usr/lib/x86_64-linux-gnu/libstdc++.so.6
> (0x00007ffc955d1000)
>         libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007ffc9534f000)
>         libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007ffc94fc2000)
>         libgcc_s.so.1 => /lib/x86_64-linux-gnu/libgcc_s.so.1
> (0x00007ffc94dac000)
>         /lib64/ld-linux-x86-64.so.2 (0x00007ffc9636f000)
> }}}
>
> {{{
> $ ls -l /opt/averdo/xapian-core/lib/libxapian.so.22*
> lrwxrwxrwx 1 user user       19 Oct 28 16:53 /opt/myproject/xapian-
> core/lib/libxapian.so.22 -> libxapian.so.22.6.6
> -rwxr-xr-x 1 user user 26646198 Oct 28 16:53 /opt/myproject/xapian-
> core/lib/libxapian.so.22.6.6
> }}}
>
> But when i want it build as root without special prefix (defaults to
> /usr/local), i get the following error:
>
> {{{
> Making check in php
> make[1]: Entering directory `/root/build/xapian-bindings-1.2.19/php'
> make  check-am
> make[2]: Entering directory `/root/build/xapian-bindings-1.2.19/php'
> make  check-TESTS
> make[3]: Entering directory `/root/build/xapian-bindings-1.2.19/php'
> /root/build/xapian-bindings-1.2.19/php/php5/xapian.php:22: dl(): Unable
> to load dynamic library '/root/build/xapian-
> bindings-1.2.19/php/.libs/xapian.so' - /root/build/xapian-
> bindings-1.2.19/php/.libs/xapian.so: undefined symbol:
> _ZN6Xapian13TermGenerator19set_max_word_lengthEj
> FAIL: smoketest.php
> =======================================
> 1 of 1 test failed
> Please report to http://xapian.org/bugs
> =======================================
> make[3]: *** [check-TESTS] Error 1
> make[3]: Leaving directory `/root/build/xapian-bindings-1.2.19/php'
> make[2]: *** [check-am] Error 2
> make[2]: Leaving directory `/root/build/xapian-bindings-1.2.19/php'
> make[1]: *** [check] Error 2
> make[1]: Leaving directory `/root/build/xapian-bindings-1.2.19/php'
> make: *** [check-recursive] Error 1
> }}}
>
> I tried with providing XAPIAN_CONFIG=/usr/local/bin/xapian-config,
> building as user and only `make install` as root, using 1.2.18, removing
> the system xapian-config or many other things. Nothing worked.
>
> Here are some infos (like requested in #71):
>
> {{{
> # ldd /root/build/xapian-bindings-1.2.19/php/.libs/xapian.so
>         linux-vdso.so.1 =>  (0x00007fff50bff000)
>         libxapian.so.22 => /usr/lib/libxapian.so.22 (0x00007f9cad87a000)
>         libz.so.1 => /lib/x86_64-linux-gnu/libz.so.1 (0x00007f9cad663000)
>         libuuid.so.1 => /lib/x86_64-linux-gnu/libuuid.so.1
> (0x00007f9cad45d000)
>         libstdc++.so.6 => /usr/lib/x86_64-linux-gnu/libstdc++.so.6
> (0x00007f9cad156000)
>         libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007f9caced4000)
>         libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007f9cacb47000)
>         libgcc_s.so.1 => /lib/x86_64-linux-gnu/libgcc_s.so.1
> (0x00007f9cac931000)
>         /lib64/ld-linux-x86-64.so.2 (0x00007f9cadef6000)
> }}}
>
> {{{
> # ls -l /usr/lib/libxapian.so*
> lrwxrwxrwx 1 root root      19 Dec 11  2012 /usr/lib/libxapian.so.22 ->
> libxapian.so.22.5.0
> -rw-r--r-- 1 root root 1984552 Dec 11  2012 /usr/lib/libxapian.so.22.5.0
> }}}
>
> And after some searching i find the correct libxapian.so, but they are
> ignored.
> {{{
> # ls -l /usr/local/lib/libxapian.so*
> lrwxrwxrwx 1 root staff       19 Oct 28 16:35 /usr/local/lib/libxapian.so
> -> libxapian.so.22.6.6
> lrwxrwxrwx 1 root staff       19 Oct 28 16:35
> /usr/local/lib/libxapian.so.22 -> libxapian.so.22.6.6
> -rwxr-xr-x 1 root staff 26646166 Oct 28 16:35
> /usr/local/lib/libxapian.so.22.6.6
> }}}
>
> xapian-config tell the correct location:
> {{{
> # xapian-config --libs
> -L/usr/local/lib -lxapian
> }}}
>
> When i delete the `/usr/lib/libxapian.so*` files and retry `configure` &
> `make`, ldd tells me, that he can't find libxapian.so (not found). I also
> tried with `LIBS=/usr/local/lib`, still not found.
>
> {{{
> # ldd php/.libs/xapian.so | grep xapian
>         libxapian.so.22 => not found
> }}}

New description:

 I have a strange problem with the xapian-bindings for php with a debian
 wheezy.

 When i build as a user with

 xapian-core:
 `./configure --prefix=/opt/myproject/xapian-core`

 xapian-bindings:
 `./configure --with-php --prefix=/opt/myproject/xapian-bindings-php
 PHP_EXTENSION_DIR=/opt/myproject/php-extensions
 XAPIAN_CONFIG=/opt/myproject/xapian-core/bin/xapian-config`

 all is fine and a make check is fine for xapian-bindings.

 {{{
 $ make check
 Making check in php
 make[1]: Entering directory `/home/user/myproject/build/xapian-
 bindings-1.2.19/php'
 make  check-am
 make[2]: Entering directory `/home/user/myproject/build/xapian-
 bindings-1.2.19/php'
 make  check-TESTS
 make[3]: Entering directory `/home/user/myproject/build/xapian-
 bindings-1.2.19/php'
 PASS: smoketest.php
 =============
 1 test passed
 =============
 make[3]: Leaving directory `/home/user/myproject/build/xapian-
 bindings-1.2.19/php'
 make[2]: Leaving directory `/home/user/myproject/build/xapian-
 bindings-1.2.19/php'
 make[1]: Leaving directory `/home/user/myproject/build/xapian-
 bindings-1.2.19/php'
 make[1]: Entering directory `/home/user/myproject/build/xapian-
 bindings-1.2.19'
 make[1]: Leaving directory `/home/user/myproject/build/xapian-
 bindings-1.2.19'
 }}}

 The ldd looks fine for this:
 {{{
 $ ldd /home/user/myproject/build/xapian-
 bindings-1.2.19/php/.libs/xapian.so
         linux-vdso.so.1 =>  (0x00007fff32bff000)
         libxapian.so.22 => /opt/myproject/xapian-core/lib/libxapian.so.22
 (0x00007ffc95cfc000)
         libz.so.1 => /lib/x86_64-linux-gnu/libz.so.1 (0x00007ffc95ade000)
         libuuid.so.1 => /lib/x86_64-linux-gnu/libuuid.so.1
 (0x00007ffc958d8000)
         libstdc++.so.6 => /usr/lib/x86_64-linux-gnu/libstdc++.so.6
 (0x00007ffc955d1000)
         libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007ffc9534f000)
         libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007ffc94fc2000)
         libgcc_s.so.1 => /lib/x86_64-linux-gnu/libgcc_s.so.1
 (0x00007ffc94dac000)
         /lib64/ld-linux-x86-64.so.2 (0x00007ffc9636f000)
 }}}

 {{{
 $ ls -l /opt/myproject/xapian-core/lib/libxapian.so.22*
 lrwxrwxrwx 1 user user       19 Oct 28 16:53 /opt/myproject/xapian-
 core/lib/libxapian.so.22 -> libxapian.so.22.6.6
 -rwxr-xr-x 1 user user 26646198 Oct 28 16:53 /opt/myproject/xapian-
 core/lib/libxapian.so.22.6.6
 }}}

 But when i want it build as root without special prefix (defaults to
 /usr/local), i get the following error:

 {{{
 Making check in php
 make[1]: Entering directory `/root/build/xapian-bindings-1.2.19/php'
 make  check-am
 make[2]: Entering directory `/root/build/xapian-bindings-1.2.19/php'
 make  check-TESTS
 make[3]: Entering directory `/root/build/xapian-bindings-1.2.19/php'
 /root/build/xapian-bindings-1.2.19/php/php5/xapian.php:22: dl(): Unable to
 load dynamic library '/root/build/xapian-
 bindings-1.2.19/php/.libs/xapian.so' - /root/build/xapian-
 bindings-1.2.19/php/.libs/xapian.so: undefined symbol:
 _ZN6Xapian13TermGenerator19set_max_word_lengthEj
 FAIL: smoketest.php
 =======================================
 1 of 1 test failed
 Please report to http://xapian.org/bugs
 =======================================
 make[3]: *** [check-TESTS] Error 1
 make[3]: Leaving directory `/root/build/xapian-bindings-1.2.19/php'
 make[2]: *** [check-am] Error 2
 make[2]: Leaving directory `/root/build/xapian-bindings-1.2.19/php'
 make[1]: *** [check] Error 2
 make[1]: Leaving directory `/root/build/xapian-bindings-1.2.19/php'
 make: *** [check-recursive] Error 1
 }}}

 I tried with providing XAPIAN_CONFIG=/usr/local/bin/xapian-config,
 building as user and only `make install` as root, using 1.2.18, removing
 the system xapian-config or many other things. Nothing worked.

 Here are some infos (like requested in #71):

 {{{
 # ldd /root/build/xapian-bindings-1.2.19/php/.libs/xapian.so
         linux-vdso.so.1 =>  (0x00007fff50bff000)
         libxapian.so.22 => /usr/lib/libxapian.so.22 (0x00007f9cad87a000)
         libz.so.1 => /lib/x86_64-linux-gnu/libz.so.1 (0x00007f9cad663000)
         libuuid.so.1 => /lib/x86_64-linux-gnu/libuuid.so.1
 (0x00007f9cad45d000)
         libstdc++.so.6 => /usr/lib/x86_64-linux-gnu/libstdc++.so.6
 (0x00007f9cad156000)
         libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007f9caced4000)
         libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007f9cacb47000)
         libgcc_s.so.1 => /lib/x86_64-linux-gnu/libgcc_s.so.1
 (0x00007f9cac931000)
         /lib64/ld-linux-x86-64.so.2 (0x00007f9cadef6000)
 }}}

 {{{
 # ls -l /usr/lib/libxapian.so*
 lrwxrwxrwx 1 root root      19 Dec 11  2012 /usr/lib/libxapian.so.22 ->
 libxapian.so.22.5.0
 -rw-r--r-- 1 root root 1984552 Dec 11  2012 /usr/lib/libxapian.so.22.5.0
 }}}

 And after some searching i find the correct libxapian.so, but they are
 ignored.
 {{{
 # ls -l /usr/local/lib/libxapian.so*
 lrwxrwxrwx 1 root staff       19 Oct 28 16:35 /usr/local/lib/libxapian.so
 -> libxapian.so.22.6.6
 lrwxrwxrwx 1 root staff       19 Oct 28 16:35
 /usr/local/lib/libxapian.so.22 -> libxapian.so.22.6.6
 -rwxr-xr-x 1 root staff 26646166 Oct 28 16:35
 /usr/local/lib/libxapian.so.22.6.6
 }}}

 xapian-config tell the correct location:
 {{{
 # xapian-config --libs
 -L/usr/local/lib -lxapian
 }}}

 When i delete the `/usr/lib/libxapian.so*` files and retry `configure` &
 `make`, ldd tells me, that he can't find libxapian.so (not found). I also
 tried with `LIBS=/usr/local/lib`, still not found.

 {{{
 # ldd php/.libs/xapian.so | grep xapian
         libxapian.so.22 => not found
 }}}

--
\
\
\
\

--
Ticket URL: <http://trac.xapian.org/ticket/662#comment:1>
Xapian <http://xapian.org/>
Xapian



More information about the Xapian-tickets mailing list