Bug 223043 - math/pecl-bitset2 build error in poudriere
Summary: math/pecl-bitset2 build error in poudriere
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Some People
Assignee: Po-Chuan Hsieh
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-10-16 09:39 UTC by CTS - FreeBSD Team
Modified: 2017-12-12 12:17 UTC (History)
1 user (show)

See Also:
bugzilla: maintainer-feedback? (sunpoet)


Attachments
math/pecl-bitset2 poudriere log (19.15 KB, text/plain)
2017-10-16 09:39 UTC, CTS - FreeBSD Team
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description CTS - FreeBSD Team 2017-10-16 09:39:15 UTC
Created attachment 187209 [details]
math/pecl-bitset2 poudriere log

I get a build error in poudriere for math/pecl-bitset2

see attached poudriere log
Comment 1 CTS - FreeBSD Team 2017-10-16 09:42:28 UTC
Forgot to mention: i am on FreeBSD 10.3 amd64
Comment 2 Po-Chuan Hsieh freebsd_committer freebsd_triage 2017-10-16 15:27:50 UTC
I did not see the same error.

And here's the build log of this port on our cluster:
http://beefy6.nyi.freebsd.org/data/103amd64-default/430427/logs/pecl-bitset2-2.0.3_1.log
Comment 3 CTS - FreeBSD Team 2017-10-17 08:51:48 UTC
You built 2.0.3_1, i built the brand new 2.0.4
Comment 5 CTS - FreeBSD Team 2017-10-17 14:50:53 UTC
Hm. So the question is: why do I face a problem here... thx
Comment 6 CTS - FreeBSD Team 2017-10-17 15:00:09 UTC
To be more precise:

/etc/make.conf:
DEFAULT_VERSIONS+=php=5.6

lang_php56/options:
# Options for php56-5.6.31
_OPTIONS_READ=php56-5.6.31
_FILE_COMPLETE_OPTIONS_LIST=CLI CGI FPM EMBED PHPDBG DEBUG DTRACE IPV6 MAILHEAD LINKTHR ZTS
OPTIONS_FILE_SET+=CLI
OPTIONS_FILE_UNSET+=CGI
OPTIONS_FILE_SET+=FPM
OPTIONS_FILE_UNSET+=EMBED
OPTIONS_FILE_UNSET+=PHPDBG
OPTIONS_FILE_UNSET+=DEBUG
OPTIONS_FILE_UNSET+=DTRACE
OPTIONS_FILE_UNSET+=IPV6
OPTIONS_FILE_SET+=MAILHEAD
OPTIONS_FILE_SET+=LINKTHR
OPTIONS_FILE_SET+=ZTS

results in a broken build. It used to work with pecl-bitset2-2.0.3 in this configuration
Comment 7 CTS - FreeBSD Team 2017-11-09 10:51:00 UTC
I *think* i nailed it (couldn't test, as i don't know how to incorporate a patch) down to an error in one line:

--- bitset.c.orig       2017-10-06 18:29:59.000000000 +0200
+++ bitset.c    2017-11-09 11:43:23.586219000 +0100
@@ -652,7 +652,7 @@
        bit_diff = intern->bitset_len * CHAR_BIT;

        if (start_bit > bit_diff) {
-               zend_throw_exception_ex(spl_ce_OutOfRangeException, 0,
+               zend_throw_exception_ex(spl_ce_OutOfRangeException, 0 TSRMLS_CC,
                                                                "The specified index parameter exceeds the total number of bits available");
                return;
        }

Every other occurrence of zend_throw_exception_ex has the TSRMLS_CC except this one line.

Can you help me in incorporating this patch to test it?

Can anyone send it (after testing) upstream to the pecl-bitstream developer, as i think more people could be hit by this issue?
Comment 8 CTS - FreeBSD Team 2017-11-09 17:51:13 UTC
Ah! I got it, just put it in files/patch-bitset.c

The same error is there two times. So this patch is needed for ZTS to work:

--- bitset.c.orig       2017-10-06 18:29:59.000000000 +0200
+++ bitset.c    2017-11-09 18:48:12.870339000 +0100
@@ -652,7 +652,7 @@
        bit_diff = intern->bitset_len * CHAR_BIT;
 
        if (start_bit > bit_diff) {
-               zend_throw_exception_ex(spl_ce_OutOfRangeException, 0,
+               zend_throw_exception_ex(spl_ce_OutOfRangeException, 0 TSRMLS_CC,
                                                                "The specified index parameter exceeds the total number of bits available");
                return;
        }
@@ -696,7 +696,7 @@
        bit_diff = intern->bitset_len * CHAR_BIT;
 
        if (start_bit > bit_diff) {
-               zend_throw_exception_ex(spl_ce_OutOfRangeException, 0,
+               zend_throw_exception_ex(spl_ce_OutOfRangeException, 0 TSRMLS_CC,
                                                                "The specified index parameter exceeds the total number of bits available");
        }
Comment 9 commit-hook freebsd_committer freebsd_triage 2017-12-11 10:41:12 UTC
A commit references this bug:

Author: sunpoet
Date: Mon Dec 11 10:40:52 UTC 2017
New revision: 455971
URL: https://svnweb.freebsd.org/changeset/ports/455971

Log:
  Fix build

  PR:		223043
  Submitted by:	Markus Mann <freebsd-public@it64.de>
  MFH:		2017Q4

Changes:
  head/math/pecl-bitset2/files/
  head/math/pecl-bitset2/files/patch-bitset.c
Comment 10 Po-Chuan Hsieh freebsd_committer freebsd_triage 2017-12-11 10:43:14 UTC
Committed. Thanks!
Comment 11 commit-hook freebsd_committer freebsd_triage 2017-12-12 12:17:00 UTC
A commit references this bug:

Author: sunpoet
Date: Tue Dec 12 12:16:37 UTC 2017
New revision: 456123
URL: https://svnweb.freebsd.org/changeset/ports/456123

Log:
  MFH: r455971

  Fix build

  PR:		223043
  Submitted by:	Markus Mann <freebsd-public@it64.de>

  Approved by:	ports-secteam (delphij)

Changes:
_U  branches/2017Q4/
  branches/2017Q4/math/pecl-bitset2/files/