pkgsrc-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

pkg/50236: lang/php54 fails to build on NetBSD/m68k 7.0_RC1



>Number:         50236
>Category:       pkg
>Synopsis:       lang/php54 fails to build on NetBSD/m68k 7.0_RC1
>Confidential:   no
>Severity:       serious
>Priority:       low
>Responsible:    pkg-manager
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Sun Sep 13 06:50:00 +0000 2015
>Originator:     Izumi Tsutsui
>Release:        NetBSD 7.0_RC1 + pkgsrc-2015Q2
>Organization:
>Environment:
System: NetBSD luna68k 7.0_RC1 GENERIC
Architecture: m68k (probably alpha, sh3, and hppa are also affected)
Machine: luna68k
>Description:
lang/php54 builds on pkgsrc-2015Q2 tree fails on NetBSD/m68k 7.0_RC1
due to lack of SLJIT support.

It looks upstream sljit sources in pcrelib have inconsistent definitions.

>How-To-Repeat:
build lang/php54 on architectures which don't have SLJIT support,
like m68k, alpha, sh3, or hppa:
(the log is taken from php-5.4.43 before the latest pullup but same on 5.4.44)
---
/usr/obj.luna68k/pkgsrc/lang/php54/work.m68k/php-5.4.43/ext/pcre/pcrelib/pcre_jit_compile.c:65:2: error: #error Unsupported architecture
 #error Unsupported architecture
---

The full log messages are here:
---
/bin/sh /usr/obj.luna68k/pkgsrc/lang/php54/work.m68k/php-5.4.43/libtool --silent --preserve-dup-deps --mode=compile gcc -DHAVE_CONFIG_H -I/usr/obj.luna68k/pkgsrc/lang/php54/work.m68k/php-5.4.43/ext/pcre/pcrelib -Iext/pcre/ -I/usr/obj.luna68k/pkgsrc/lang/php54/work.m68k/php-5.4.43/ext/pcre/ -DPHP_ATOM_INC -I/usr/obj.luna68k/pkgsrc/lang/php54/work.m68k/php-5.4.43/include -I/usr/obj.luna68k/pkgsrc/lang/php54/work.m68k/php-5.4.43/main -I/usr/obj.luna68k/pkgsrc/lang/php54/work.m68k/php-5.4.43 -I/usr/obj.luna68k/pkgsrc/lang/php54/work.m68k/php-5.4.43/ext/date/lib -I/usr/pkg/include/libxml2 -I/usr/obj.luna68k/pkgsrc/lang/php54/work.m68k/php-5.4.43/TSRM -I/usr/obj.luna68k/pkgsrc/lang/php54/work.m68k/php-5.4.43/Zend  -I/usr/pkg/include -I/usr/include -I/usr/pkg/include  -O2 -fno-reorder-blocks -pthread -I/usr/pkg/include -I/usr/include  -c /usr/obj.luna68k/pkgsrc/lang/php54/work.m68k/php-5.4.43/ext/pcre/pcrelib/pcre_jit_compile.c -o ext/pcre/pcrelib/pcre_jit_compile.lo 
In file included from /usr/obj.luna68k/pkgsrc/lang/php54/work.m68k/php-5.4.43/ext/pcre/pcrelib/pcre_jit_compile.c:62:0:
/usr/obj.luna68k/pkgsrc/lang/php54/work.m68k/php-5.4.43/ext/pcre/pcrelib/sljit/sljitLir.c:1714:49: error: conflicting types for 'sljit_create_compiler'
 SLJIT_API_FUNC_ATTRIBUTE struct sljit_compiler* sljit_create_compiler(void)
                                                 ^
In file included from /usr/obj.luna68k/pkgsrc/lang/php54/work.m68k/php-5.4.43/ext/pcre/pcrelib/sljit/sljitLir.c:27:0,
                 from /usr/obj.luna68k/pkgsrc/lang/php54/work.m68k/php-5.4.43/ext/pcre/pcrelib/pcre_jit_compile.c:62:
/usr/obj.luna68k/pkgsrc/lang/php54/work.m68k/php-5.4.43/ext/pcre/pcrelib/sljit/sljitLir.h:420:49: note: previous declaration of 'sljit_create_compiler' was here
 SLJIT_API_FUNC_ATTRIBUTE struct sljit_compiler* sljit_create_compiler(void *allocator_data);
                                                 ^
/usr/obj.luna68k/pkgsrc/lang/php54/work.m68k/php-5.4.43/ext/pcre/pcrelib/pcre_jit_compile.c:65:2: error: #error Unsupported architecture
 #error Unsupported architecture
  ^
/usr/obj.luna68k/pkgsrc/lang/php54/work.m68k/php-5.4.43/ext/pcre/pcrelib/pcre_jit_compile.c: In function '_pcre_jit_compile':
/usr/obj.luna68k/pkgsrc/lang/php54/work.m68k/php-5.4.43/ext/pcre/pcrelib/pcre_jit_compile.c:9970:1: error: too many arguments to function 'sljit_create_compiler'
 compiler = sljit_create_compiler(NULL);
 ^
In file included from /usr/obj.luna68k/pkgsrc/lang/php54/work.m68k/php-5.4.43/ext/pcre/pcrelib/pcre_jit_compile.c:62:0:
/usr/obj.luna68k/pkgsrc/lang/php54/work.m68k/php-5.4.43/ext/pcre/pcrelib/sljit/sljitLir.c:1714:49: note: declared here
 SLJIT_API_FUNC_ATTRIBUTE struct sljit_compiler* sljit_create_compiler(void)
                                                 ^
In file included from /usr/obj.luna68k/pkgsrc/lang/php54/work.m68k/php-5.4.43/ext/pcre/pcrelib/sljit/sljitLir.c:27:0,
                 from /usr/obj.luna68k/pkgsrc/lang/php54/work.m68k/php-5.4.43/ext/pcre/pcrelib/pcre_jit_compile.c:62:
/usr/obj.luna68k/pkgsrc/lang/php54/work.m68k/php-5.4.43/ext/pcre/pcrelib/pcre_jit_compile.c: At top level:
/usr/obj.luna68k/pkgsrc/lang/php54/work.m68k/php-5.4.43/ext/pcre/pcrelib/sljit/sljitLir.h:438:31: warning: 'sljit_set_compiler_memory_error' used but never defined [enabled by default]
 SLJIT_API_FUNC_ATTRIBUTE void sljit_set_compiler_memory_error(struct sljit_compiler *compiler);
                               ^
Makefile:466: recipe for target 'ext/pcre/pcrelib/pcre_jit_compile.lo' failed
gmake: *** [ext/pcre/pcrelib/pcre_jit_compile.lo] Error 1
*** Error code 2

Stop.
make[3]: stopped in /usr/pkgsrc/lang/php54
*** Error code 1

Stop.
make[2]: stopped in /usr/pkgsrc/lang/php54
*** Error code 1

Stop.
---

>Fix:
Add similar confitionals to '#define SUPPORT_JIT' line
in ext/pcre/pcrelib/config.h:
 https://github.com/php/php-src/blob/f38ca75a3cc5737bdb922dc5e2a7505cd20cd7ea/ext/pcre/pcrelib/config.h#L397
as ext/pcre/pcrelib/sljit/sljitConfigInternal.h defines
 https://github.com/php/php-src/blob/f38ca75a3cc5737bdb922dc5e2a7505cd20cd7ea/ext/pcre/pcrelib/sljit/sljitConfigInternal.h#L117
via local patch?

--- php-5.4.43/ext/pcre/pcrelib/config.h.orig	2015-08-03 09:58:18.000000000 +0900
+++ php-5.4.43/ext/pcre/pcrelib/config.h
@@ -395,7 +395,18 @@
 #undef SUPPORT_GCOV
 
 /* Define to any value to enable support for Just-In-Time compiling. */
+#if defined(__i386__) || defined(__i386) \
+|| defined(__x86_64__) \
+|| defined(__arm__) || defined(__ARM__) \
+|| defined (__aarch64__) \
+|| defined(__ppc64__) || defined(__powerpc64__) || defined(_ARCH_PPC64) || (defined(_POWER) && defined(__64BIT__)) \
+|| defined(__ppc__) || defined(__powerpc__) || defined(_ARCH_PPC) || defined(_ARCH_PWR) || defined(_ARCH_PWR2) || defined(_POWER) \
+|| (defined(__mips__) && !defined(_LP64)) \
+|| defined(__mips64) \
+|| defined(__sparc__) || defined(__sparc) \
+|| defined(__tilegx__)
 #define SUPPORT_JIT
+#endif
 
 /* Define to any value to allow pcregrep to be linked with libbz2, so that it
    is able to handle .bz2 files. */
---



Home | Main Index | Thread Index | Old Index