Closed Bug 803811 Opened 12 years ago Closed 12 years ago

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

Categories

(Thunderbird :: Build Config, defect)

x86
OpenBSD
defect
Not set
normal

Tracking

(thunderbird17 fixed, thunderbird18 fixed)

RESOLVED FIXED
Thunderbird 19.0
Tracking Status
thunderbird17 --- fixed
thunderbird18 --- fixed

People

(Reporter: gaston, Assigned: gaston)

Details

Attachments

(1 file, 1 obsolete file)

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.
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+
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.
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+
https://hg.mozilla.org/comm-central/rev/9d72569694f7
Status: NEW → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
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+
Target Milestone: --- → Thunderbird 19.0
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: