ID:               21339
 Comment by:       poleson at verio dot net
 Reported By:      gobbers at faw dot uni-ulm dot de
 Status:           Bogus
 Bug Type:         Gettext related
 Operating System: Solaris 8
 PHP Version:      4.3.0
 New Comment:

I was getting this same situation on Solaris 6 & 8, compiling with
Forte against a staticly compiled gettext lib.  I fixed it with this
Patch.. I'm unsure if it is completely correct.. but it seems wierd
that the module name was listed as php_gettext and then the PHP_MINFO
macro used
gettext.

***************
*** 66,72 ****
        NULL,
        NULL,
        NULL,
!       PHP_MINFO(gettext),
      NO_VERSION_YET,
        STANDARD_MODULE_PROPERTIES
  };
--- 66,72 ----
        NULL,
        NULL,
        NULL,
!       PHP_MINFO(php_gettext),
      NO_VERSION_YET,
        STANDARD_MODULE_PROPERTIES
  };
***************
*** 75,81 ****
  ZEND_GET_MODULE(php_gettext)
  #endif

! PHP_MINFO_FUNCTION(gettext)
  {
        php_info_print_table_start();
        php_info_print_table_row(2, "GetText Support", "enabled");
--- 75,81 ----
  ZEND_GET_MODULE(php_gettext)
  #endif

! PHP_MINFO_FUNCTION(php_gettext)
  {
        php_info_print_table_start();
        php_info_print_table_row(2, "GetText Support", "enabled");
Index: php_gettext.h
===================================================================
RCS file: /cvsroot/contrib/php4/ext/gettext/php_gettext.h,v
retrieving revision 1.1.1.4
diff -c -r1.1.1.4 php_gettext.h
*** php_gettext.h       2002/12/31 16:34:38     1.1.1.4
--- php_gettext.h       2003/06/12 22:49:36
***************
*** 22,35 ****
  #define PHP_GETTEXT_H

  #if HAVE_LIBINTL
! #ifndef INIT_FUNC_ARGS
  #include "zend_modules.h"
  #endif

  extern zend_module_entry php_gettext_module_entry;
  #define gettext_module_ptr &php_gettext_module_entry

! PHP_MINFO_FUNCTION(gettext);

  PHP_FUNCTION(textdomain);
  PHP_FUNCTION(gettext);
--- 22,39 ----
  #define PHP_GETTEXT_H

  #if HAVE_LIBINTL
!
! #if PHP_API_VERSION < 19990421
  #include "zend_modules.h"
+ #include "internal_functions.h"
  #endif

+ #include <libintl.h>
+
  extern zend_module_entry php_gettext_module_entry;
  #define gettext_module_ptr &php_gettext_module_entry

! PHP_MINFO_FUNCTION(php_gettext);

  PHP_FUNCTION(textdomain);
  PHP_FUNCTION(gettext);


Previous Comments:
------------------------------------------------------------------------

[2003-05-06 09:17:24] morgan dot pyne at sas dot com

I've run into a similar issue on HP-UX 11.00 compiling 4.3.1 (and
4.3.2RC2) using HP's ANSI C compiler.

The first errors in gettext.c stem from the function names in the
php_gettext_functions[] array being referenced before they are
declared. Either adding prototypes for these functions or moving the
declaration of that array to the bottom of the file after the functions
were declared solved that.

I also encountered the second error(undefined "zm_info_gettext" when
linking). When looking at the output of the C preprocessor from
gettext.c I noticed that this function was indeed never created. The
actual function name emitted by the PHP_MINFO_FUNCTION(gettext) macro
ends up being called "zm_info_libintl_gettext" instead of simply
"zm_info_gettext". However, anywhere the macro PHP_MINFO was used, it
was still emitting "zm_info_gettext", hence the discrepancy.

I managed workarounds for these but I'm not sure if the cause of them
is due to my build environment or the source code, since most people
don't seem to have this problem. I can provide more info or answer
further questions on the topic if anybody is interested in pursuing
this.

Regards,
Morgan

------------------------------------------------------------------------

[2003-03-04 09:26:24] sjsobol at justthe dot net

Hey now. Some of us work for a living :P :)

Seriously: I finally chalked it up to a problem using a Mandrake RPM on
Red Hat (although usually I have no problems doing so). I grabbed
another source RPM (the build source is listed as "Unknown", but I know
it is not Mandrake) and made my tweaks to it. It compiled just fine,
including ming, pdflib and gettext. (I was encountering the same
problem with ming and some of the other PHP modules that I was with
gettext, so it was not specifically the gettext module that was having
an issue. 

I imagine Mandrake's spec file is heavily customized to work with their
distro, which normally not a problem as I have many customized Mandrake
RPMS on my server, but something was causing major issues with this
particular RPM.

Anyhow, I don't think this is a PHP issue. I think it's a
package-specific issue.

------------------------------------------------------------------------

[2003-02-10 12:43:41] [EMAIL PROTECTED]

Works fine here, user has more important issues to deal with and can't
provide feedback, and this most likely is some user error anyway.


------------------------------------------------------------------------

[2003-02-04 17:52:11] sjsobol at justthe dot net

Okay, now I'm really confused. I yanked the Configure command out of
the RPM. Here it is.

#!/bin/sh

EXTERNAL_MODULES="mysql pgsql gd imap ldap bcmath bz2 calendar com cpdf
crack curl cyrus db dba_bundle dbase dbx dio domxml dotnet exif fbsql
fdftk filepro fribidi gmp hwapi hyperwave iconv informix ingres_ii
interbase ircg java mcrypt mbstring mhash mime_magic ming mnogosearch
msession msql mssql ncurses notes oci8 odbc oracle ovrimos pcntl pdf
pfpro pspell qtdom readline recode rpc shmop snmp sockets swf sybase
sybase_ct sysvmsg wddx xml xmlrpc xslt yaz zip"

./configure \
    --enable-discard-path \
    --disable-force-cgi-redirect \
    --enable-shared \
    --disable-static \
    --disable-debug \
    --disable-rpath \
    --enable-pic \
    --enable-inline-optimization \
    --enable-memory-limit \
    --with-pear \
    --enable-magic-quotes \
    --enable-debugger \
    --enable-track-vars \
    --with-versioning \
    --with-mod_charset \
    --with-regex=php \
    --enable-track-vars \
    --enable-trans-sid \
    --enable-safe-mode \
    --with-ctype \
    --with-ttf \
    --with-zlib \
    --enable-sysvsem \
    --enable-sysvshm \
    --enable-yp \
    --enable-ftp \
    --without-aspell \
    --without-kerberos \
    --with-gettext=/usr/local \
    --without-dba \
    --without-db2 \
    --without-db3 \
    --with-mysql=/usr/mysql \
    `for i in $EXTERNAL_MODULES; do echo --without-${i} --disable-${i};
done` \
    --without-gdbm 

and that worked. (I got rid of --with-freetype because
right now I don't have freetype installed on my system.)

------------------------------------------------------------------------

[2003-02-04 16:39:14] sjsobol at justthe dot net

More info... I am trying to rebuild a Mandrake RPM from the source RPM.
That's what has been failing, so I downloaded the December 27, 2002
tarball off the website earlier today (today is Tuesday, February 4th)
and built it. 

Using --disable-all --with-gettext=/usr/local worked.

So now I've copied over the configure command from the
RPM's spec file and am going to try it. 

At this point I suspect that one of the other configure options is
causing problems. Will post more info as soon 
as I have it.

------------------------------------------------------------------------

The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at
    http://bugs.php.net/21339

-- 
Edit this bug report at http://bugs.php.net/?id=21339&edit=1

Reply via email to