Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 626564 - 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
Summary: dev-libs/libpcre-8.41: Compile error on MIPS: sljit/sljitNativeMIPS_common.c:...
Status: RESOLVED UPSTREAM
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: MIPS Linux
: Normal normal (vote)
Assignee: Gentoo's Team for Core System packages
URL:
Whiteboard:
Keywords: UPSTREAM
Depends on:
Blocks:
 
Reported: 2017-07-29 22:19 UTC by Joshua Kinard
Modified: 2017-07-29 22:55 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
Fix compile on MIPS for sljitNativeMIPS_common.c (libpcre-8.41-sljit_mips-label-statement-fix.patch,584 bytes, patch)
2017-07-29 22:19 UTC, Joshua Kinard
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
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.