From:             [EMAIL PROTECTED]
Operating system: OpenBSD 2.8
PHP version:      4.1.2
PHP Bug Type:     Dynamic loading
Bug description:  Gettext library not linked in correctly?

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 bug report at http://bugs.php.net/?id=15838&edit=1
-- 
Fixed in CVS:        http://bugs.php.net/fix.php?id=15838&r=fixedcvs
Fixed in release:    http://bugs.php.net/fix.php?id=15838&r=alreadyfixed
Need backtrace:      http://bugs.php.net/fix.php?id=15838&r=needtrace
Try newer version:   http://bugs.php.net/fix.php?id=15838&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=15838&r=support
Expected behavior:   http://bugs.php.net/fix.php?id=15838&r=notwrong
Not enough info:     http://bugs.php.net/fix.php?id=15838&r=notenoughinfo
Submitted twice:     http://bugs.php.net/fix.php?id=15838&r=submittedtwice

Reply via email to