Closed Bug 1026858 Opened 6 years ago Closed 4 years ago

search for "stdio.h" exactly

Categories

(Firefox Build System :: General, defect)

33 Branch
x86_64
Windows 8.1
defect
Not set

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: c, Unassigned)

References

Details

Attachments

(1 file, 1 obsolete file)

1.25 KB, patch
mshal
: review+
Details | Diff | Splinter Review
Attached file regex (obsolete) —
User Agent: Mozilla/5.0 (Windows NT 6.3; WOW64; rv:33.0) Gecko/20100101 Firefox/33.0 (Beta/Release)
Build ID: 20140610030202

Steps to reproduce:

when trying out the vc14, I ran into Unable to parse cl -showIncludes prefix. This compiler's locale has an unsupported formatting.
Comment on attachment 8441822 [details]
regex

>diff --git a/configure.in b/configure.in
>--- a/configure.in
>+++ b/configure.in
>@@ -7958,7 +7958,7 @@ else
>     echo '#include <stdio.h>' > dummy-hello.c
>     changequote(,)
>     dnl This output is localized, split at the first double space or colon and space.
>-    _CL_PREFIX_REGEX="^\([^:]*:.*[ :] \)\(.*stdio.h\)$"
>+    _CL_PREFIX_REGEX="^\([^:]*:.*[ :] \)\(.*\\\stdio.h\)$"
>     CL_INCLUDES_PREFIX=`${CC} -showIncludes -c -Fonul dummy-hello.c 2>&1 | sed -ne 's/'"$_CL_PREFIX_REGEX"'/\1/p'`
>     _CL_STDIO_PATH=`${CC} -showIncludes -c -Fonul dummy-hello.c 2>&1 | sed -ne 's/'"$_CL_PREFIX_REGEX"'/\2/p'`
>     changequote([,])
>diff --git a/js/src/configure.in b/js/src/configure.in
>--- a/js/src/configure.in
>+++ b/js/src/configure.in
>@@ -3720,7 +3720,7 @@ else
>     echo '#include <stdio.h>' > dummy-hello.c
>     changequote(,)
>     dnl This output is localized, split at the first double space or colon and space.
>-    _CL_PREFIX_REGEX="^\([^:]*:.*[ :] \)\(.*stdio.h\)$"
>+    _CL_PREFIX_REGEX="^\([^:]*:.*[ :] \)\(.\\\*stdio.h\)$"
>     CL_INCLUDES_PREFIX=`${CC} -showIncludes -c -Fonul dummy-hello.c 2>&1 | sed -ne 's/'"$_CL_PREFIX_REGEX"'/\1/p'`
>     _CL_STDIO_PATH=`${CC} -showIncludes -c -Fonul dummy-hello.c 2>&1 | sed -ne 's/'"$_CL_PREFIX_REGEX"'/\2/p'`
>     changequote([,])
Attachment #8441822 - Flags: review?(mshal)
Comment on attachment 8441822 [details]
regex

Unfortunately this breaks existing Windows builds, so we'll need a different solution here. What is the output of showIncludes when you run it manually? Eg:

echo '#include <stdio.h>' > dummy-hello.c
cl -showIncludes -c -Fonul dummy-hello.c
Attachment #8441822 - Flags: review?(mshal) → review-
Attached patch regexSplinter Review
I made a stupid mistake in last one.
With vc14, it has two matches without the patch.
Attachment #8441822 - Attachment is obsolete: true
Ahh, that seems to work better. So 'cl -showIncludes' it showing another filename with 'stdio.h' in the string for you? (The actual output would help me here).

Are you sure the 3 backslashes are necessary instead of just 2?
(In reply to Michael Shal [:mshal] (no reviews until 6/30) from comment #4)
> Ahh, that seems to work better. So 'cl -showIncludes' it showing another
> filename with 'stdio.h' in the string for you? (The actual output would help
> me here).
> 
> Are you sure the 3 backslashes are necessary instead of just 2?

See bug1020117. Actually I'm not quiet sure, but at least it works, so I think it's right.
(In reply to zhoubcfan from comment #5)
> See bug1020117. Actually I'm not quiet sure, but at least it works, so I
> think it's right.

Ahh, I see. When I was testing just on the command-line, two backslashes seemed to behave the same as three. In configure.in, it looks like it's necessary.
Attachment #8442505 - Flags: review+
Attachment #8442505 - Flags: checkin?
Attachment #8442505 - Flags: checkin? → checkin+
https://hg.mozilla.org/integration/mozilla-inbound/rev/ac067ab7fd61

Thanks for the patch! A couple requests, though. First off, please just use the checkin-needed bug keyword when your patch is ready to land (instead of setting checkin? on the attachment) - it works better with our bug marking tools. Also, please ensure that your patches contain commit information per the guidelines below. Makes our lives much easier when landing your patches :). Thanks!
https://developer.mozilla.org/en-US/docs/Mercurial_FAQ#How_can_I_generate_a_patch_for_somebody_else_to_check-in_for_me.3F
Status: UNCONFIRMED → RESOLVED
Closed: 4 years ago
Resolution: --- → FIXED
Duplicate of this bug: 1020117
Product: Core → Firefox Build System
You need to log in before you can comment on or make changes to this bug.