zlib should be linked explicit, at least when specifying a custom one

RESOLVED INVALID

Status

()

Core
Build Config
RESOLVED INVALID
12 years ago
12 years ago

People

(Reporter: ause, Unassigned)

Tracking

Trunk
x86
Linux
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

(Reporter)

Description

12 years ago
User-Agent:       Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.13) Gecko/20060411
Build Identifier: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.13) Gecko/20060411

a couple of binaries is linking zlib implicit, thus ignoring the settings of --with-system-zlib=<some-path>

Reproducible: Always

Steps to Reproduce:
1.use --with-system-zlib=<some_path> with configure or .mozconfig
2.place a zlib there where you will notice a difference (a damaged one should do for testing purpose ;))
3.

Actual Results:  
this lib is ignored in several places (e.g. mozilla/toolkit/mozapps/update/src/updater/Makefile.in)

Expected Results:  
link that zlib (or fail in the given example)
(Reporter)

Comment 1

12 years ago
Created attachment 222516 [details] [diff] [review]
add zlib to link line

Updated

12 years ago
Attachment #222516 - Attachment is patch: true
(Reporter)

Updated

12 years ago
Attachment #222516 - Flags: review?(mscott)

Comment 2

12 years ago
Comment on attachment 222516 [details] [diff] [review]
add zlib to link line

I'm not the right person to review this build config change. I'd suggest starting with bsmedberg.

Also this bug isn't related to Thunderbird, I'd suggest moving it to Mozilla Build Config.

Thanks for the patch!
Attachment #222516 - Flags: review?(mscott)
(Reporter)

Updated

12 years ago
Attachment #222516 - Flags: review?(benjamin)
(Reporter)

Comment 3

12 years ago
moving as suggested
Component: Build Config → Build Config
Flags: review?(benjamin)
Product: Thunderbird → Mozilla Application Suite
-> Core
Component: Build Config → Build Config
Product: Mozilla Application Suite → Core
Version: unspecified → Trunk
Assignee: mscott → nobody
QA Contact: build → build-config
Attachment #222516 - Flags: review?(benjamin)

Updated

12 years ago
Status: UNCONFIRMED → NEW
Ever confirmed: true

Comment 5

12 years ago
Comment on attachment 222516 [details] [diff] [review]
add zlib to link line

Why does embedding/browser/gtk/tests need to link explicitly against zlib? That doesn't sound right to me.
(Reporter)

Comment 6

12 years ago
looks like in embedding/browser/gtk/tests libz.so comes in by libpng12.so and libfontconfig.so.
but no matter who pulls it in, "--with-system-zlib=some_path" simply gets ignore on linking when linking zlib implicit.
i've no problem to tweak my environment using the right one ;). but offering this setting and ignore it afterwards doesn't sound right to me...

same goes for internal zlib functionality if i didn't get something wrong.

Comment 7

12 years ago
(In reply to comment #6)
> looks like in embedding/browser/gtk/tests libz.so comes in by libpng12.so and
> libfontconfig.so.
> but no matter who pulls it in, "--with-system-zlib=some_path" simply gets
> ignore on linking when linking zlib implicit.

--with-system-zlib=path should only affect mozilla's explicit linkage of zlib. When libpng/libfontconfig pick up zlib implicitly that's none of our business.
(Reporter)

Comment 8

12 years ago
i think it is when the build is breaking because of taking the system zlib instead of the specified one...

Comment 9

12 years ago
"not our problem"... if a non-standard zlib is in play, pkgconfig, LD_LIBRARY_PATH or your LDFLAGS are going to have to make sure that everything is consistent.
(Reporter)

Comment 10

12 years ago
LD_LIBRARY_PATH won't help much on link time and implicit linked libraries are  looked up ignoring the "-L" switches passed to the linker.
there might be other ways to tweak the linker but linking implicit makes it harder without a reason visible to me.

Updated

12 years ago
Attachment #222516 - Flags: review?(benjamin) → review-

Comment 11

12 years ago
As I pointed out in bug 325758 comment 16, it is the builder's responsibility to make sure that the out-of-tree libraries being used have the correct dependencies.  The --with-system-zlib and other library options apply only to mozilla's explicit use of the library.

If libfontconfig & libpng are linked to the system version of zlib, instead of your special version, then you need to rebuild libfontconfig & libpng against the special version.
Status: NEW → RESOLVED
Last Resolved: 12 years ago
Resolution: --- → INVALID
You need to log in before you can comment on or make changes to this bug.