php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #15838 Gettext library not linked in correctly?
Submitted: 2002-03-02 15:58 UTC Modified: 2002-07-07 01:00 UTC
Votes:6
Avg. Score:4.3 ± 0.9
Reproduced:4 of 5 (80.0%)
Same Version:1 (25.0%)
Same OS:0 (0.0%)
From: corlette at huarp dot harvard dot edu Assigned:
Status: No Feedback Package: Gettext related
PHP Version: 4.1.2 OS: OpenBSD 2.8
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: corlette at huarp dot harvard dot edu
New email:
PHP Version: OS:

 

 [2002-03-02 15:58 UTC] corlette at huarp dot harvard dot edu
Hi there,

I'm trying to get PHP working with Horde, and running into problems.  Basically, Horde says it requires "gettext".  So, I downloaded the latest "gettext" from GNU, compiled and installed it in /opt/gettext.  Then I compiled PHP with --with-gettext, e.g. 

./configure --with-mysql=/usr/local \
--with-apxs=/opt/apache/sbin/apxs \
--prefix=/opt/php --with-openssl=/usr/local/ssl \
--with-imap=/usr/local --with-gdbm --with-xml \
--with-mcrypt=/usr/local --with-gettext=/opt/gettext

Compile seems to go fine, with a couple warnings of the form:
*** Warning: This library needs some functionality provided by /usr/local/lib/libintl.la.
*** I have the capability to make that library automatically link in when
*** you link to this library.  But I can only do this if you have a
*** shared version of the library, which you do not appear to have.

(also a similar warning for -lresolv; is this a problem?)

OK, so, then I install PHP, install Horde, and start testing it.  The test.php script provided by Horde seems to work fine and report everything working.  I did some additional configuration, and everything stopped working; pages wouldn't load, etc etc.  After a bit of digging, I finally found this error message in one of my server's error logs:

/usr/libexec/ld.so: Undefined symbol "_gettext" called from httpd:/opt/apache/libexec/libphp4.so at 0x4030
44f0

References to "gettext" appear in "libgettext.a" and "libintl.a", but pretty much nowhere else.  So here's my guess: PHP is expecting gettext to be in a shared library.  GNU gettext doesn't compile a shared library (I even added --enable-shared to the configure line for gettext, and still didn't get a ".so" style library, which I believe is what's needed).  Thus, PHP can't find the gettext reference, and when Horde tries to use it, it craps out.

About right?  So the question is, how do I either a) get a shared gettext library b) compile gettext into PHP statically, or c) fix it some other way?  Is this a problem with GNU gettext, PHP, or both, or some problem with the way I configured everything?

I'd really appreciate some tips and advice; I can't believe this is really all that hard, so I must have done something wrong.  What was supposed to be an afternoon project is turning into a week!

Thanks in advance...

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2002-06-06 21:20 UTC] sniper@php.net
Which gettext version you have?
In linux, these functions are found in glibc, maybe this 
is the same for openbsd? Just try configure with --with-gettext (without any paths)

--Jani

 [2002-07-07 01:00 UTC] php-bugs at lists dot php dot net
No feedback was provided for this bug for over a month, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to "Open".
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sat Dec 21 14:01:32 2024 UTC