On Fri, Jan 8, 2010 at 6:36 PM, Dr. David Kirkby
<[email protected]> wrote:
> I've noticed a really annoying thing with the script testcxx.sh which was is
> marked as closed/fixed and so should be in 4.3.1
>
> For a reason I can't work out, this spits out an extra space character only
> with  Sun Studio on Solaris.
>
> Set up the environment variables
> drkir...@hawk:~/sage-4.3.1.alpha1$ export CC=/opt/sunstudio12.1/bin/cc
> drkir...@hawk:~/sage-4.3.1.alpha1$ export CXX=/opt/sunstudio12.1/bin/CC
> drkir...@hawk:~/sage-4.3.1.alpha1$ local/bin/testcc.sh $CC
> Sun_Studio
> drkir...@hawk:~/sage-4.3.1.alpha1$ local/bin/testcxx.sh $CXX
> Sun_Studio
> drkir...@hawk:~/sage-4.3.1.alpha1$
>
>
> The last two outputs look identical, but in fact there is an extra space
>
>
> drkir...@hawk:~/sage-4.3.1.alpha1$ local/bin/testcxx.sh $CXX > a
> drkir...@hawk:~/sage-4.3.1.alpha1$ local/bin/testcc.sh $CC > b
> drkir...@hawk:~/sage-4.3.1.alpha1$ diff a b
> 1c1
> < Sun_Studio
> ---
>> Sun_Studio
>
> Looking with 'od' I can see the problem.
>
> The testcxx.sh script that tested the C++ compiler has an extra space.
>
> drkir...@hawk:~/sage-4.3.1.alpha1$ od -t uc a
> 0000000      1601074515      1685419091      0169897833
>           S   u   n   _   S   t   u   d   i   o      \n
> 0000014
>
>
> drkir...@hawk:~/sage-4.3.1.alpha1$ od -t uc b
> 0000000      1601074515      1685419091      0000683881
>           S   u   n   _   S   t   u   d   i   o  \n
> 0000013
>
>
> Looking at the script, I can't work out why this space should be there. But
> it is pretty easy to fix by changing a line in the script from
>
> ${CC_LOCAL} -E $TESTFILE | grep '^[A-Z]'
> to
> ${CC_LOCAL} -E $TESTFILE | grep '^[A-Z]' | sed 's/ //g'
>
> which strips out any spaces.
>
> Is it best to create a new ticket for this? It would be ideal if the
> corrected version could go in 4.3.1, but its not the end of the world if it
> does not. The version on the ticket will not cause any problems.

I think it would be best to create a new ticket.  Otherwise it could
be very confusing for the release manager, etc.

William
-- 
To post to this group, send an email to [email protected]
To unsubscribe from this group, send an email to 
[email protected]
For more options, visit this group at http://groups.google.com/group/sage-devel
URL: http://www.sagemath.org

Reply via email to