Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

[rt.cpan.org #65703] Build Problem - Inline::C fails at t/08taint.t

4 views
Skip to first unread message

Brian Fraser via RT

unread,
Feb 23, 2014, 1:10:56 PM2/23/14
to inl...@perl.org
Sun Feb 23 13:10:55 2014: Request 65703 was acted upon.
Transaction: Correspondence added by Hugmeir
Queue: Inline
Subject: Build Problem - Inline::C fails at t/08taint.t
Broken in: (no value)
Severity: (no value)
Owner: Nobody
Requestors: alexande...@web.de
Status: open
Ticket <URL: https://rt.cpan.org/Ticket/Display.html?id=65703 >


On Tue Feb 15 20:05:27 2011, alexande...@web.de wrote:
> The problem here as I see it ist the use of
> (stat("/usr/bin"))[2] & 0022
> instead of
> (stat("/usr/bin"))[2] & 0002
> , because you must be authorized to write into
> the first case, but needn't be in the second.
> If you exclude 0020 you could exclude 0200 for
> the same reasons.
> To me it would seem more consistent to use the -w, -W operators
> to check for every directory in the path if it
> is writable at all. Then you can omit the
> (stat("/usr/bin"))[2] & 0??? test completely and just write:
>
> join ':', grep {not /^\./ and -d $_ and not -w $_ || -W $_
> } split /:/, $ENV{PATH};

This issue just bit me when smoking CPAN on Android. Unfortunately, the above solution doesn't work for me.

tl;dr: Skipping the tests when $^O eq 'android' would probably be for the best, if that filter is going to stay.

Android's an interesting case. It's basically a linux system that doesn't provide any toolchain whatsoever, so you either have to install one yourself (and to do that, you need to root your phone and probably create/mount an ext3/4 partition in your sdcard) or have an app install it for you. Either way, the toolchain ends up in a non-standard location with non-standard permissions, and to use it you need to tweak with it's permissions and/or be root.

There's probably no ideal solution here, but either way my suggestion is to have the module skip t/08taint.t under Android, and then to have env_untaint actually check if an entry is already untainted (with Scalar::Util::tainted in perl>=5.8, and whatever the eval invocation in older perls is); if it is, trust it as-is, no need to filter anything. That way, if someone wants to use Inline on Android under taint, they can do it by manually untainting $ENV{PATH}, which they should've been doing on the first place :)



sisy...@optusnet.com.au

unread,
Mar 5, 2014, 8:37:43 AM3/5/14
to bug-I...@rt.cpan.org, inl...@perl.org


-----Original Message-----
From: Brian Fraser via RT

>> To me it would seem more consistent to use the -w, -W operators
>> to check for every directory in the path if it
>> is writable at all. Then you can omit the
>> (stat("/usr/bin"))[2] & 0??? test completely and just write:
>>
>> join ':', grep {not /^\./ and -d $_ and not -w $_ || -W $_
>> } split /:/, $ENV{PATH};
>
> This issue just bit me when smoking CPAN on Android. Unfortunately, the
> above solution doesn't work for me.
>
> tl;dr: Skipping the tests when $^O eq 'android' would probably be for the
> best, if that filter is going to stay.

I've just uploaded Inline-0.53_01 to CPAN.
It includes Alexander's recommended change to env_untaint() and also has
08taint.t skip the tests for Android.

Brian/Alexander - if you want any additional changes to env_untaint (or
anything else, for that matter) just send me the patch and we should be able
to get it incorporated into the next stable release (0.54).

Thanks guys.

Cheers,
Rob

sisyphus1@optusnet.com.au via RT

unread,
Mar 5, 2014, 8:39:02 AM3/5/14
to inl...@perl.org
Wed Mar 05 08:39:01 2014: Request 65703 was acted upon.
Transaction: Correspondence added by sisy...@optusnet.com.au
Queue: Inline
Subject: Re: [rt.cpan.org #65703] Build Problem - Inline::C fails at t/08taint.t
Broken in: (no value)
Severity: (no value)
Owner: Nobody
Requestors: alexande...@web.de
Status: open
Ticket <URL: https://rt.cpan.org/Ticket/Display.html?id=65703 >




Graham Ollis via RT

unread,
Apr 30, 2014, 5:11:58 AM4/30/14
to inl...@perl.org
Wed Apr 30 05:11:58 2014: Request 65703 was acted upon.
Transaction: Correspondence added by PLICEASE
Queue: Inline
Subject: Build Problem - Inline::C fails at t/08taint.t
Broken in: (no value)
Severity: (no value)
Owner: Nobody
Requestors: alexande...@web.de
Status: open
Ticket <URL: https://rt.cpan.org/Ticket/Display.html?id=65703 >


I got this (I believe related) error trying to install Inline (+Inline::C)

t/08taint.t ............. 1/10 Running Mkbootstrap for _08taint_1_p_0965 ()
chmod 644 _08taint_1_p_0965.bs
/home/ollisg/perl5/perlbrew/perls/perl-5.18.2c/bin/perl /home/ollisg/.perlbrew/libs/perl-5.18.2c@dev/lib/perl5/ExtUtils/xsubpp -typemap "/home/ollisg/perl5/perlbrew/perls/perl-5.18.2c/lib/5.18.2/ExtUtils/typemap" _08taint_1_p_0965.xs > _08taint_1_p_0965.xsc && mv _08taint_1_p_0965.xsc _08taint_1_p_0965.c
clang -c -fno-strict-aliasing -pipe -fstack-protector -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -O2 -DVERSION=\"0.00\" -DXS_VERSION=\"0.00\" -fPIC "-I/home/ollisg/perl5/perlbrew/perls/perl-5.18.2c/lib/5.18.2/x86_64-linux/CORE" _08taint_1_p_0965.c
/bin/sh: 1: clang: not found
make: *** [_08taint_1_p_0965.o] Error 127

A problem was encountered while attempting to compile and install your Inline
C code. The command that failed was:
make > out.make 2>&1

The build directory was:
/home/ollisg/.cpanm/work/1398847813.20092/Inline-0.55/C/_Inline_test/build/_08taint_1_p_0965

To debug the problem, cd to the build directory, and inspect the output files.

at ./t/08taint_1.p line 7.
...propagated at /home/ollisg/.perlbrew/libs/perl-5.18.2c@dev/lib/perl5/Inline/C.pm line 797.
BEGIN failed--compilation aborted at ./t/08taint_1.p line 7.
Compilation failed in require at t/08taint.t line 45.
# Looks like you planned 10 tests but ran 1.
# Looks like your test exited with 2 just after 1.
t/08taint.t ............. Dubious, test returned 2 (wstat 512, 0x200)
Failed 9/10 subtests

I've installed clang into my home directory because the version that comes with my OS is very old. I feel like this configuration should be supported, but perhaps not? As a work around I chmod -R -x the appropriate directorys in my clang install and the then install worked.

Chris Marshall via RT

unread,
May 6, 2014, 9:14:25 AM5/6/14
to inl...@perl.org
Tue May 06 09:14:24 2014: Request 65703 was acted upon.
Transaction: Correspondence added by CHM
Queue: Inline
Subject: Build Problem - Inline::C fails at t/08taint.t
Broken in: (no value)
Severity: (no value)
Owner: Nobody
Requestors: alexande...@web.de
Status: open
Ticket <URL: https://rt.cpan.org/Ticket/Display.html?id=65703 >


I hit the same error with my cygwin64. In my specific
case, the issue is that I have all of the added perl
modules installed into a separate non-system location
and PERL5LIB is set so that works.

With -T PERL5LIB is not consulted. A look at the pod
for taint in perlrun suggests to add

use lib '/my/perl5/lib/dir';

When I did that, it all works. I'm not sure if this is related
to the other failures but it is definitely the problem for
a non-system perl install with INSTALL_BASE and the
use of PERL5LIB.

--Chris

Chris Marshall via RT

unread,
May 6, 2014, 9:15:50 AM5/6/14
to inl...@perl.org
Tue May 06 09:15:50 2014: Request 65703 was acted upon.
Transaction: Correspondence added by CHM
Queue: Inline
Subject: Build Problem - Inline::C fails at t/08taint.t
Broken in: (no value)
Severity: (no value)
Owner: Nobody
Requestors: alexande...@web.de
Status: open
Ticket <URL: https://rt.cpan.org/Ticket/Display.html?id=65703 >


My use lib line was added just after all the
BEGIN{} blocks in t/08taint.t...

Ed J via RT

unread,
Jun 12, 2014, 4:34:16 AM6/12/14
to alexande...@lavabit.com, fras...@gmail.com, inl...@perl.org
<URL: https://rt.cpan.org/Ticket/Display.html?id=65703 >

I'd be very interested to know whether the change proposed in https://github.com/mohawk2/inline-pm/commit/f9242a2e92244d99a2ce051c9ae523913eb47fc4 fixes this issue.

Ed J via RT

unread,
Jun 12, 2014, 4:34:16 AM6/12/14
to inl...@perl.org
Thu Jun 12 04:34:15 2014: Request 65703 was acted upon.
Transaction: Correspondence added by ETJ
Queue: Inline
Subject: Build Problem - Inline::C fails at t/08taint.t
Broken in: (no value)
Severity: (no value)
Owner: Nobody
Requestors: alexande...@web.de
Status: open
Ticket <URL: https://rt.cpan.org/Ticket/Display.html?id=65703 >

Sisyphus via RT

unread,
Jun 24, 2014, 4:17:19 AM6/24/14
to inl...@perl.org
Tue Jun 24 04:17:18 2014: Request 65703 was acted upon.
Transaction: Correspondence added by SISYPHUS
Queue: Inline
Subject: Build Problem - Inline::C fails at t/08taint.t
Broken in: (no value)
Severity: (no value)
Owner: Nobody
Requestors: alexande...@web.de
Status: open
Ticket <URL: https://rt.cpan.org/Ticket/Display.html?id=65703 >



Superseded by #96291 (t/08taint.t fails on perl 5.20.0)
0 new messages