Issue 33258 - Sun Workshop compiler version checking wrong
Summary: Sun Workshop compiler version checking wrong
Status: CLOSED FIXED
Alias: None
Product: Build Tools
Classification: Code
Component: configure (show other issues)
Version: current
Hardware: All All
: P2 Trivial (vote)
Target Milestone: OOo 2.0
Assignee: foskey
QA Contact: issues@tools
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-08-20 17:02 UTC by pavel
Modified: 2006-03-14 21:02 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Latest Confirmation in: ---
Developer Difficulty: ---


Attachments
Suggested fix (3.76 KB, patch)
2004-08-28 13:36 UTC, pavel
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this issue.
Description pavel 2004-08-20 17:02:16 UTC
Hi,

SRC680_m51 contains this:

      _workshop_string=`$CC -V 2>&1 | grep '^cc' | sed -e 's/.* C /`   

It should probably read

      _workshop_string=`$CC -V 2>&1 | grep '^cc' | sed -e 's/.* C //'`
Comment 1 pavel 2004-08-20 22:53:37 UTC
-> Ken.

set target
Comment 2 pavel 2004-08-22 08:01:20 UTC
The error message while configuring is:

checking the SUN Workshop C compiler version... ./configure: command
substitution: line 1: unexpected EOF while looking for matching `''
./configure: command substitution: line 2: syntax error: unexpected end of file
configure: error: found version "", use version 5.0 or 5.2 of the Sun Workshop C
compiler
Comment 3 pavel 2004-08-22 08:11:45 UTC
The problem was brought in by rt in 1.47, so I'll reassign to him to fix it on
the master:

Index: configure
===================================================================
RCS file: /cvs/tools/config_office/configure,v
retrieving revision 1.46
retrieving revision 1.47
diff -u -r1.46 -r1.47
--- configure   17 Jun 2004 11:59:34 -0000      1.46
+++ configure   13 Jul 2004 15:47:30 -0000      1.47
@@ -3307,10 +3307,8 @@
       COMPATH=`echo $_cc | $SED -n "s/\/cc//p"`
       echo "$as_me:$LINENO: checking the SUN Workshop C compiler version" >&5
 echo $ECHO_N "checking the SUN Workshop C compiler version... $ECHO_C" >&6
-            _workshop_version=`$CC -V 2>&1 | $AWK '/^cc/ { print $7 }'`
-      if test "$_workshop_version" = "C"; then
-         _workshop_version=`$CC -V 2>&1 | $AWK '/^cc/ { print $8 }'`
-      fi
+            _workshop_string=`$CC -V 2>&1 | grep '^cc' | sed -e 's/.* C /`
+      _workshop_version=`echo $_workshop_string | $AWK '{ print $1 }'`
       _workshop_major=`echo $_workshop_version | $AWK -F. '{ print $1 }'`
Comment 4 pavel 2004-08-22 08:18:09 UTC
rt: which compiler do you use now for Solaris builds? Is it 5.5? If it is so,
please add it to the list of minor number checked (only 5.0 and 5.2 are
supported now).

I'm now building with 5.5 too on my new machine.
Comment 5 rt 2004-08-23 15:09:39 UTC
Hi,

I checked in the change suggested here, but without knowing whether it's correct
or not.
Please not: revision 1.47 is just the result of integrating CWS ooo20040620.
Real authors of the change are, according to cvs, waratah (1.44.12.2:) and rene
(1.44.12.1). Integration of a CWS is a more or less automatic process, in most
cases I do not know anything about the code changes introduced.
Concerning you last question: we are using Sun C++ 5.5
Comment 6 pavel 2004-08-27 22:44:09 UTC
The same change is needed for configure.in.
Comment 7 pavel 2004-08-28 13:35:33 UTC
Hi,

attached file is suggectes fix I use right now.
Comment 8 pavel 2004-08-28 13:36:00 UTC
Created attachment 17397 [details]
Suggested fix
Comment 9 pavel 2004-08-30 20:26:45 UTC
Fixed on pj01.

waratah: please verify.
Comment 10 foskey 2004-08-31 13:12:39 UTC
Waratah puts hand up for silly error award.  Thanks Pavel.

I did request someone to actually test the change :-)
Comment 11 pavel 2004-09-08 16:54:22 UTC
Closing.