Closed Bug 776704 Opened 12 years ago Closed 12 years ago

Default shell build for Windows is broken on zlib.h

Categories

(Core :: JavaScript Engine, defect)

x86_64
Windows 7
defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla17

People

(Reporter: dmandelin, Assigned: dmandelin)

References

Details

(Whiteboard: [js:p1:fx17])

Attachments

(2 files)

I get this for a standard Windows build.

d:/sources/mozilla-inbound/js/src/jsutil.cpp(26) : fatal error C1083: Cannot open include file: 'zlib.h': No such file or directory

Ideally we can always build the shell using the normal instructions without having to add any other libraries. That may not end up being exactly the best thing to here--needs some thought--but being able to build on Windows without compression seems like it might be the thing to do.
Assignee: general → nobody
Component: JavaScript Engine → Build Config
This is more of a JS problem, since it means something would need being disabled.
Assignee: nobody → general
Component: Build Config → JavaScript Engine
Mike, this gets the JS engine to work on Windows. But can you help me with the build system? Right now configure.in just has a MOZ_ZLIB_CHECK, which is opaque to me. I thinkwhat we need is to make it so that on Windows shell builds only, we don't try to use zlib, and somehow know that we're doing this in the source files. I used a #define, assuming that we might set some variable in a configuration .h file, but I don't know if that's really the right thing to do.
How about
ifdef MOZ_ZLIB_LIBS
DEFINES += -DUSE_ZLIB
endif

in js/src/Makefile.in? The MOZ_ZLIB_LIBS variable should always contain something when zlib is enabled, and be empty when it's not.
(In reply to Mike Hommey [:glandium] from comment #3)
> How about
> ifdef MOZ_ZLIB_LIBS
> DEFINES += -DUSE_ZLIB
> endif
> 
> in js/src/Makefile.in? The MOZ_ZLIB_LIBS variable should always contain
> something when zlib is enabled, and be empty when it's not.

Ah, perfect. Thanks! Now I just need to test on non-windows.
Attachment #646400 - Flags: review?(bpeterson)
Whiteboard: [js:p1] → [js:p1:fx17]
Comment on attachment 646400 [details] [diff] [review]
Patch v2, use define

Review of attachment 646400 [details] [diff] [review]:
-----------------------------------------------------------------

::: js/src/jsutil.cpp
@@ +22,5 @@
>  
>  #include "js/TemplateLib.h"
>  #include "js/Utility.h"
>  
> +// XXX

What's this for?
Attachment #646400 - Flags: review?(bpeterson) → review+
(In reply to Benjamin Peterson from comment #6)
> Comment on attachment 646400 [details] [diff] [review]
> Patch v2, use define
> 
> Review of attachment 646400 [details] [diff] [review]:
> -----------------------------------------------------------------
> 
> ::: js/src/jsutil.cpp
> @@ +22,5 @@
> >  
> >  #include "js/TemplateLib.h"
> >  #include "js/Utility.h"
> >  
> > +// XXX
> 
> What's this for?

Just random markers left over. Thanks for catching it!

http://hg.mozilla.org/integration/mozilla-inbound/rev/7a7d4f374bab
Target Milestone: --- → mozilla17
Assignee: general → dmandelin
https://hg.mozilla.org/mozilla-central/rev/7a7d4f374bab
Status: NEW → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
Depends on: 778560
Blocks: 1039197
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: