Closed Bug 998577 Opened 10 years ago Closed 9 years ago

Unable to compile js shells on Windows with /arch:SSE2 on MSVC2010

Categories

(Core :: JavaScript Engine, defect)

x86
Windows 7
defect
Not set
normal

Tracking

()

RESOLVED WORKSFORME

People

(Reporter: gkw, Assigned: djvj)

References

Details

(Whiteboard: [fuzzblocker])

Attachments

(1 file)

As part of the fix for bug 948321, I tried to compile js shell with /arch:SSE2 but failed. I ran:

CXX="cl /arch:SSE2" CC="cl /arch:SSE2" MAKE=mozmake AR=ar sh c:\\\\Users\\\\fuzz1win\\\\trees\\\\mozilla-central\\\\js\\\\src\\\\configure --enable-optimize --disable-debug --enable-profiling --enable-gczeal --enable-debug-symbols --disable-tests --enable-more-deterministic --enable-threadsafe --with-nspr-prefix=c:\\\\Users\\\\fuzz1win\\\\Desktop\\\\shell-cache\\\\js-opt-32-dm-ts-windows-45ba19361b97\\\\objdir-nspr-opt-45ba19361b97-sue488\\\\dist --with-nspr-cflags=-Ic:\\\\Users\\\\fuzz1win\\\\Desktop\\\\shell-cache\\\\js-opt-32-dm-ts-windows-45ba19361b97\\\\objdir-nspr-opt-45ba19361b97-sue488\\\\dist\\\\include\\\\nspr --with-nspr-libs=c:\\\\Users\\\\fuzz1win\\\\Desktop\\\\shell-cache\\\\js-opt-32-dm-ts-windows-45ba19361b97\\\\objdir-nspr-opt-45ba19361b97-sue488\\\\dist\\\\lib\\\\nspr4.lib c:\\\\Users\\\\fuzz1win\\\\Desktop\\\\shell-cache\\\\js-opt-32-dm-ts-windows-45ba19361b97\\\\objdir-nspr-opt-45ba19361b97-sue488\\\\dist\\\\lib\\\\plds4.lib c:\\\\Users\\\\fuzz1win\\\\Desktop\\\\shell-cache\\\\js-opt-32-dm-ts-windows-45ba19361b97\\\\objdir-nspr-opt-45ba19361b97-sue488\\\\dist\\\\lib\\\\plc4.lib

The build on m-c rev 45ba19361b97 works without the /arch:SSE2 flag, i.e. it works without defining CC or CXX. The build also fails if I try to define the CL environment variable instead.

The addition of these flags are as suggested in the following pages:

http://msdn.microsoft.com/en-us/library/7t5yh4fd%28v=vs.100%29.aspx
http://msdn.microsoft.com/en-us/library/kezkeayy%28v=vs.100%29.aspx

Is there any working way for us to add compiler flags?

Marking this [fuzzblocker] because this prevents us from blocking more false positives when running differential testing using compareJIT.
Flags: needinfo?(sphink)
I ran `mozmake VERBOSE=1 -C c:\\Users\\fuzz1win\\Desktop\\shell-cache\\js-opt-32-dm-ts-windows-45ba19361b97\\objdir-js-opt-45ba19361b97-bh_0oh -j1` to get this log.
This would help me fix bug 948321 too.
Waldo: Didn't you volunteer at the JS work week to fix Windows shell builds for Gary? Or should this bug go to Kannan now that he has a Windows PC?
Flags: needinfo?(jwalden+bmo)
I was volunteering to fix all the warnings in the build (including Windows warnings), as far as I remember.  But it's also been a couple months, so maybe I'm forgetting exactly what I said I'd do.  :-)

I really don't know much about the Windows build system/compiler flags, or (if we're talking about adding an SSE2 requirement to the Windows build) about what we can make for runtime requirements on Windows.  It'd be better for someone using Windows more regularly, and ideally someone with more knowledge about Windows and building on it, and about what we can require from user hardware, to work on this.  Kannan fits some but not all of that, which is more than I can say for myself (which is not to say he *should* be the one working on this, just that he'd be better than I would be).
Flags: needinfo?(jwalden+bmo)
Kannan: do you have time to fix this Windows build break of the js shell that is blocking gkw's Windows fuzzing?
Flags: needinfo?(sphink) → needinfo?(kvijayan)
I can take a look at it first thing Monday.  I had intended to use today to wrap up the dynamic verification hookups for the native => pc bytecode mapping code.
Flags: needinfo?(kvijayan)
(In reply to Kannan Vijayan [:djvj] from comment #6)
> I can take a look at it first thing Monday.  I had intended to use today to
> wrap up the dynamic verification hookups for the native => pc bytecode
> mapping code.

Thanks Kannan! Assigning to you as per this...
Assignee: nobody → kvijayan
Status: NEW → ASSIGNED
Ok got started on this and reproducing the build failure that I think is happening.

My build error is indicating that the include file "prcvar.h" in js/src/jslock.h, does not exist.  This seems related to --enable-threadsafe.

Gary, can you confirm that this is the build error you are seeing?
Flags: needinfo?(gary)
Sorry, getting back to this after lots of other build failure stuff recently. I'd say from the log in comment 0, my failure might be related to ICU:

===

rebuilding config/icucross.mk
rebuilding config/icucross.inc
cd ./config; \

	mozmake -f pkgdataMakefile

Makefile:305: recipe for target 'config/pkgdata.inc' failed

mozmake[4]: *** [config/pkgdata.inc] Error 5

mozmake[4]: Leaving directory 'c:/Users/fuzz1win/Desktop/shell-cache/js-opt-32-dm-ts-windows-45ba19361b97/objdir-js-opt-45ba19361b97-bh_0oh/intl/icu/target'

Makefile:77: recipe for target 'buildicu' failed

mozmake[3]: *** [buildicu] Error 2


===

However, you might want to retry building with --without-intl-api (or whatever the build flag is now) and --disable-threadsafe. If it works, then something in ICU/NSPR build stuff is broken, else, it's probably something else.
Flags: needinfo?(gary) → needinfo?(kvijayan)
Working on it.
Flags: needinfo?(kvijayan)
This is building cleanly for me on the revision.  My original build failure was due to not properly specifying nspr libs.

Now this is taken care of and everything builds, including --with-intl-api.

Are you using msvc2010 or msvc2012?  I'm building with 2010 on 32-bit windows with the options you presented in comment 0.
Flags: needinfo?(gary)
I just retested and yes, while it now builds, the testcase in bug 948321 still shows a difference in output when run with the different flags specified there.

Do you know how I can build a proper SSE2 binary? (I'm also using MSVC2010)
Flags: needinfo?(gary) → needinfo?(kvijayan)
Not off the top of my head.. but I can look into it.  Keeping the needinfo active to remind myself.
Closign this as worksforme, given follow-up comments on bug 948321.
Status: ASSIGNED → RESOLVED
Closed: 9 years ago
Flags: needinfo?(kvijayan)
Resolution: --- → WORKSFORME
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: