Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 626564

Summary: dev-libs/libpcre-8.41: Compile error on MIPS: sljit/sljitNativeMIPS_common.c: error: a label can only be part of a statement and a declaration is not a statement
Product: Gentoo Linux Reporter: Joshua Kinard <kumba>
Component: Current packagesAssignee: Gentoo's Team for Core System packages <base-system>
Status: RESOLVED UPSTREAM    
Severity: normal CC: mips
Priority: Normal Keywords: UPSTREAM
Version: unspecified   
Hardware: MIPS   
OS: Linux   
See Also: https://bugs.exim.org/show_bug.cgi?id=2154
Whiteboard:
Package list:
Runtime testing required: ---
Attachments: Fix compile on MIPS for sljitNativeMIPS_common.c

Description Joshua Kinard gentoo-dev 2017-07-29 22:19:34 UTC
Created attachment 487280 [details, diff]
Fix compile on MIPS for sljitNativeMIPS_common.c

dev-libs/libpcre-8.41 fails to compile on certain MIPS platforms:

libtool: compile:  mips-unknown-linux-uclibc-gcc -DHAVE_CONFIG_H -I. -I/usr/obj/portage/dev-libs/libpcre-8.41/work/pcre-8.41 -fvisibility=hidden -Os -march=rm7000 -mtune=rm7000 -pipe -mplt -fomit-frame-pointer -c /usr/obj/portage/dev-libs/libpcre-8.41/work/pcre-8.41/pcre_jit_compile.c  -fPIC -DPIC -o .libs/libpcre_la-pcre_jit_compile.o
In file included from /usr/obj/portage/dev-libs/libpcre-8.41/work/pcre-8.41/sljit/sljitLir.c:1747:0,
                 from /usr/obj/portage/dev-libs/libpcre-8.41/work/pcre-8.41/pcre_jit_compile.c:62:
/usr/obj/portage/dev-libs/libpcre-8.41/work/pcre-8.41/sljit/sljitNativeMIPS_common.c: In function 'sljit_has_cpu_feature':
/usr/obj/portage/dev-libs/libpcre-8.41/work/pcre-8.41/sljit/sljitNativeMIPS_common.c:506:3: error: a label can only be part of a statement and a declaration is not a statement
   sljit_sw fir;
   ^~~~~~~~
make[1]: *** [Makefile:1734: libpcre_la-pcre_jit_compile.lo] Error 1
make[1]: Leaving directory '/usr/obj/portage/dev-libs/libpcre-8.41/work/pcre-8.41-abi_mips_o32.o32'
make: *** [Makefile:1322: all] Error 2

This is due to a code change between libpcre-8.40 and libpcre-8.41 that leads to a violation of C language grammar in a specific scenario.  Upstream bug #2154 has been created, with a patch, to resolve this.  Will add this to our git to resolve locally (without a revbump as it fixes a build error), but hopefully upstream will accept the patch and resolve in the next version of libpcre.
Comment 1 Joshua Kinard gentoo-dev 2017-07-29 22:55:55 UTC
Fixed in git:
https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=25f864c733b97212f71e3677f4f1a2fbaca4e857

Resolving as UPSTREAM.