Closed Bug 177486 Opened 22 years ago Closed 22 years ago

configure script should check for minimum Sun compiler version

Categories

(SeaMonkey :: Build Config, enhancement, P3)

Sun
Solaris
enhancement

Tracking

(Not tracked)

RESOLVED FIXED
mozilla1.5alpha

People

(Reporter: duvall, Assigned: netscape)

References

Details

Attachments

(3 files, 1 obsolete file)

This is a followup to bug 177141. During a compile, when configure runs, it should check to make sure that the version of the Forte compilers being used is at the minimum level (currently 6.2), and abort with an error message asking the user to upgrade if the compilers are older. This probably could be extended to other compilers as well, but this is the one *I* ran into, so hey ... :)
Priority: -- → P3
Summary: configure script should check for minimum compiler version → configure script should check for minimum Sun compiler version
Target Milestone: --- → mozilla1.3alpha
Attached patch v1.0 (obsolete) — Splinter Review
Target Milestone: mozilla1.3alpha → mozilla1.4beta
Attachment #118884 - Flags: review?(Roland.Mainz)
Attachment #118884 - Flags: review?(Roland.Mainz) → review?(mozilla)
Comment on attachment 118884 [details] [diff] [review] v1.0 Trying the patch with Sun Workshop 7 (official name is "Sun Forte 7") does not work: -- snip -- AWK=nawk ; CC_VERSION=`$CC -V 2>&1 | grep Sun 2>/dev/null | $AWK -F\: '{ print $2 }'` ; CXX_VERSION=`$ CXX -V 2>&1 | grep Sun 2>/dev/null | $AWK -F\: '{ print $2 }'` ; _MAJOR_VERSION_NUMBER=`echo $CC_VERSION | sed 's|^Sun WorkShop||' | $AWK '{ print $1 }'` ; /bin/echo "CC_VERSION=$CC_VERSION\nCXX_VERSION=$CXX_VERSION\n_MAJOR_VERSION_NUMBER=$_MAJO R_VERSION_NUMBER" CC_VERSION= CXX_VERSION= _MAJOR_VERSION_NUMBER= -- snip -- cc/CC version output for Sun Forte 7 looks like this: -- snip -- % cc -V cc: Forte Developer 7 C 5.4 2002/03/09 usage: cc [ options] files. Use 'cc -flags' for details % CC -V CC: Forte Developer 7 C++ 5.4 Patch 111715-05 2003/02/09 -- snip --
Attachment #118884 - Flags: review?(mozilla) → review-
Did I ever mention how Sun's compiler team needs a boot to the head? Irregular version output and they change the name between releases. Joy oh joy.
Attached patch v1.1Splinter Review
Attachment #118884 - Attachment is obsolete: true
Christopher Seawood wrote: > Did I ever mention how Sun's compiler team needs a boot to the head? > Irregular version output and they change the name between releases. Please beat Sun marketing droids first. They renamed "Sun Workshop" to "Sun Forte" and then to "Sun ONE" ; poor compiler folks at Sun just has to implement their ******** inventions... ;-(
Comment on attachment 119154 [details] [diff] [review] v1.1 r=roland.mainz@informatik.med.uni-giessen.de The patch should work with Workshop/Forte 7 (and hopefully with Workshop/Forte 8 and >= 6.2, too, but I don't have these compilers installed and can't test that here...) ...
Attachment #119154 - Flags: review+
Checked in.
Status: NEW → RESOLVED
Closed: 22 years ago
Resolution: --- → FIXED
The trunk has been broken since this was checked in. First, the carets aren't quoted so configure fails (see the nebiros logs): diff -u -3 -p -u -r1.1207 configure.in --- configure.in 4 Apr 2003 21:14:34 -0000 1.1207 +++ configure.in 5 Apr 2003 03:08:22 -0000 @@ -1394,8 +1394,8 @@ dnl the qsort routine under solaris is f AS='/usr/ccs/bin/as' ASFLAGS="$ASFLAGS -K PIC -L -P -D_ASM -D__STDC__=0" AS_DASH_C_FLAG='' - CC_VERSION=`$CC -V 2>&1 | grep ^cc: 2>/dev/null | $AWK -F\: '{ print $2 }'` - CXX_VERSION=`$CXX -V 2>&1 | grep ^CC: 2>/dev/null | $AWK -F\: '{ print $2 }'` + CC_VERSION=`$CC -V 2>&1 | grep '^cc:' 2>/dev/null | $AWK -F\: '{ print $2 }'` + CXX_VERSION=`$CXX -V 2>&1 | grep '^CC:' 2>/dev/null | $AWK -F\: '{ prin t $2 }'` _MAJOR_VERSION_NUMBER=`echo $CC_VERSION | $AWK '{ print $3 }'` _BAD_COMPILER= Next, the version fields aren't stable and this fails with the next Workshop where it gets "C" (language name) instead of the compiler version.
Greg Onufer wrote: > The trunk has been broken since this was checked in. First, the carets aren't > quoted so configure fails (see the nebiros logs): Ahhhhgrrlll... my fault... ;-( > diff -u -3 -p -u -r1.1207 configure.in > --- configure.in 4 Apr 2003 21:14:34 -0000 1.1207 > +++ configure.in 5 Apr 2003 03:08:22 -0000 > @@ -1394,8 +1394,8 @@ dnl the qsort routine under solaris is f > AS='/usr/ccs/bin/as' > ASFLAGS="$ASFLAGS -K PIC -L -P -D_ASM -D__STDC__=0" > AS_DASH_C_FLAG='' > - CC_VERSION=`$CC -V 2>&1 | grep ^cc: 2>/dev/null | $AWK -F\: '{ print > $2 > }'` > - CXX_VERSION=`$CXX -V 2>&1 | grep ^CC: 2>/dev/null | $AWK -F\: '{ > print $2 }'` > + CC_VERSION=`$CC -V 2>&1 | grep '^cc:' 2>/dev/null | $AWK -F\: '{ > print $2 }'` > + CXX_VERSION=`$CXX -V 2>&1 | grep '^CC:' 2>/dev/null | $AWK -F\: '{ > print $2 }'` > _MAJOR_VERSION_NUMBER=`echo $CC_VERSION | $AWK '{ print $3 }'` > _BAD_COMPILER= Sounds reasonable... > Next, the version fields aren't stable and this fails with the next Workshop > where it gets "C" (language name) instead of the compiler version. What do you suggest what we should do instead ? Anything lower than Sun Workshop 6 Update 2 can't compile Mozilla properly and if we do not add such a check the people won't stop filing bugs for their broken compilers... ;-(
Attached patch bustage fixSplinter Review
For the record I checked this in, in an attempt to fix nebiros bustage. Its lets my tree build with F6U2 again and should hopefully clear up the red for now.
Harshal Pradhan wrote: > For the record I checked this in, in an attempt to fix nebiros bustage. Its > lets my tree build with F6U2 again and should hopefully clear up the red for > now. Thanks for rescuing me... :)
Alternate solution for the compiler version check may be to create a small application, compile it with the compiler and let it check the compiler version that way. The quiz is which values are used for __SUNPRO_CC in Sun Workshop 6 Update 2 and lower... ;-/
The actual token is __SUNPRO_C (not CC), and here are some test values: Sun Workshop 4.2: 0x420 Sun Workshop 5.0: 0x500 Sun Workshop 6.1: 0x520 Sun Workshop 6.2: 0x530 Forte Developer 7: 0x540 SunONE Studio 8: 0x550 Also looks like the output of cc -V for all these compiler versions include the string "C <version>" in the first line of output, where 5.3 corresponds to Workshop 6 update 2. Not sure which method is easier, but at least __SUNPRO_C is a documented macro, and is more likely to remain useful across compiler versions than the obviously ever-changing version output.
Um, that is, if you use the C compiler. __SUNPRO_CC *is* the right token for C++, and it produces the same numbers as __SUNPRO_C does for the C compiler.
this version checking is totally wrong. FYI: my cc -V said cc: Sun WorkShop 6 update 2 C 5.3 2001/05/15 "Sun WorkShop 6 update 2" is the compiler name, not the version, "5.3" is. For the next version compiler (internal called K2), cc -V output: cc: Sun C 5.5 2003/03/09 "5.5" is the version number. (same thing with the CC -V) So this checkin will break the build for Sun's new compiler. BTW, __SUNPRO_C/__SUNPRO_CC does work for both F6U2 & K2.
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
Attached patch v2.0Splinter Review
Untested patch to change the version test to use __SUNPRO_C.
Comment on attachment 122773 [details] [diff] [review] v2.0 cls, the configure doesn't work for me. I don't know why, but the following piece of code does work with both WS6U2 & K2. (I copied them from the configure you sent to me) int main() { #if (__SUNPRO_C < 0x530) #error "Denied" #endif ; return 0; }
Attachment #122773 - Flags: review?(Roland.Mainz)
Comment on attachment 122773 [details] [diff] [review] v2.0 review- per Kyle Yuan's comment #17 ... I have to check that in detail (each time I touch the build system tinderboxen get a red angry face, so I'd like to be carefully now... ;-/ )
Attachment #122773 - Flags: review?(Roland.Mainz) → review-
Roland, the review request was so that you could check the patch in detail (ie, test it). Kyle can't run autoconf 2.13 and I have no idea why the generated configure I sent him doesn't work on his box.
sorry, I was in a hurry to test this patch before. Now I'd like to find out why it doesn't work.
Comment on attachment 122773 [details] [diff] [review] v2.0 I've installed autoconf 2.13 on my solaris box and found out that some missing brackets break this patch. After I corrected that, it works with both WS6U2 & K2. r=kyle with below changed: >+ AC_MSG_CHECKING([for Forte compiler version >= WS6U2] missed a ')' at the end of line >+ AC_MSG_RESULT[$_res]) missed a '(' before |[$res])|
Attachment #122773 - Flags: review- → review+
Kyle, thanks for catching my oversights. The modified patch has been checked in.
Status: REOPENED → RESOLVED
Closed: 22 years ago22 years ago
Resolution: --- → FIXED
Target Milestone: mozilla1.4beta → mozilla1.5alpha
*** Bug 212199 has been marked as a duplicate of this bug. ***
*** Bug 216562 has been marked as a duplicate of this bug. ***
Comment on attachment 122773 [details] [diff] [review] v2.0 nominate for 1.4.x.
Attachment #122773 - Flags: approval1.4.x?
Comment on attachment 122773 [details] [diff] [review] v2.0 This is not going to make 1.4.1. Please re-request aproval after 1.4.1 ships if you'd like to get this in for 1.4.2.
Attachment #122773 - Flags: approval1.4.x? → approval1.4.x-
Product: Browser → Seamonkey
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: