php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #69021 failing when compiling extensions
Submitted: 2015-02-10 00:59 UTC Modified: 2018-08-25 20:02 UTC
Votes:7
Avg. Score:4.7 ± 0.7
Reproduced:7 of 7 (100.0%)
Same Version:3 (42.9%)
Same OS:4 (57.1%)
From: jfha73 at gmail dot com Assigned: petk (profile)
Status: Closed Package: Compile Failure
PHP Version: 5.6.5 OS: Ubuntu14.04
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: jfha73 at gmail dot com
New email:
PHP Version: OS:

 

 [2015-02-10 00:59 UTC] jfha73 at gmail dot com
Description:
------------
It fails at BZ2, LDAP, mysqlnd and I don't know how many more, I don't know if this is an Ubuntu thing, but I have been having tons of problems compiling PHP 5.6 and master on Ubuntu, any ideas?

Expected result:
----------------
compile

Actual result:
--------------
MySQLnd

/usr/bin/ld: ext/mysqlnd/.libs/mysqlnd_net.o: undefined reference to symbol 'uncompress'
//lib/x86_64-linux-gnu/libz.so.1: error adding symbols: DSO missing from command line
collect2: error: ld returned 1 exit status
make: *** [sapi/cli/php] Error 1

BZ2

php-5.6.5/modules  ext/bz2/bz2.lo ext/bz2/bz2_filter.lo -lbz2
/usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/4.8/../../../../lib/libbz2.a(bzlib.o): relocation R_X86_64_32S against `BZ2_crc32Table' can not be used when making a shared object; recompile with -fPIC
/usr/lib/gcc/x86_64-linux-gnu/4.8/../../../../lib/libbz2.a: error adding symbols: Bad value
collect2: error: ld returned 1 exit status
make: *** [ext/bz2/bz2.la] Error 1

LDAP (when compiled with others)

checking for LDAP support... yes, shared
checking for LDAP Cyrus SASL support... no
checking size of long int... 8
checking for 3 arg ldap_set_rebind_proc... no
checking for ldap_parse_result... no
checking for ldap_parse_reference... no
checking for ldap_start_tls_s... no
checking for ldap_bind_s... no


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2018-08-25 20:02 UTC] petk@php.net
-Status: Open +Status: Closed -Assigned To: +Assigned To: petk
 [2018-08-25 20:02 UTC] petk@php.net
Hello, I've tested this one with the following configurations:
- Ubuntu 14.04+
- PHP 7.1+

./configure \
  --enable-mysqlnd=shared \
  --with-mysqli=shared \
  --with-pdo-mysql=shared \
  --with-bz2=shared \
  --with-ldap=shared

make && make install

Shared extensions were manually enabled in the /usr/local/lib/php.ini

  extension=mysqlnd.so
  extension=mysqli.so
  extension=pdo_mysql.so
  extension=ldap.so
  extension=bz2.so

(note that mysqlnd.so needs to be enabled before the mysqli and pdo_mysql)

And this seems to be working ok. In case you still experience this, please reopen this issue to check your particular configuration. Mainly your configure options and the installed system libraries.

Thank you for reporting this issue and helping us make PHP better.
 [2019-07-14 04:10 UTC] redscourge at gmail dot com
I remember that these sorts of errors used to happen back in PHP 5.3 if you tried to compile CGI SAPI with ZLIB and also wanted to include used mysqlnd
mysqlnd_net.o: undefined reference to symbol 'compress'

As a result, I had to add --disable-mysqlnd-compression-support so that --with-zlib=shared,/usr and --with-mysql=mysqlnd would work together
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri Apr 19 19:01:28 2024 UTC