The default bug view has changed. See this FAQ.

Default shell build for Windows is broken on zlib.h

RESOLVED FIXED in mozilla17

Status

()

Core
JavaScript Engine
RESOLVED FIXED
5 years ago
3 years ago

People

(Reporter: dmandelin, Assigned: dmandelin)

Tracking

unspecified
mozilla17
x86_64
Windows 7
Points:
---
Dependency tree / graph

Firefox Tracking Flags

(Not tracked)

Details

(Whiteboard: [js:p1:fx17])

Attachments

(2 attachments)

(Assignee)

Description

5 years ago
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.

Updated

5 years ago
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
(Assignee)

Comment 2

5 years ago
Created attachment 645949 [details] [diff] [review]
Patch, except for build changes

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.
(Assignee)

Comment 4

5 years ago
(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.
(Assignee)

Comment 5

5 years ago
Created attachment 646400 [details] [diff] [review]
Patch v2, use define
(Assignee)

Updated

5 years ago
Attachment #646400 - Flags: review?(bpeterson)
Whiteboard: [js:p1] → [js:p1:fx17]

Comment 6

5 years ago
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+
(Assignee)

Comment 7

5 years ago
(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)

Updated

5 years ago
Assignee: general → dmandelin
https://hg.mozilla.org/mozilla-central/rev/7a7d4f374bab
Status: NEW → RESOLVED
Last Resolved: 5 years ago
Resolution: --- → FIXED

Updated

5 years ago
Depends on: 778560
Blocks: 1039197
You need to log in before you can comment on or make changes to this bug.