--with-system-zlib version detection broken after bug 781446

RESOLVED FIXED in Thunderbird 19.0

Status

Thunderbird
Build Config
RESOLVED FIXED
5 years ago
5 years ago

People

(Reporter: gaston, Assigned: gaston)

Tracking

unspecified
Thunderbird 19.0
x86
OpenBSD

Thunderbird Tracking Flags

(thunderbird17 fixed, thunderbird18 fixed)

Details

Attachments

(1 attachment, 1 obsolete attachment)

(Assignee)

Description

5 years ago
After http://hg.mozilla.org/comm-central/rev/00c391e2f48c (now in tb 17.0b1), build with --system-zlib fails to correctly detect the version.

$grep VERNUM /usr/include/zlib.h                                                     
#define ZLIB_VERNUM 0x1230

MOZZLIB is also 0x1230.

the MOZZLIBNUM check does 
$echo 0x1230 | awk -F. '{printf "0x%x\n", ((($1 * 16 + $2) * 16) + $3) * 16 + $4}'
0x1230000

which fails the configure test - if the version is MOZZLIB=1.2.3, the test succeeds

$echo 1.2.3 | awk -F. '{printf "0x%x\n", ((($1 * 16 + $2) * 16) + $3) * 16 + $4}'  
0x1230

So, either MOZZLIB should be fixed in configure.in (like it was in mozilla/configure.in for a short period of time) or bug #763651 should be ported (since it adds a MOZ_ZLIB_CHECK macro)

So, which way should it be fixed (in c-c, c-a, c-b) ?
Use the MOZ_ZLIB_CHECK macro. You can include m-c's m4 directly.
(Assignee)

Comment 2

5 years ago
Created attachment 673546 [details] [diff] [review]
use MOZ_ZLIB_CHECK (port part of #763651)

First shot, seems to correctly set the MOZ_ZLIB vars after configuring with and without --system-zlib set. I'm not 100% fluent with the configure maze, so i didnt take all parts of the mozilla bug, this probably needs more love.
Assignee: nobody → landry
Attachment #673546 - Flags: review?(mbanner)
Attachment #673546 - Flags: feedback?(mh+mozilla)
Comment on attachment 673546 [details] [diff] [review]
use MOZ_ZLIB_CHECK (port part of #763651)

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

::: configure.in
@@ +3966,5 @@
> +    MOZ_ZLIB_LIBS='$(call EXPAND_LIBNAME_PATH,mozz,$(DEPTH)/mozilla/modules/zlib/src)'
> +fi
> +
> +if test "$MOZ_LINKER" = 1 -a "$MOZ_NATIVE_ZLIB" != 1; then
> +    AC_MSG_ERROR([Custom dynamic linker requires --with-system-zlib])

You don't need this part.
Attachment #673546 - Flags: feedback?(mh+mozilla) → feedback+
(Assignee)

Comment 4

5 years ago
What about this m-c part at the bottom of configure.in then ? wasnt sure if it was needed for c-c either ir it was just for the link js to zlib part :

if test "$MOZ_NATIVE_ZLIB" != 1 -a "$OS_ARCH" = "WINNT"; then
   MOZ_ZLIB_LIBS=
fi
export MOZ_NATIVE_ZLIB
export MOZ_ZLIB_CFLAGS
export MOZ_ZLIB_LIBS
(In reply to Landry Breuil (:gaston) from comment #4)
> What about this m-c part at the bottom of configure.in then ? wasnt sure if
> it was needed for c-c either ir it was just for the link js to zlib part :
> 
> if test "$MOZ_NATIVE_ZLIB" != 1 -a "$OS_ARCH" = "WINNT"; then
>    MOZ_ZLIB_LIBS=
> fi
> export MOZ_NATIVE_ZLIB
> export MOZ_ZLIB_CFLAGS
> export MOZ_ZLIB_LIBS

Yeah, you don't need that.
(Assignee)

Comment 6

5 years ago
Created attachment 673561 [details] [diff] [review]
use MOZ_ZLIB_CHECK (port part of #763651)

So let's port only the needed parts. i'll see if the same patch applies to aurora/beta or if MOZZLIB needs to be fixed there instead, as id like to get it fixed in next betas..
Attachment #673561 - Flags: review?(mbanner)
Attachment #673546 - Attachment is obsolete: true
Attachment #673546 - Flags: review?(mbanner)
Attachment #673561 - Flags: review?(mbanner) → review+
(Assignee)

Comment 7

5 years ago
https://hg.mozilla.org/comm-central/rev/9d72569694f7
Status: NEW → RESOLVED
Last Resolved: 5 years ago
Resolution: --- → FIXED
(Assignee)

Comment 8

5 years ago
Comment on attachment 673561 [details] [diff] [review]
use MOZ_ZLIB_CHECK (port part of #763651)

Nominating for aurora/beta, since they're affected too (the beta patch doesnt apply as-is but i have it locally)
[Approval Request Comment]
Regression caused by (bug #): Bug 781446 
User impact if declined: failure to build with --with-system-zlib
Testing completed (on c-c, etc.): in progress
Risk to taking this patch (and alternatives if risky): none
Attachment #673561 - Flags: approval-comm-beta?
Attachment #673561 - Flags: approval-comm-aurora?
Comment on attachment 673561 [details] [diff] [review]
use MOZ_ZLIB_CHECK (port part of #763651)

Yep, I think we can port this safely. a=me.
Attachment #673561 - Flags: approval-comm-beta?
Attachment #673561 - Flags: approval-comm-beta+
Attachment #673561 - Flags: approval-comm-aurora?
Attachment #673561 - Flags: approval-comm-aurora+
https://hg.mozilla.org/releases/comm-aurora/rev/6f55d3140a2d
https://hg.mozilla.org/releases/comm-beta/rev/86cf289595ef
status-thunderbird17: --- → fixed
status-thunderbird18: --- → fixed
Target Milestone: --- → Thunderbird 19.0
You need to log in before you can comment on or make changes to this bug.