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

[rt.cpan.org #80026] LIB is being in correctly quoted when using more than one lib path

5 views
Skip to first unread message

Jody Clements via RT

unread,
Oct 5, 2012, 11:23:15 AM10/5/12
to inl...@perl.org
Fri Oct 05 11:23:15 2012: Request 80026 was acted upon.
Transaction: Ticket created by JCLEMENTS
Queue: Inline
Subject: LIB is being in correctly quoted when using more than one lib path
Broken in: 0.48, 0.48_01, 0.48_02, 0.49, 0.49_01, 0.49_02, 0.50, 0.50_01, 0.50_02
Severity: Important
Owner: Nobody
Requestors: JCLE...@cpan.org
Status: new
Ticket <URL: https://rt.cpan.org/Ticket/Display.html?id=80026 >


I have been having a problem getting Inline to compile my code after a
move from version 0.47 to version 0.50. I have the following set up in
my source:

use Inline
C => "$src_file",
VERSION => '0.01',
ENABLE => 'AUTOWRAP',
INC => "-I$src_dir/src -I$src_dir/easel",
LIBS => "-L$src_dir/easel -L$src_dir/src -lhmmer -leasel",
TYPEMAPS => [$typemaps],
NAME => 'Bio::HMM::Logo';

When I run make using version 0.47 everything compiles and the cc line
looks like this:

cc -c -I/opt/src/Bio-HMM-Logo-0.01 -I/opt/src/Bio-HMM-Logo-0.01/src/src
-I/opt/src/Bio-HMM-Logo-0.01/src/easel -fno-strict-aliasing -pipe
-fstack-protector -I/usr/local/include -D_LARGEFILE_SOURCE
-D_FILE_OFFSET_BITS=64
-O2 -DVERSION=\"0.01\" -DXS_VERSION=\"0.01\" -fPIC
"-I/opt/lib/perl5/5.12.2/x86_64-linux/CORE" Logo.c

When I run it using version 0.50 it fails and I get a slightly different
cc line:

cc -c -I"/opt/src/Bio-HMM-Logo-0.01"
"-I/opt/src/Bio-HMM-Logo-0.01/src/src
-I/opt/src/Bio-HMM-Logo-0.01/src/easel" -fno-strict-aliasing -pipe
-fstack-protector -I/usr/local/include -D_LARGEFILE_SOURCE
-D_FILE_OFFSET_BITS
=64 -O2 -DVERSION=\"0.01\" -DXS_VERSION=\"0.01\" -fPIC
"-I/opt/lib/perl5/5.12.3/x86_64-linux/CORE" Logo.c

I looked into the source and it looks like the quote_space subroutine
(C.pm line 84) is quoting the entire INC
line("-I/opt/src/Bio-HMM-Logo-0.01/src/src
-I/opt/src/Bio-HMM-Logo-0.01/src/easel") if I have more than one path.

Any help fixing this in future versions would be greatly appreciated.

Thanks,

Jody



Sisyphus via RT

unread,
Oct 6, 2012, 10:47:55 PM10/6/12
to inl...@perl.org
Sat Oct 06 22:47:54 2012: Request 80026 was acted upon.
Transaction: Correspondence added by SISYPHUS
Queue: Inline
Subject: LIB is being in correctly quoted when using more than one lib path
Broken in: 0.48, 0.48_01, 0.48_02, 0.49, 0.49_01, 0.49_02, 0.50, 0.50_01, 0.50_02
Severity: Important
Owner: Nobody
Requestors: JCLE...@cpan.org
Status: open
Ticket <URL: https://rt.cpan.org/Ticket/Display.html?id=80026 >


On Sat Oct 06 07:15:20 2012, m...@jodyclements.com wrote:

> > I guess quote_space() needs to be able to distinguish between
> (insane)
> > spaces that are part of a directory name, and (sane) spaces that act
> as
> > a path separator ... but I haven't yet looked closely at this.
> >
>
> I totally understand your pain. If I can think of a way to fix it I
> will get back to you. Thanks for the response.

I think I've worked out what ought to be done.
It's really quite idiotic to expect Inline (on a File System that
supports white space in directory names) to know just what is intended
by '-I/foo -I/bar'.
On the face of it, there's nothing to tell us whether that second '-I'
is intended as a switch, or whether it's part of the directory name !!

All we could really do is test:
-d '/foo -I/bar';

If that returns "false" then we assume that '-I/foo -I/bar' was what was
meant.
But if the test returned "true" then it probably meant '"-I/foo -I/bar"'
... but I think I'll just have Inline die with an appropriate error
message (and serves the dickhead right for creating a directory named
'/foo -I/').

Of course, this needs to be extended to cater for any number of '-I'
occurrences.
For something like '-I/foo -I/bar -I/baz -I/fu -I/ba' I'd have Inline
die if any of '/foo -I/', '/bar -I/', '/baz -I/' or '/fu -I/'
directories exist. Otherwise, assume that all of the spaces are
delimiters (which would always *normally* be the case, anyway).

It's just a matter of modifying quote_space() appropriately, and
including some tests to check that I've got it right (and to detect any
future breakage that might occur).

Hopefully I can get this completed (culminating in the release of 0.51)
over the coming week.

Cheers,
Rob

Sisyphus via RT

unread,
Oct 5, 2012, 9:56:11 PM10/5/12
to inl...@perl.org
Fri Oct 05 21:56:10 2012: Request 80026 was acted upon.
Transaction: Correspondence added by SISYPHUS
Queue: Inline
Subject: LIB is being in correctly quoted when using more than one lib path
Broken in: 0.48, 0.48_01, 0.48_02, 0.49, 0.49_01, 0.49_02, 0.50, 0.50_01, 0.50_02
Severity: Important
Owner: Nobody
Requestors: JCLE...@cpan.org
Status: new
Ticket <URL: https://rt.cpan.org/Ticket/Display.html?id=80026 >


On Fri Oct 05 11:23:15 2012, JCLEMENTS wrote:

> I looked into the source and it looks like the quote_space subroutine
> (C.pm line 84) is quoting the entire INC
> line("-I/opt/src/Bio-HMM-Logo-0.01/src/src
> -I/opt/src/Bio-HMM-Logo-0.01/src/easel") if I have more than one path.

Thanks for the report, Jody.
I take it that if, in line 84, you replace "quote_space($value)" with
"$value", then everything is ok with 0.50 ?

The point of quote_space() was to (help) accommodate those who want to
put things in directories whose names contain white space (eg C:/Program
Files/).
It's a very poor situation, indeed, that in trying to accommodate insane
(and irritating) behaviour, a completely sane practice has been broken -
and I'll release a new version of Inline once I decide how to fix this.

I guess quote_space() needs to be able to distinguish between (insane)
spaces that are part of a directory name, and (sane) spaces that act as
a path separator ... but I haven't yet looked closely at this.

Cheers,
Rob

Jody Clements via RT

unread,
Oct 6, 2012, 7:15:38 AM10/6/12
to inl...@perl.org
Sat Oct 06 07:15:20 2012: Request 80026 was acted upon.
Transaction: Correspondence added by m...@jodyclements.com
Queue: Inline
Subject: Re: [rt.cpan.org #80026] LIB is being in correctly quoted when using more than one lib path
Broken in: 0.48, 0.48_01, 0.48_02, 0.49, 0.49_01, 0.49_02, 0.50, 0.50_01, 0.50_02
Severity: Important
Owner: Nobody
Requestors: JCLE...@cpan.org
Status: open
Ticket <URL: https://rt.cpan.org/Ticket/Display.html?id=80026 >



On Oct 5, 2012, at 21:56, "Sisyphus via RT" <bug-I...@rt.cpan.org> wrote:

> <URL: https://rt.cpan.org/Ticket/Display.html?id=80026 >
>
> On Fri Oct 05 11:23:15 2012, JCLEMENTS wrote:
>
>> I looked into the source and it looks like the quote_space subroutine
>> (C.pm line 84) is quoting the entire INC
>> line("-I/opt/src/Bio-HMM-Logo-0.01/src/src
>> -I/opt/src/Bio-HMM-Logo-0.01/src/easel") if I have more than one path.
>
> Thanks for the report, Jody.
> I take it that if, in line 84, you replace "quote_space($value)" with
> "$value", then everything is ok with 0.50 ?

That is correct.

>
> The point of quote_space() was to (help) accommodate those who want to
> put things in directories whose names contain white space (eg C:/Program
> Files/).
> It's a very poor situation, indeed, that in trying to accommodate insane
> (and irritating) behaviour, a completely sane practice has been broken -
> and I'll release a new version of Inline once I decide how to fix this.
>
> I guess quote_space() needs to be able to distinguish between (insane)
> spaces that are part of a directory name, and (sane) spaces that act as
> a path separator ... but I haven't yet looked closely at this.
>

I totally understand your pain. If I can think of a way to fix it I will get back to you. Thanks for the response.

Regards,

Jody


Jody Clements via RT

unread,
Oct 7, 2012, 11:39:08 AM10/7/12
to inl...@perl.org
Sun Oct 07 11:39:06 2012: Request 80026 was acted upon.
Transaction: Correspondence added by JCLEMENTS
Queue: Inline
Subject: LIB is being in correctly quoted when using more than one lib path
Broken in: 0.48, 0.48_01, 0.48_02, 0.49, 0.49_01, 0.49_02, 0.50, 0.50_01, 0.50_02
Severity: Important
Owner: Nobody
Requestors: JCLE...@cpan.org
Status: open
Ticket <URL: https://rt.cpan.org/Ticket/Display.html?id=80026 >


That sounds like a more elegant solution than anything I could come up
with. Thanks for getting this fixed so quickly.

Regards,

J.



Sisyphus via RT

unread,
Oct 9, 2012, 12:37:16 AM10/9/12
to inl...@perl.org
Tue Oct 09 00:37:15 2012: Request 80026 was acted upon.
Transaction: Correspondence added by SISYPHUS
Queue: Inline
Subject: LIB is being in correctly quoted when using more than one lib path
Broken in: 0.48, 0.48_01, 0.48_02, 0.49, 0.49_01, 0.49_02, 0.50, 0.50_01, 0.50_02
Severity: Important
Owner: Nobody
Requestors: JCLE...@cpan.org
Status: open
Ticket <URL: https://rt.cpan.org/Ticket/Display.html?id=80026 >


On Sun Oct 07 11:39:06 2012, JCLEMENTS wrote:
> Thanks for getting this fixed so quickly.

Well, the main thing is that it doesn't break things for those who don't
have whitespace in their directory names .... just how well it works for
those who *do* have whitespace in their directory names is not of great
importance to me, personally. (I don't really see why they can't do the
quoting themselves.)

Anyway, as of Inline-0.50_03, which has just been uploaded to cpan, the
quote_space() subroutine should now be doing the right thing pretty much
across the board, afaik.
If the INC config arg contains any tabs or doublequotes, then
quote_space() won't alter it in any way - which will cause problems if
that arg contains some whitespace that needs to be quoted. (This is the
only shortcoming I'm aware of at the moment ... someone who cares about
it can fix that aspect.)

If no problems with Inline-0.50_03 become evident in the next few days,
then it will be released as Inline-0.51 on the evening of Sat 13 Oct
(Australian time).

Cheers,
Rob

Sisyphus via RT

unread,
Oct 17, 2012, 5:37:32 AM10/17/12
to inl...@perl.org
Wed Oct 17 05:37:31 2012: Request 80026 was acted upon.
Transaction: Correspondence added by SISYPHUS
Queue: Inline
Subject: LIB is being in correctly quoted when using more than one lib path
Broken in: 0.48, 0.48_01, 0.48_02, 0.49, 0.49_01, 0.49_02, 0.50, 0.50_01, 0.50_02
Severity: Important
Owner: Nobody
Requestors: JCLE...@cpan.org
Status: open
Ticket <URL: https://rt.cpan.org/Ticket/Display.html?id=80026 >


Should now be fixed in 0.51 (released to CPAN a few days ago).

Thanks for reporting.

Cheers,
Rob
0 new messages