php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #67219 Version 1.3.1 does not compile
Submitted: 2014-05-06 15:20 UTC Modified: 2014-05-06 15:56 UTC
From: saprykin dot dmitry at gmail dot com Assigned: tony2001 (profile)
Status: Closed Package: sphinx (PECL)
PHP Version: Irrelevant OS:
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: saprykin dot dmitry at gmail dot com
New email:
PHP Version: OS:

 

 [2014-05-06 15:20 UTC] saprykin dot dmitry at gmail dot com
Description:
------------
My sphinxclient.h content is:

/// known ranking modes (ext2 only)
enum
{
        SPH_RANK_PROXIMITY_BM25 = 0,
        SPH_RANK_BM25                   = 1,
        SPH_RANK_NONE                   = 2,
        SPH_RANK_WORDCOUNT              = 3
};

This causes wrong match for pattern in config.m4 function SPHINX_CHECK_ENUM with string "SPH_RANK_PROXIMITY_BM25 = 0". So ./configure defines constant HAVE_SPH_RANK_PROXIMITY by mistake.
Nevertheless regex will match even commented out strings. May be it is better to use AC_TRY_COMPILE?





Patches

sphinx_67219.diff (last revision 2014-05-06 15:54 UTC by tony2001@php.net)
sph-rank-const-fix (last revision 2014-05-06 15:20 UTC by saprykin dot dmitry at gmail dot com)

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2014-05-06 15:54 UTC] tony2001@php.net
The following patch has been added/updated:

Patch Name: sphinx_67219.diff
Revision:   1399391674
URL:        https://bugs.php.net/patch-display.php?bug=67219&patch=sphinx_67219.diff&revision=1399391674
 [2014-05-06 15:56 UTC] tony2001@php.net
-Status: Open +Status: Assigned -Assigned To: +Assigned To: tony2001
 [2014-05-06 15:56 UTC] tony2001@php.net
I was actually trying to avoid TRY_COMPILE because running a compiler might be quite slow and doing it for every constant in a enum looks to me as an overkill.
But it seems that you're right and I'll have to do it after all.
Could you please try mu version of your patch?
The one you attached failed to find any of the constants.

You might also want to update your Sphinx, btw =)
 [2014-05-06 16:11 UTC] saprykin dot dmitry at gmail dot com
Thanks a lot!
Your version of patch works just fine.
 [2014-05-06 16:26 UTC] tony2001@php.net
Automatic comment on behalf of tony@daylessday.org
Revision: http://git.php.net/?p=pecl/search_engine/sphinx.git;a=commit;h=979c98c7f92b7745d9a8942e62e90b62e5c05946
Log: fix bug #67219 (Version 1.3.1 does not compile)
 [2014-05-06 16:26 UTC] tony2001@php.net
-Status: Assigned +Status: Closed
 
PHP Copyright © 2001-2021 The PHP Group
All rights reserved.
Last updated: Tue Nov 30 03:03:16 2021 UTC