Opened 5 years ago
Closed 5 years ago
#793 closed defect (fixed)
PHP bindings don't build on Illumos
Reported by: | Amitai Schleier | Owned by: | |
---|---|---|---|
Priority: | normal | Milestone: | 1.4.13 |
Component: | Xapian-bindings (PHP) | Version: | 1.4.12 |
Severity: | normal | Keywords: | |
Cc: | Blocked By: | ||
Blocking: | Operating System: | Solaris |
Description
I've been getting C++ errors trying to build the PHP bindings on Illumos-derived systems for probably upwards of a year. Sorry I don't know enough to fix it and took so long to file the bug.
pkgsrc build log against PHP 7.3 on SmartOS
Very similar pkgsrc build log against PHP 7.2 on Tribblix m20.6:
===> Building for php72-xapian-1.4.12 /opt/pkg/bin/bmake all-recursive Making all in . Making all in php7 /opt/pkg/bin/bmake all-am depbase=`echo php7/xapian_wrap.lo | sed 's|[^/]*$|.deps/&|;s|\.lo$||'`; /usr/bin/bash ../libtool --tag=CXX --mode=compile g++ -DHAVE_CONFIG_H -I. -I.. -I/opt/pkg/include/php -I/opt/pkg/include/php/main -I/opt/pkg/include/php/TSRM -I/opt/pkg/include/php/Zend -I/opt/pkg/include/php/ext -I/opt/pkg/include/php/ext/date/lib -I/opt/pkg/include -fno-strict-aliasing -Wall -Wno-unused -Wno-uninitialized -fvisibility=hidden -I/opt/pkg/include -O2 -D_FORTIFY_SOURCE=2 -I/opt/pkg/include -MT php7/xapian_wrap.lo -MD -MP -MF $depbase.Tpo -c -o php7/xapian_wrap.lo php7/xapian_wrap.cc && mv -f $depbase.Tpo $depbase.Plo libtool: compile: g++ -DHAVE_CONFIG_H -I. -I.. -I/export/home/schmonz/trees/pkgsrc/textproc/php-xapian/work.tribblix/.buildlink/include/php -I/export/home/schmonz/trees/pkgsrc/textproc/php-xapian/work.tribblix/.buildlink/include/php/main -I/export/home/schmonz/trees/pkgsrc/textproc/php-xapian/work.tribblix/.buildlink/include/php/TSRM -I/export/home/schmonz/trees/pkgsrc/textproc/php-xapian/work.tribblix/.buildlink/include/php/Zend -I/export/home/schmonz/trees/pkgsrc/textproc/php-xapian/work.tribblix/.buildlink/include/php/ext -I/export/home/schmonz/trees/pkgsrc/textproc/php-xapian/work.tribblix/.buildlink/include/php/ext/date/lib -I/export/home/schmonz/trees/pkgsrc/textproc/php-xapian/work.tribblix/.buildlink/include -fno-strict-aliasing -Wall -Wno-unused -Wno-uninitialized -fvisibility=hidden -O2 -D_FORTIFY_SOURCE=2 -MT php7/xapian_wrap.lo -MD -MP -MF php7/.deps/xapian_wrap.Tpo -c php7/xapian_wrap.cc -fPIC -DPIC -o php7/.libs/xapian_wrap.o In file included from /usr/versions/gcc-4.8.3/include/c++/4.8.5/clocale:42:0, from /usr/versions/gcc-4.8.3/include/c++/4.8.5/i386-pc-solaris2.11/amd64/bits/c++locale.h:41, from /usr/versions/gcc-4.8.3/include/c++/4.8.5/bits/localefwd.h:40, from /usr/versions/gcc-4.8.3/include/c++/4.8.5/string:43, from php7/xapian_wrap.cc:1181: /usr/include/locale.h:53:12: error: 'lconv' is already declared in this scope using std::lconv; ^ *** Error code 1 Stop. bmake[3]: stopped in /export/home/schmonz/trees/pkgsrc/textproc/php-xapian/work.tribblix/xapian-bindings-1.4.12/php7 *** Error code 1 Stop. bmake[2]: stopped in /export/home/schmonz/trees/pkgsrc/textproc/php-xapian/work.tribblix/xapian-bindings-1.4.12/php7 *** Error code 1 Stop. bmake[1]: stopped in /export/home/schmonz/trees/pkgsrc/textproc/php-xapian/work.tribblix/xapian-bindings-1.4.12 *** Error code 1 Stop. bmake: stopped in /export/home/schmonz/trees/pkgsrc/textproc/php-xapian/work.tribblix/xapian-bindings-1.4.12 *** Error code 1 Stop. bmake[1]: stopped in /export/home/schmonz/trees/pkgsrc/textproc/php-xapian *** Error code 1 Stop. bmake: stopped in /export/home/schmonz/trees/pkgsrc/textproc/php-xapian
Change History (3)
comment:1 by , 5 years ago
comment:2 by , 5 years ago
Yes, inserting #include <string>
around line 20 (between #define SWIG_PREFIX_LEN 6
and #ifdef __cplusplus
) gets me a xapian_wrap.o
.
comment:3 by , 5 years ago
Milestone: | → 1.4.13 |
---|---|
Resolution: | → fixed |
Status: | new → closed |
Thanks for checking - fixed in git master by 933f374e3b123a6327a81bebdfd60d9bf94fd4d0, and backported ready for 1.4.13 by a6a2aad325cb68be3a7262f536349466eccc7b60.
Seems to be some sort of header clash. If you add
#include <string>
near the start ofphp7/xapian_wrap.cc
does that fix this?If it does, we can probably arrange for this to happen automatically.