|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #22595 shared compile fails if there is /lib/ (gettext)
Submitted: 2003-03-07 16:40 UTC Modified: 2003-03-24 03:19 UTC
From: web at affenkrieger dot de Assigned:
Status: Not a bug Package: Sybase-ct (ctlib) related
PHP Version: 4.3.2-dev OS: Mandrake Linux 9.0
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.
Block user comment
Status: Assign to:
Bug Type:
From: web at affenkrieger dot de
New email:
PHP Version: OS:


 [2003-03-07 16:40 UTC] web at affenkrieger dot de

i tried to compile and use the Sybase-CT extension of PHP, but it won't work. Here we go:

I have a Mandrake Linux 9.0 system with a fully configured Apache + PHP webserver. PHP 4.2.3 works fine as a Apache module. I downloaded the sources of PHP 4.2.3 from and compiled the Sybase-CT extension as a shared object:
$ ./configure --with-apxs=/path/to/apxs --with-sybase-ct=shared,/opt/sybase-11.9.2

The Sybase ASE 11.9.2 resides in /opt/sybase-11.9.2, the libs are available under /opt/sybase-11.9.2/lib

Compilation works fine, but when i include the new .so in the PHP.ini and restart the Apache webserver, it throws this warning into the error_log:
> PHP Warning:  Unable to load dynamic library
> '/usr/lib/php/extensions/' -
> /opt/sybase-11.9.2/lib/ undefined symbol:
> comn_free in Unknown on line 0

Trying to use Sybase functions in PHP result in segmentation faults.

$ ldd => /opt/sybase-11.9.2/lib/ (0x40008000) => /opt/sybase-11.9.2/lib/ (0x4000b000) => /lib/ (0x40038000)
                  ^^^^^^^^^^^^^^^^ => /opt/sybase-11.9.2/lib/ (0x40040000) => /opt/sybase-11.9.2/lib/ (0x40098000) => /opt/sybase-11.9.2/lib/ (0x400f5000) => /lib/i686/ (0x40102000)
  /lib/ => /lib/ (0x80000000)

It seems that the has been linked to a wrong library in /lib, instead of $SYBASE/lib, and i found no way to tell the system, to use the Sybase one.

/usr/lib/ & /lib/ are symlinks to
It seems to be a lib of the "gettext" program.

Yes, $SYBASE/lib is added to /etc/
Yes, the Sybase lib are correctly listed by 'ldconfig -p'
No, setting LD_LIBRARY_PATH doesn't affect the result of ldd
No, normally LD_LIBRARY_PATH isn't set at all.

DBD::Sybase works fine with Sybase ASE. Micheal Peppler wrote in sybase.public.ase.linux ( that it might be a PHP compilation problem, and he knows a bit of that Sybase stuff ;-)



Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2003-03-07 16:55 UTC] web at affenkrieger dot de
Ah, i forgot to make clear that the PHP extension should be linked against $SYBASE/lib/ and not against that one in /lib, which has unfortunately the same name.
 [2003-03-08 10:46 UTC]
Please try using this CVS snapshot:
For Windows:

4.2.3 is too old. And lot has changed in the CVS so please give it a go, although I doubt this will ever work.

Why do you have libintl in /lib anyway?
Does Mandrake put it there?

IMO, sybase should rename their libs.
Sane projects use some unique prefixes for their files..

 [2003-03-08 11:29 UTC] nils at affenkrieger dot de
Ok, i will give it a try on monday with the newer PHP version, although i doubt that the "new" module will work with the "old" installed PHP version.

Yep, it seems that this type of /lib/ is Mandrake-specific. I considered writing a feedback to Mandrake for their new versions, to rename that lib.

The used Sybase ASE 11.9.2 was freeware, and is no longer available at Newer versions of the ASE are commercial, so i don't think that renaming the Sybase libs in a future version will help me ;-(
 [2003-03-08 11:37 UTC] web at affenkrieger dot de
gna - do i had to use the other link? :-)
for feedback see above...
 [2003-03-08 11:42 UTC]
Do you have /lib in /etc/ ?

 [2003-03-08 11:46 UTC] web at affenkrieger dot de
Nope, neither /lib nor /usr/lib. Only additional lib paths like $SYBASE/lib
 [2003-03-10 04:29 UTC] web at affenkrieger dot de
Ok, i tried the new version of PHP -> didn't work.

So i made a dirty hack:
deleting all references to the "wrong" in /lib and /usr/lib, then recompiling PHP. voila, it works.

Since compiling DBD::Sybase worked perfectly, it has to be a problem with the compilation routine of PHP. the lib path in --with-sybase-ct=/path/to/sybase should be more important than other (standard) lib paths. It seems that the compilation routine not even respects settings like LD_LIBRARY_PATH
 [2003-03-10 10:45 UTC]
Does not affect normal (static) build at all.

 [2003-03-23 13:14 UTC] jmdault at mandrakesoft dot com
I checked and Mandrake can't put elsewhere than /lib, since it's needed by the initscripts, and it needs to be run before /usr is mounted.

I guess you could simply do a rpm -e gettext-devel and it will compile properly.

But the real issue is with Sybase, and all other software whose authors lack imagination and use the same function names or library names as other projects. 

 [2003-03-24 03:19 UTC]
As mentioned in previous comment, this is Sybase's problem,
not PHP or Mandrake..

PHP Copyright © 2001-2021 The PHP Group
All rights reserved.
Last updated: Tue Dec 07 22:03:34 2021 UTC