Opened 15 years ago

Closed 15 years ago

#411 closed defect (fixed)

PHP bindings fail to build on Windows due to missing tsrm_ls definition

Reported by: Charlie Hull Owned by: Richard Boulton
Priority: normal Milestone: 1.1.3
Component: Xapian-bindings Version: SVN trunk
Severity: normal Keywords:
Cc: Blocked By:
Blocking: Operating System: Microsoft Windows

Description

The matchspy branch fails to compile as follows:

xapian_wrap.cc(1270) : error C2065: 'tsrm_ls' : undeclared identifier

(using a xapian_wrap.cc compiled on Linux, as I haven't got a recent SWIG here)

PHP documentation suggests that adding a TSRMLS_FETCH(); call will fix this, and it does if I add it to xapian_wrap.cc manually: however I assume this should actually be done in php\except.i . Patch attached.

Attachments (1)

php_bindings.patch (328 bytes ) - added by Charlie Hull 15 years ago.

Download all attachments as: .zip

Change History (6)

by Charlie Hull, 15 years ago

Attachment: php_bindings.patch added

comment:1 by Richard Boulton, 15 years ago

Does trunk fail to compile on windows in the same way, or is it just the matchspy branch? I don't immediately see what's matchspy-specific about the patch.

comment:2 by Charlie Hull, 15 years ago

Yes, trunk behaves the same way. It's not specific about the matchspy branch, but that's where I found it, and I was led to believe the matchspy branch is derived from trunk.

comment:3 by Richard Boulton, 15 years ago

Owner: changed from Olly Betts to Richard Boulton
Status: newassigned

After doing a bit of research, it looks like this is required in "ZTS" mode - ie, (as I understand it) when PHP is compiled with support for multiple threads. Debian/Ubuntu aren't compiled this way by default, so it works on those platforms, but I'd guess the version you're testing with on windows is compiled with ZTS. I've applied the patch in r13550, which should fix this for trunk. I'll update the matchspy branch for you too, shortly.

comment:4 by Charlie Hull, 15 years ago

Yes, we compile for ZTS on Windows.

comment:5 by Richard Boulton, 15 years ago

Milestone: 1.1.3
Resolution: fixed
Status: assignedclosed

I've updated the matchspy branch to include this change too. This doesn't affect the 1.0 branch, so marking as fixed.

Note: See TracTickets for help on using tickets.