php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #64397 Enchant PHPTs fail with VC11 compiler
Submitted: 2013-03-08 23:42 UTC Modified: 2013-04-19 11:25 UTC
From: mattficken@php.net Assigned: ab (profile)
Status: Closed Package: Enchant related
PHP Version: 5.5.0alpha5 OS: Windows
Private report: No CVE-ID: None
View Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
If you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: mattficken@php.net
New email:
PHP Version: OS:

 

 [2013-03-08 23:42 UTC] 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

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2013-03-08 23:45 UTC] mattficken@php.net
-Summary: Echant PHPTs fail with VC11 compiler +Summary: Enchant PHPTs fail with VC11 compiler
 [2013-03-09 01:03 UTC] pajoye@php.net
-Status: Open +Status: Feedback -Assigned To: +Assigned To: ab
 [2013-03-09 01:03 UTC] 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-09 12:10 UTC] ab@php.net
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.
 [2013-03-09 12:46 UTC] ab@php.net
Ok, my bits to a) are wrong. libenchant.dll looks for the plugins in the current dir - <php dir> in this case. That's why I couldn't find any linkage to those dll's in libenchant.dll. I'll patch and rebuild libenchant for the VC9 deps.
 [2013-04-19 11:25 UTC] ab@php.net
dll are rebuild and work when correct configured, as discussed in bug #64593
 [2013-04-19 11:25 UTC] ab@php.net
-Status: Feedback +Status: Closed
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Dec 26 10:01:29 2024 UTC