Hi,

Currently there are 3rdparty zlib sources in both qtbase and qtsvg 
repositories, and in addition building zlib dependent imageformat plugins (mng, 
tiff) are disabled in qtimageformats repo if platform does not have system zlib 
available.
Already now zlib sources in qtbase and qtsvg have diverged - and zlib in qtsvg 
does not build for Windows Embedded Compact 7 since required fixes are 
currently applied for zlib in qtbase. Initially I cherry-picked the required 
fixes to qtsvg repo as well (Patch-set 1 in [1]), but Friedemann had an idea 
that qtsvg should probably use exported zlib symbols from qtbase. Initial 
implementation for that is in patch set 6 of [1]. 

Now with that approach there was comment that "modules should not try to grab 
other modules' sources to be able to compile independently. Is it possible to 
declare the used functions as extern without using the headers?". Personally I 
think that extern just makes the dependency more hidden compared to direct 
include of needed header, but yes I agree that it is not ideal solution to 
depend on directly from another module sources. Also I don't quite see how this 
extern approach can work for defines, C structs and what it would actually 
solve. More information see my latest comment in [1].

So what would be the correct approach?
1. Duplicate zlib to needed repos and try to keep different instances in sync 
(Like done currently)
2. Use exported zlib symbols from QtBase and include needed zlib header from 
QtBase to QtBase repo.
3. Use zlib functions from QtBase as extern, like suggested by Friedemann in 
comments to my change? If that is doable...
4. Something else, for example move zlib to a new static library inside QtBase 
repo or even move it to a separate repo?
  
In short term I would like to go with approach 1 or 2. Something from approach 
4 is probably better in long term, but is it needed now? 
Has there been similar issues with other 3rparty modules in Qt5, and what is 
the way to go?

[1]  https://codereview.qt-project.org/23497 

Br,
-- 
Janne Anttila 
Architect, Qt Commercial R&D
Digia Plc
Elektronikkatie 10, FI - 90590 Oulu
E-mail: [email protected]
Tel. +358 (0) 10 313 3000 Mobile: +358 (0)40 8474106
------------------------------------------------------------------
PRIVACY AND CONFIDENTIALITY NOTICE
This message and any attachments are intended only for use by the named 
addressee and may contain privileged and/or confidential information. If you 
are not the named addressee you should not disseminate, copy or take any action 
in reliance on it. If you have received this message in error, please contact 
the sender immediately and delete the message and any attachments accompanying 
it. Digia Plc does not accept liability for any corruption, interception, 
amendment, tampering or viruses occurring to this message. 


_______________________________________________
Development mailing list
[email protected]
http://lists.qt-project.org/mailman/listinfo/development

Reply via email to