Bug #15838 Updated: Gettext library not linked in correctly?
| From: | sniper@php.net | Date: | Fri, 07 Jun 2002 01:20:31 +0000 |
| Subject: | Bug #15838 Updated: Gettext library not linked in correctly? | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-9708@lists.php.net to get a copy of this message | ||
ID: 15838
Updated by: sniper@php.net
Reported By: corlette@huarp.harvard.edu
-Status: Open
+Status: Feedback
-Bug Type: Dynamic loading
+Bug Type: Gettext related
Operating System: OpenBSD 2.8
PHP Version: 4.1.2
New Comment:
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
Previous Comments:
------------------------------------------------------------------------
[2002-03-02 15:58:15] corlette@huarp.harvard.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...
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=15838&edit=1