Bug #64397 [Fbk]: Enchant PHPTs fail with VC11 compiler

From: Date: Sat, 09 Mar 2013 12:10:31 +0000
Subject: Bug #64397 [Fbk]: Enchant PHPTs fail with VC11 compiler
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-177701@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=64397&edit=1

 ID:                 64397
 Updated by:         ab@php.net
 Reported by:        mattficken@php.net
 Summary:            Enchant PHPTs fail with VC11 compiler
 Status:             Feedback
 Type:               Bug
 Package:            Enchant related
 Operating System:   Windows
 PHP Version:        5.5.0alpha5
 Assigned To:        ab
 Block user comment: N
 Private report:     N

 New Comment:

We have multiple issues here

a)

as I could see, there are more dlls it tries to load (both 5.4.13RC1 and 5.5.0alpha6)

c:\snaps\php-5.4.13RC1-Win32-VC9-x86>php -n -d extension_dir=ext -d extension=php_enchant.dll

** (php.exe:19280): WARNING **: Error loading plugin:
`c:\snaps\php-5.4.13RC1-Win32-VC9-x86\icudt.dll': %1 is not a valid Win32 application.


** (php.exe:19280): WARNING **: Error loading plugin:
`c:\snaps\php-5.4.13RC1-Win32-VC9-x86\icuin.dll': %1 is not a valid Win32 application.


** (php.exe:19280): WARNING **: Error loading plugin:
`c:\snaps\php-5.4.13RC1-Win32-VC9-x86\icuio.dll': %1 is not a valid Win32 application.


** (php.exe:19280): WARNING **: Error loading plugin:
`c:\snaps\php-5.4.13RC1-Win32-VC9-x86\icule.dll': %1 is not a valid Win32 application.


** (php.exe:19280): WARNING **: Error loading plugin:
`c:\snaps\php-5.4.13RC1-Win32-VC9-x86\iculx.dll': %1 is not a valid Win32 application.


** (php.exe:19280): WARNING **: Error loading plugin:
`c:\snaps\php-5.4.13RC1-Win32-VC9-x86\icutest.dll': %1 is not a valid Win32 application.


** (php.exe:19280): WARNING **: Error loading plugin:
`c:\snaps\php-5.4.13RC1-Win32-VC9-x86\icutu.dll': %1 is not a valid Win32 application.


** (php.exe:19280): WARNING **: Error loading plugin:
`c:\snaps\php-5.4.13RC1-Win32-VC9-x86\icuuc.dll': %1 is not a valid Win32 application.


** (php.exe:19280): WARNING **: Error loading plugin:
`c:\snaps\php-5.4.13RC1-Win32-VC9-x86\php5apache2_2.dll': The specified module could not be
found.


** (php.exe:19280): WARNING **: Error loading plugin:
`c:\snaps\php-5.4.13RC1-Win32-VC9-x86\php5apache2_2_filter.dll': The specified module could not
be found.


** (php.exe:19280): WARNING **: Error loading plugin:
`c:\snaps\php-5.4.13RC1-Win32-VC9-x86\php5apache2_4.dll': The specified module could not be
found.


** (php.exe:19280): WARNING **: Error loading plugin:
`c:\snaps\php-5.4.13RC1-Win32-VC9-x86\php5nsapi.dll': The specified module could not be found.


Looking at the libenchant.dll

c:\snaps\php-5.4.13RC1-Win32-VC9-x86>dumpbin /imports libenchant.dll | find "dll"
Dump of file libenchant.dll
    glib-2.dll
    gmodule-2.dll
    KERNEL32.dll
    ADVAPI32.dll
    MSVCR90.dll

there are no ICU, and in any case very odd are all that apache dlls and nsapi. That looks like a
build config issue with VC9. NSAPI is even disabled by default AFAIR. We wasn't upgrading
neither glib nor enchant for VC9, for VC11 I've built glib with gettext, libffi and zlib,
enchant with glib only as deps.


b)

Generally some of enchant tests need dict files and will fail otherwise. Also in the VC11 builds
enchant was changed so that it looks for libenchant_ispell.dll and libenchant_myspell in the enchant
subdir, not in php root dir anymore. And the dict files can be put into <php bin
dir>\share\myspell\dicts or loaded with enchant_broker_set_dict_path() (that function is
undocumented yet). These changes have to be met for VC11 builds. After doing that the ext loaded and
the tests was passing for me.


c)

VC9 icu*.dll without 49 suffix seems to be broken. That however doesn't affect anything, the
import libs point to those dll with 49 suffix (the intl ext for instance). This issue is unrelated
to this ticket.


Previous Comments:
------------------------------------------------------------------------
[2013-03-09 01:03:56] pajoye@php.net

it should not load these DLLs at all or not even try to. They are not enchant 
plugin.

It looks like a config issue in the tests box or a patch is missing in enchant.

@a did you add the patch or built enchant without it?

------------------------------------------------------------------------
[2013-03-08 23:42:52] mattficken@php.net

Description:
------------
These 3 PHPTs fail on 5.5.0a6 built with VC11 compiler:
ext/enchant/tests/broker_describe.phpt
ext/enchant/tests/broker_request_dict.phpt
ext/enchant/tests/bug13181.phpt

Enchant PHPTs also are marked fail on 5.5.0a6 built with VC9, but that is a different issue: on
5.5.0a6-VC9 these PHPTs output the expected text and output warnings about loading icu* DLLs. It is
these extra warnings that cause the failure on VC9, for example:
WARNING **: Error loading plugin: `c:\php-sdk\php-5.5.0alpha6-nts-Win32-VC9-x86\icudt.dll': %1
is not a valid Win32 application.

These warnings are not printed by 5.5.0a6-VC11.


When these PHPTs are run on 5.5.0a6-VC11, they output 'Failed' and don't output the
expected text at all... so its a VC11 related issue.


Expected result:
----------------
Test pass

Actual result:
--------------
Test fail


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



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


Thread (5 messages)

« previous php.bugs (#177701) next »