X-Original-To: alpine-aports@mail.alpinelinux.org Delivered-To: alpine-aports@mail.alpinelinux.org Received: from mail.alpinelinux.org (dallas-a1.alpinelinux.org [127.0.0.1]) by mail.alpinelinux.org (Postfix) with ESMTP id 6FDE1DC0965 for ; Mon, 1 Feb 2016 07:10:15 +0000 (UTC) Received: from smtp.core-hosting.net (ns1.core-hosting.net [95.130.13.75]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.alpinelinux.org (Postfix) with ESMTPS id 1E109DC00AD for ; Mon, 1 Feb 2016 07:10:14 +0000 (UTC) Received: from tiptop.internal (unknown [109.203.51.220]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by smtp.core-hosting.net (Postfix) with ESMTPSA id 72787AA1557 for ; Mon, 1 Feb 2016 08:10:10 +0100 (CET) Date: Mon, 1 Feb 2016 08:08:37 +0100 From: Olivier Mauras To: alpine-aports@lists.alpinelinux.org Subject: [alpine-aports] main/php-memcache: Add gcc5 patch to fix relocation errors Message-Id: <20160201080837.cb2dfb4b7b0e28d66e9b11a5@mauras.ch> X-Mailer: Sylpheed 3.4.3 (GTK+ 2.24.28; x86_64-alpine-linux-musl) X-Mailinglist: alpine-aports Precedence: list List-Id: Alpine Development List-Unsubscribe: List-Post: List-Help: List-Subscribe: Mime-Version: 1.0 Content-Type: multipart/signed; protocol="application/pgp-signature"; micalg="PGP-SHA256"; boundary="Signature=_Mon__1_Feb_2016_08_08_38_+0100_OBWIfGCsxCAbdip0" X-Virus-Scanned: ClamAV using ClamSMTP --Signature=_Mon__1_Feb_2016_08_08_38_+0100_OBWIfGCsxCAbdip0 Content-Type: text/plain; charset=US-ASCII Content-Disposition: inline Content-Transfer-Encoding: quoted-printable >From 5dfde24873b4c219136944ba884653b7255cfabb Mon Sep 17 00:00:00 2001 From: Olivier Mauras Date: Mon, 1 Feb 2016 08:02:50 +0100 Subject: [PATCH] main/php-memcache: Add gcc5 patch to fix relocation errors Error relocating /usr/lib/php/modules/memcache.so: mmc_buffer_alloc: symbol not found in Unknown on line 0 --- main/php-memcache/APKBUILD | 25 ++++++++--- main/php-memcache/memcache-gcc5.patch | 84 +++++++++++++++++++++++++++++++= ++++ 2 files changed, 104 insertions(+), 5 deletions(-) create mode 100644 main/php-memcache/memcache-gcc5.patch diff --git a/main/php-memcache/APKBUILD b/main/php-memcache/APKBUILD index af5eaf5..7584e84 100644 --- a/main/php-memcache/APKBUILD +++ b/main/php-memcache/APKBUILD @@ -4,7 +4,7 @@ pkgname=3Dphp-memcache _pkgreal=3Dmemcache pkgver=3D3.0.8 _pkgver=3D${pkgver/_rc/RC} -pkgrel=3D3 +pkgrel=3D4 pkgdesc=3D"PHP extension memcache" url=3D"http://pecl.php.net/package/$_pkgreal" arch=3D"all" @@ -14,10 +14,22 @@ pecldepends=3D"php-dev autoconf" makedepends=3D"$pecldepends zlib-dev" install=3D"" subpackages=3D"" -source=3D"http://pecl.php.net/get/$_pkgreal-$_pkgver.tgz" +source=3D"http://pecl.php.net/get/$_pkgreal-$_pkgver.tgz + memcache-gcc5.patch" =20 _builddir=3D"$srcdir"/$_pkgreal-$_pkgver =20 +prepare() { + local i + cd "$_builddir" + update_config_sub || return 1 + for i in $source; do + case $i in + *.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;; + esac + done +} + build() { cd "$_builddir" phpize || return 1 @@ -32,6 +44,9 @@ package() { echo "extension=3D$_pkgreal.so" > "$pkgdir"/etc/php/conf.d/$_pkgreal.ini } =20 -md5sums=3D"24505e9b263d2c77f8ae5e9b4725e7d1 memcache-3.0.8.tgz" -sha256sums=3D"2cae5b423ffbfd33a259829849f6000d4db018debe3e29ecf3056f06642e= 8311 memcache-3.0.8.tgz" -sha512sums=3D"916c6b21ab7c1021128626c0df35ef0b83cb76b6115fe7c45b003ca4f78a= d9484bf3c998bc7ebdee19f84349ff1e56759f74e75aee5bc70b1de9a03c45a99bc3 memca= che-3.0.8.tgz" +md5sums=3D"24505e9b263d2c77f8ae5e9b4725e7d1 memcache-3.0.8.tgz +593ffa37243c93ccf683fc25c34aa754 memcache-gcc5.patch" +sha256sums=3D"2cae5b423ffbfd33a259829849f6000d4db018debe3e29ecf3056f06642e= 8311 memcache-3.0.8.tgz +7e03fd87420f06f2bf6b05ee700966b008ae55ef7412905a757351ae685e237d memcache= -gcc5.patch" +sha512sums=3D"916c6b21ab7c1021128626c0df35ef0b83cb76b6115fe7c45b003ca4f78a= d9484bf3c998bc7ebdee19f84349ff1e56759f74e75aee5bc70b1de9a03c45a99bc3 memca= che-3.0.8.tgz +b7ce5719277a4ba534cd239312dcfcce870b4f4f03df381901533f65e1b379f7746b2eb811= f78ffac452c2a7745b07647038d108903534e8b19c308821f57c88 memcache-gcc5.patch" diff --git a/main/php-memcache/memcache-gcc5.patch b/main/php-memcache/memc= ache-gcc5.patch new file mode 100644 index 0000000..31c1b0c --- /dev/null +++ b/main/php-memcache/memcache-gcc5.patch @@ -0,0 +1,84 @@ +diff -ru memcache-3.0.8.old/memcache_pool.c memcache-3.0.8/memcache_pool.c +--- memcache-3.0.8.old/memcache_pool.c 2013-04-08 04:12:54.000000000 +0200 ++++ memcache-3.0.8/memcache_pool.c 2015-02-09 15:26:43.678369270 +0100 +@@ -40,7 +40,7 @@ +=20 + ZEND_DECLARE_MODULE_GLOBALS(memcache) +=20 +-inline void mmc_buffer_alloc(mmc_buffer_t *buffer, unsigned int size) /* ++MMC_POOL_INLINE void mmc_buffer_alloc(mmc_buffer_t *buffer, unsigned int = size) /* + ensures space for an additional size bytes {{{ */ + { + register size_t newlen; +@@ -48,7 +48,7 @@ + } + /* }}} */ +=20 +-inline void mmc_buffer_free(mmc_buffer_t *buffer) /* {{{ */ ++MMC_POOL_INLINE void mmc_buffer_free(mmc_buffer_t *buffer) /* {{{ */ + { + if (buffer->value.c !=3D NULL) { + smart_str_free(&(buffer->value)); +@@ -1676,7 +1676,7 @@ + } + /* }}} */ +=20 +-inline int mmc_prepare_key_ex(const char *key, unsigned int key_len, char= *result, unsigned int *result_len) /* {{{ */ ++MMC_POOL_INLINE int mmc_prepare_key_ex(const char *key, unsigned int key_= len, char *result, unsigned int *result_len) /* {{{ */ + { + unsigned int i; + if (key_len =3D=3D 0) { +@@ -1694,7 +1694,7 @@ + } + /* }}} */ +=20 +-inline int mmc_prepare_key(zval *key, char *result, unsigned int *result_= len) /* {{{ */ ++MMC_POOL_INLINE int mmc_prepare_key(zval *key, char *result, unsigned int= *result_len) /* {{{ */ + { + if (Z_TYPE_P(key) =3D=3D IS_STRING) { + return mmc_prepare_key_ex(Z_STRVAL_P(key), Z_STRLEN_P(key), result, res= ult_len); +diff -ru memcache-3.0.8.old/memcache_pool.h memcache-3.0.8/memcache_pool.h +--- memcache-3.0.8.old/memcache_pool.h 2013-04-08 04:12:54.000000000 +0200 ++++ memcache-3.0.8/memcache_pool.h 2015-02-09 15:26:05.303142526 +0100 +@@ -135,8 +135,15 @@ + #define mmc_buffer_release(b) memset((b), 0, sizeof(*(b))) + #define mmc_buffer_reset(b) (b)->value.len =3D (b)->idx =3D 0 +=20 +-inline void mmc_buffer_alloc(mmc_buffer_t *, unsigned int); +-inline void mmc_buffer_free(mmc_buffer_t *); ++#if defined(__STDC_VERSION__) && __STDC_VERSION__ >=3D 201112L ++/* see https://gcc.gnu.org/gcc-5/porting_to.html */ ++#define MMC_POOL_INLINE extern inline ++#else ++#define MMC_POOL_INLINE inline ++#endif ++ ++MMC_POOL_INLINE void mmc_buffer_alloc(mmc_buffer_t *, unsigned int); ++MMC_POOL_INLINE void mmc_buffer_free(mmc_buffer_t *); +=20 + /* stream handlers */ + typedef struct mmc_stream mmc_stream_t; +@@ -391,8 +398,8 @@ + double timeval_to_double(struct timeval tv); + struct timeval double_to_timeval(double sec); +=20 +-inline int mmc_prepare_key_ex(const char *, unsigned int, char *, unsigne= d int *); +-inline int mmc_prepare_key(zval *, char *, unsigned int *); ++MMC_POOL_INLINE int mmc_prepare_key_ex(const char *, unsigned int, char *= , unsigned int *); ++MMC_POOL_INLINE int mmc_prepare_key(zval *, char *, unsigned int *); +=20 + #define mmc_str_left(h, n, hlen, nlen) ((hlen) >=3D (nlen) ? memcmp((h), = (n), (nlen)) =3D=3D 0 : 0) +=20 +diff -ru memcache-3.0.8.old/memcache_queue.h memcache-3.0.8/memcache_queue= .h +--- memcache-3.0.8.old/memcache_queue.h 2013-04-08 04:12:54.000000000 +0200 ++++ memcache-3.0.8/memcache_queue.h 2015-02-09 15:24:23.309539885 +0100 +@@ -39,6 +39,9 @@ +=20 + #ifdef PHP_WIN32 + #define MMC_QUEUE_INLINE ++#elif defined(__STDC_VERSION__) && __STDC_VERSION__ >=3D 201112L ++/* see https://gcc.gnu.org/gcc-5/porting_to.html */ ++#define MMC_QUEUE_INLINE extern inline + #else + #define MMC_QUEUE_INLINE inline + #endif --=20 2.6.4 --Signature=_Mon__1_Feb_2016_08_08_38_+0100_OBWIfGCsxCAbdip0 Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQIcBAEBCAAGBQJWrwR2AAoJEJXQwVHPrdN8wE4P/jJ0r9Y/t6TLr2C0zNejd+bY VdgP9y3XSqhXd9pJgSMqg0vMZB2g9GCz+o5DffdY/eo6Ec7mATW1mDEP8q7QI0g6 /TGb7DF1NbPvyw7gCeOelhjtljfZiPpNE9EBf3TAQuzQ8OUR/mLTZ1LUxF7tmjeT aFJb5xE1+aUkXSEead8OwFcGGNzm5ar8yQ669Kpu46olQEjFntCfHIkIVk91fgXO Y2CeEvskRgpipjORObs0YwjcKEx7x3LrSPfxTqJsWfMH3dHnVTnlhb1P0FxL1/S3 UC541fSLw/UuQcCRfu+BFdpeX1RvOQrdnLA3YXMAye/sGiutsVRvap2MelVRoiTi pb4ySfwu8+GMXWGular7a6sC82XMeBGqyQSlgu3nY6OynjAJ1z8cVprw0MFVPSvw eHh6r7C2F+IejhZFB+ZVpfavtie+pJI66AW0Mr3oul2C5+piDYc/4tG7s5cwOvyn hRDWntvP1iIjERMADSTuNNBtkxIi3fdjY/eHiE9mCBTxGoMVRHWHb34eUcteFJcd 9SeaSZOKOvYNFeoMbfw/+5OkCECupsdR9ODvRLX1csWOd2VdHupVtqweHxUWlwGt wHswArnOwI0BK/QKApdM5QL0ugt+vBN1XpIl+1d3no/o7Gh1+fLs+NVj0yQNB48R GPk1itrQpNWz0tQSQ2Li =CApe -----END PGP SIGNATURE----- --Signature=_Mon__1_Feb_2016_08_08_38_+0100_OBWIfGCsxCAbdip0-- --- Unsubscribe: alpine-aports+unsubscribe@lists.alpinelinux.org Help: alpine-aports+help@lists.alpinelinux.org ---