Closed Bug 300913 Opened 19 years ago Closed 19 years ago

MSVC tools version number detection is broken for non-English MSVC

Categories

(Firefox Build System :: General, defect)

x86
Windows XP
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: ma1, Assigned: ma1)

References

Details

(Keywords: fixed1.8)

Attachments

(2 files, 6 obsolete files)

If I try to compile the tree using an Italian MSVC, build process fails because MSVC version number recognition routines expect the "Version" word to be found in the tool (compiler/linker/...) output. This is a wrong assumption for non-English versions ofg MSVC tools: Italian ones, for instance, spit out "Versione <Maj>.<Min>.<Build>", and I don't dare to imagine what a Russian output looks like. In short, version detection should be language independent. I'm going to attach a patch immediately.
Status: NEW → ASSIGNED
I've replaced the grep and sed regular expressions looking for the language-dependent hardcoded "Version" string with other patterns looking for the <maj>.<min>.<build> version number pattern on which the configure script already depends.
Attachment #189422 - Flags: review?(benjamin)
Attachment #189422 - Flags: review?(cls)
Comment on attachment 189422 [details] [diff] [review] MSVC tools version detection done searching for language-independent numeric pattern That works but the regexes could be a bit less confusing. Try 's|.* \([0-9]\+\.[0-9]\+\.[0-9]\+\).*|\1|'
Attachment #189422 - Flags: review?(cls) → review-
Attached patch Simplified sed regexp (obsolete) — Splinter Review
V2 with more readable regexp (see comment #2)
Attachment #189422 - Attachment is obsolete: true
Attachment #190575 - Flags: review?(cls)
Comment on attachment 190575 [details] [diff] [review] Simplified sed regexp Unless there's a good reason to use a different regex for grep, they should be the same. r=cls with regexes the same (either way)
Attachment #190575 - Flags: review?(cls) → review+
Attached patch Same regexp for grep and sed (obsolete) — Splinter Review
Attachment #190575 - Attachment is obsolete: true
Attachment #190603 - Flags: review?(cls)
Attachment #190603 - Flags: approval1.8b4?
Attachment #190603 - Flags: review?(cls) → review+
Attachment #190603 - Flags: approval1.8b4? → approval1.8b4+
Attachment #189422 - Flags: review?(benjamin)
Status: ASSIGNED → RESOLVED
Closed: 19 years ago
Resolution: --- → FIXED
Well, apparently nobody (including reviewers & myself) realized that autoconf was unescaping this section when building configure from configure.in (while *every* other section containing grep or sed regexp was kept untouched). Here is the correct patch for branch landing, diffed from MOZILLA_1_8_BRANCH and escaped as timeless did to extinguish the trunk on fire tonight (http://tinderbox.mozilla.org/bonsai/cvsview2.cgi?diff_mode=context&whitespace_mode=show&root=/cvsroot&subdir=mozilla&command=DIFF_FRAMESET&root=/cvsroot&file=configure.in&rev1=1.1505&rev2=1.1506)
Attachment #190603 - Attachment is obsolete: true
Neither my sed nor grep accept anyhing more than basic regexps i.e. . ? and * Would anyone object to me changing the \+s to *s? I'd also like to point out that since the regexps are now the same you can use | sed -n -e 's| ... |\1|p' avoiding the grep.
Since changing the \+s to \*s will change the meaning of the expression, I would object. What sed & grep are you using?
(In reply to comment #8) >Since changing the \+s to \*s will change the meaning of the expression, >I would object. OK, so how about [[0-9]][[0-9]]* >What sed & grep are you using? grep version 1.0 for SFU 3.5 (no sed version appears to be listed)
(In reply to comment #9) > (In reply to comment #8) > >Since changing the \+s to \*s will change the meaning of the expression, > >I would object. > OK, so how about [[0-9]][[0-9]]* LOL, this was my first patch for this bug... https://bugzilla.mozilla.org/attachment.cgi?id=189422 I used that verbose syntax because I was XP concerned and I had read somewhere the "+" quantifier being not part of "basic regular expression" as originally conceived. I didn't know if grep or sed version which didn't support it actually were in the wild, though, hence I accepted Chris Seawood criticisms trusting his widsom ;) > >What sed & grep are you using? > grep version 1.0 for SFU 3.5 (no sed version appears to be listed) Final compatible patch following in minutes...
Modularized regexp, to avoid too much hassle if someone decides to change it again...
Attachment #192821 - Attachment is obsolete: true
Attachment #192927 - Flags: review?(cls)
diff from trunk to undo previous checkin
Attachment #192928 - Flags: review?(cls)
Comment on attachment 192928 [details] [diff] [review] autoconf esc. + compat. regexp (trunk) Fine, fine. Note that I actually did approve the use of the *s regex earlier (see comment #4). The more complicated sed regex from the original patch had to go though. As long as we're not bending over backwards for a non-standard build setup that we don't officially support, I'm fine with the change.
Attachment #192928 - Flags: review?(cls) → review+
Attachment #192927 - Flags: review?(cls) → review+
- unset $_MSVC_VER_FILTER + unset _MSVC_VER_FILTER
Attachment #192928 - Attachment is obsolete: true
Attachment #192930 - Flags: review?(cls)
Really sorry for the bugspam, but this abusive "$" just slipped out from my finger tips :(
Attachment #192927 - Attachment is obsolete: true
Attachment #192931 - Flags: review?(cls)
Attachment #192930 - Flags: review?(cls) → review+
Attachment #192931 - Flags: review?(cls) → review+
Attachment #192931 - Flags: superreview?(benjamin)
Attachment #192931 - Flags: approval1.8b4?
Attachment #192931 - Flags: superreview?(benjamin) → superreview+
Attachment #192931 - Flags: approval1.8b4? → approval1.8b4+
Giorgio, do you need these checked in now?
(In reply to comment #16) > Giorgio, do you need these checked in now? Yes, thanks - maybe time to apply for a CVS account ;)
Comment on attachment 192930 [details] [diff] [review] autoconf esc. + compat. regexp (trunk) I checked this in on the trunk but I can't get my autoconf-2.13 to work so you'll need someone else to do the branch.
(In reply to comment #18) >I can't get my autoconf-2.13 to work Fortunately cltbld's autoconf works ;-)
Keywords: fixed1.8
(In reply to comment #19) > (In reply to comment #18) > >I can't get my autoconf-2.13 to work > Fortunately cltbld's autoconf works ;-) Yeah, I fixed cltbld's autoconf check-in to work on the Mozilla 1.8 branch yesterday. Let me know if you see any weirdness.
*** Bug 284571 has been marked as a duplicate of this bug. ***
Product: Core → Firefox Build System
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: