Re: Bug#754054: perl: FTBFS on mips: Bad mojo! at make_patchnum.pl line 111.

Aurelien Jarno <[email protected]>
Newsgroups gmane.linux.debian.ports.mips
Message-ID <[email protected]>
On Tue, Jul 08, 2014 at 10:54:36PM +0300, Niko Tyni wrote:
> On Mon, Jul 07, 2014 at 08:00:37AM +0300, Niko Tyni wrote:
> > Package: perl
> > Version: 5.18.2-5
> > Severity: serious
> > X-Debbugs-Cc: [email protected]
> > 
> > The perl package failed to build on mips:
> >  LD_LIBRARY_PATH=/build/perl\-sdOt09/perl\-5.18.2${LD_LIBRARY_PATH:+:}$LD_LIBRARY_PATH  ./miniperl -Ilib make_patchnum.pl
> >  Bad mojo! at make_patchnum.pl line 111.
> 
> > This is reproducible on gabrielli.
> 
> A test case would be
> 
>   gabrielli% cat ~/t.pl
>   print ( (q{foo'} =~ /[^']+'/) ?  "ok\n" : "not ok\n" );
>   gabrielli% perl ~/t.pl
>   ok
>   gabrielli% ./miniperl ~/t.pl
>   not ok
> 
> This is a shared build; the static build doesn't exhibit the bug and
> passes the full test suite. The bug only shows up with -fPIC.
> 
> An educated guess narrowed it down to regcomp.c. The above test fails
> when regcomp.c is built with gcc-4.9 at -O2 but works with gcc-4.9 at
> -O0 and gcc-4.8 at -O2.
> 
> I'll patch the package to lower the optimization level of regcomp.c
> for now.  Assuming a test build succeeds on gabrielli, I hope to upload
> tomorrow.
> 
> Distilling a proper gcc bug report about this seems rather arduous, and
> I don't really expect to get around to it. Help from the MIPS porters
> on that would be appreciated.

The problem is due to the -ftree-vrp optimization, enabled at -O2. I
will continue investigating, but in the meantime using -fno-tree-vrp
should also workaround the problem without lowering too much the
optimization level.

-- 
Aurelien Jarno                          GPG: 4096R/1DDD8C9B
[email protected]                 http://www.aurel32.net
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.