Skip Menu |
 

This queue is for tickets about the Inline CPAN distribution.

Report information
The Basics
Id: 80026
Status: resolved
Priority: 0/
Queue: Inline

People
Owner: Nobody in particular
Requestors: JCLEMENTS [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: Important
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
Fixed in: (no value)



Subject: LIB is being in correctly quoted when using more than one lib path
Download (untitled) / with headers
text/plain 1.5k
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
Download (untitled) / with headers
text/plain 1019b
On Fri Oct 05 11:23:15 2012, JCLEMENTS wrote: Show quoted text
> 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
Subject: Re: [rt.cpan.org #80026] LIB is being in correctly quoted when using more than one lib path
Date: Sat, 6 Oct 2012 07:15:06 -0400
To: "bug-Inline [...] rt.cpan.org" <bug-Inline [...] rt.cpan.org>
From: Jody Clements <me [...] jodyclements.com>
Download (untitled) / with headers
text/plain 1.3k
On Oct 5, 2012, at 21:56, "Sisyphus via RT" <bug-Inline@rt.cpan.org> wrote: Show quoted text
> <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. Show quoted text
> > 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
Download (untitled) / with headers
text/plain 1.6k
On Sat Oct 06 07:15:20 2012, me@jodyclements.com wrote: Show quoted text
> > 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
Download (untitled) / with headers
text/plain 1.5k
On Sat Oct 06 22:47:54 2012, SISYPHUS wrote: Show quoted text
> > 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
That sounds like a more elegant solution than anything I could come up with. Thanks for getting this fixed so quickly. Regards, J.
On Sun Oct 07 11:39:06 2012, JCLEMENTS wrote: Show quoted text
> 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
RT-Send-CC: me [...] jodyclements.com
Should now be fixed in 0.51 (released to CPAN a few days ago). Thanks for reporting. Cheers, Rob


This service is sponsored and maintained by Best Practical Solutions and runs on Perl.org infrastructure.

Please report any issues with rt.cpan.org to rt-cpan-admin@bestpractical.com.