changeset 785:1d651946e889

simplified linking to openssl in package qt We have been building Qt with "-openssl-linked". A patch was needed to adjust OPENSSL_LIBS to keep a shared Qt build from failing at the point where QtNetwork4.dll is linked. The patch is not needed if we use "-openssl" instead. Because libssl and its dependencies are static libraries in mingw-cross-env, a simple "-openssl" also causes libssl and dependencies to be embedded (imported) into QNetwork4.dll, but it does so without requiring the patch. Details: The patch solved a problem that is a feature of a specific recipe of Qt build ingredients: (1) -shared (2) -openssl-linked (3) -qt-zlib in an environment were: (4) openssl is static (5) “system” zlib is static At least 1-3 are needed to see the problem. I suspect that 4 and 5 are needed as well. What I think I understand: “-shared” means that QtNetwork4.dll will be built, which is the locus of the problem. “-openssl-linked” means that libssl and its dependencies are to be embedded in QtNetwork4.dll. OPENSSL_LIBS supplies the list of dependencies. “-qt-zlib” means that QtCore4 contains a zlib implementation. Given this recipe for QtNetwork4.dll, the zlib implementation of “-lz” conflicts with the zlib implementation of “-lQtCore4”. The patch removed "-lz" from OPENSSL_LIBS and replaced it with "-lQtCore" in the same position. Adding "-lQtCore" in this way is not a robust solution. For example, it will break a debug build.
author Mark Brand <mabrand@mabrand.nl>
date Wed, 17 Feb 2010 16:56:48 +0100
parents f73ec86ea1e1
children d3d9a4a2843d
files src/qt-win32.patch src/qt.mk
diffstat 2 files changed, 1 insertions(+), 17 deletions(-) [+]
line wrap: on
line diff
--- a/src/qt-win32.patch	Sat Feb 20 04:45:09 2010 +0100
+++ b/src/qt-win32.patch	Wed Feb 17 16:56:48 2010 +0100
@@ -547,22 +547,6 @@
 +    unix|win32-g++:LIBS_PRIVATE += -lz
 +    win32:!win32-g++:LIBS += zdll.lib
  }
-diff --git a/src/network/ssl/ssl.pri b/src/network/ssl/ssl.pri
-index 72ea80f..899aa30 100644
---- a/src/network/ssl/ssl.pri
-+++ b/src/network/ssl/ssl.pri
-@@ -35,5 +35,11 @@ symbian {
-     RESOURCES += network.qrc
- 
-     # Add optional SSL libs
-+    !contains(QT_CONFIG, system-zlib):contains(OPENSSL_LIBS, -lz) {
-+        # Use the zlib in QtCore
-+        OPENSSL_LIBS -= -lz
-+        OPENSSL_LIBS += -lQtCore4
-+    }
-     LIBS_PRIVATE += $$OPENSSL_LIBS
-+
- }
 diff --git a/src/plugins/imageformats/jpeg/jpeg.pro b/src/plugins/imageformats/jpeg/jpeg.pro
 index ebc79cc..30a19c6 100644
 --- a/src/plugins/imageformats/jpeg/jpeg.pro
--- a/src/qt.mk	Sat Feb 20 04:45:09 2010 +0100
+++ b/src/qt.mk	Wed Feb 17 16:56:48 2010 +0100
@@ -128,7 +128,7 @@
         -system-libmng \
         -system-sqlite \
         -qt-gif \
-        -openssl-linked \
+        -openssl \
         -v
 
     $(MAKE) -C '$(1)' -j '$(JOBS)'