[rt.cpan.org #13285] Inline breaks down when run in two processes at once

2014-06-11 Thread Ed J via RT
Wed Jun 11 22:21:47 2014: Request 13285 was acted upon.
Transaction: Correspondence added by ETJ
   Queue: Inline
 Subject: Inline breaks down when run in two processes at once
   Broken in: (no value)
Severity: Normal
   Owner: Nobody
  Requestors: dstah...@gi.alaska.edu
  Status: new
 Ticket https://rt.cpan.org/Ticket/Display.html?id=13285 >


In true perl one-liner style, the following is equivalent:

rm -rf _Inline; perl -MInline -e 'fork;Inline->bind(C => q{void a() 
{puts("z\n");}}); &a'

Also, running that a few times sometimes gives other errors as well.


Inline::CPP: Looking for suggestions on Gentoo

2014-06-11 Thread David Oswald
Recently I received a bug report for Inline::CPP under Gentoo:

https://rt.cpan.org/Public/Bug/Display.html?id=96348

I'd like to work on it, but I haven't been successful in installing Gentoo
as a VirtualBox guest, and that's about the only opportunity I have for
running Gentoo (I suspect my laptop doesn't have strong enough
virtualization support; simply can't get a boot to complete).

So in the absence of hands-on Gentoo capability, I'm throwing myself at the
mercy of Inline::CPP users here.

If you're able to find a solution to the bug report that allows Gentoo to
install cleanly using the basic CPAN tools, without jeopardizing other
architectures, please let me know so that I can get a patch applied.

I'm on the road for a few days, and confined to  my laptop.  If nothing
turns up in the meantime, I can give the VirtualBox testing another go once
I return home to a more capable computer. :)

Thanks!!!

Dave

-- 

David Oswald
daosw...@gmail.com


[rt.cpan.org #96291] t/08taint.t fails on perl 5.20.0

2014-06-11 Thread Ed J via RT
Wed Jun 11 05:52:23 2014: Request 96291 was acted upon.
Transaction: Correspondence added by ETJ
   Queue: Inline
 Subject: t/08taint.t fails on perl 5.20.0
   Broken in: 0.55
Severity: (no value)
   Owner: Nobody
  Requestors: e...@cpan.org
  Status: open
 Ticket https://rt.cpan.org/Ticket/Display.html?id=96291 >


On Mon Jun 09 01:00:03 2014, NERDVANA wrote:
> On Mon Jun 09 00:02:51 2014, NERDVANA wrote:
> > Oh, and the perls involved were 5.12.4 and 5.16.3, so it isn't
> > specific to 5.20
> 
> I have further discovered that it only happens when I run cpan or
> cpanm as root.  When I run "make test" manually as a normal user (with
> the files chown'd to that user) the test passes.

Reason was the logic in Inline.pm untainting PATH disallows any directories 
writable by that user - for root, that's all of them!

Change proposed is visible on github.


[rt.cpan.org #96291] t/08taint.t fails on perl 5.20.0

2014-06-11 Thread Ed J via RT
https://rt.cpan.org/Ticket/Display.html?id=96291 >

On Mon Jun 09 01:00:03 2014, NERDVANA wrote:
> On Mon Jun 09 00:02:51 2014, NERDVANA wrote:
> > Oh, and the perls involved were 5.12.4 and 5.16.3, so it isn't
> > specific to 5.20
> 
> I have further discovered that it only happens when I run cpan or
> cpanm as root.  When I run "make test" manually as a normal user (with
> the files chown'd to that user) the test passes.

Reason was the logic in Inline.pm untainting PATH disallows any directories 
writable by that user - for root, that's all of them!

Change proposed is visible on github.


[rt.cpan.org #95809] [PATCH] Using Inline in a distribution with multiple modules

2014-06-11 Thread Sisyphus via RT
Wed Jun 11 03:24:13 2014: Request 95809 was acted upon.
Transaction: Correspondence added by SISYPHUS
   Queue: Inline
 Subject: [PATCH] Using Inline in a distribution with multiple modules
   Broken in: (no value)
Severity: (no value)
   Owner: Nobody
  Requestors: s...@parasite.cc
  Status: open
 Ticket https://rt.cpan.org/Ticket/Display.html?id=95809 >


On Mon Jun 09 22:45:21 2014, s...@parasite.cc wrote:
> Ok I'll check into that too :). Now I just have to find some time this
> week...

Hi Jason,

The problem seems to be mostly fixed if, at line 55 of (your patched) 
lib/Inline/Makemaker.pm we change:

if ($mm->{PMLIBDIRS} && $mm->{PM}) {
to:
if (@{$mm->{PMLIBDIRS}} && $mm->{PM}) {

That at least allows both "layouts" to build and install as desired. On the 
perls I've just tested, an array reference is true even if the array being 
referenced is empty - hence the need for the alteration.
However, that change doesn't fix the annoyance of having the compilation re-run 
during each of the make steps (which happens because the specified .inl target 
is not met).

Incidentally, for a long time Inline has shipped with the demo module named 
Math::Simple-1.23.
It was always packed into the source as:

modules/Math/Simple/Changes
modules/Math/Simple/Makefile.PL
modules/Math/Simple/MANIFEST
modules/Math/Simple/Simple.pl
modules/Math/Simple/test.pl

In git (https://github.com/ingydotnet/inline-pm), I've now rearranged that as 
the more usual:

modules/Math-Simple-1.23/Changes
modules/Math-Simple-1.23/Makefile.PL
modules/Math-Simple-1.23/MANIFEST
modules/Math-Simple-1.23/Simple.pl
modules/Math-Simple-1.23/test.pl

And I've also added a second demo which is essentially the same distro as the 
one we've been using as our reference. (I've changed the names of the modules 
from Foo, Foo::Bar, and Foo::Bar::Baz to Boo, Boo::Far and Boo::Far::Faz - 
other than that it's the same).

So, in git, you'll also find:

modules/Boo-2.01/lib/Boo.pm
modules/Boo-2.01/lib/Boo/Far.pm
modules/Boo-2.01/lib/Boo/Far/Faz.pm
modules/Boo-2.01/Makefile.PL
modules/Boo-2.01/MANIFEST
modules/Boo-2.01/t/boo.t

These files will, of course ship with future Inline releases as demos of the 2 
layouts.
Naturally, what we want is for both of those demos to build correctly out of 
the box.

With the above alteration to your patched MakeMaker.pm I think they do that - 
except that Math-Simple-1.23 wants to recompile the C code at every 'make' step.

Cheers,
Rob