Dependency Graph

Dependency Graph
related to related to child of child of duplicate of duplicate of

View Issue Details

IDProjectCategoryView StatusLast Update
0001615SOGoSOPEpublic2012-10-25 18:15
Reporterdekkers Assigned Towsourdeau 
PrioritynormalSeverityminorReproducibilityalways
Status resolvedResolutionfixed 
Product Version1.3.11 
Fixed in Version2.0.2 
Summary0001615: Correctly link libraries that are used and don't link unused libraries
Description

SOPE and SOGo doesn't link libraries correctly: Libraries that are used aren't linked and some unused libraries are linked. This results in that the shared objects don't have the correct dependencies and that can give a lot of problems. An example is that SOGo doesn't build anymore when SOPE is changed to use GnuTLS: SOGo uses OpenSSL but doesn't link to it directly, the only reason it works is because another dependency (SOPE) does link to OpenSSL. When applying the linking patches to SOGo and SOPE my GnuTLS can also be applied without any problem. Something else that I found out is that xmlrpc was actually linked but not used by any code at all, so that doesn't have to build anymore/can be removed from SOPE if we only want code used by SOGo.

This also gets rid of lots of dpkg-shlibdeps warnings when building debian packages.

TagsNo tags attached.

Relationships

related to 0001616 resolvedwsourdeau Correctly link libraries that are used and don't link unused libraries 

Activities

2012-02-06 20:45

 

0004-link-everything-correctly.patch (10,052 bytes)   
From: Jeroen Dekkers <jeroen@dekkers.ch>
Date: Mon, 5 Dec 2011 19:35:34 +0100
Subject: link-everything-correctly

---
 sope-appserver/NGObjWeb/GNUmakefile.preamble     |   18 ++++--------------
 sope-appserver/WEExtensions/GNUmakefile.preamble |   10 ++++------
 sope-appserver/WOExtensions/GNUmakefile.preamble |   11 +++--------
 sope-core/EOControl/GNUmakefile.preamble         |    2 +-
 sope-core/NGExtensions/GNUmakefile.preamble      |    4 ++--
 sope-core/NGStreams/GNUmakefile.preamble         |    4 +---
 sope-gdl1/GDLAccess/GNUmakefile.preamble         |    2 +-
 sope-gdl1/MySQL/GNUmakefile.preamble             |    1 -
 sope-ldap/NGLdap/GNUmakefile.preamble            |    2 +-
 sope-mime/GNUmakefile.preamble                   |    2 +-
 sope-xml/DOM/GNUmakefile.preamble                |    2 +-
 sope-xml/SaxObjC/GNUmakefile.preamble            |    2 ++
 sope-xml/XmlRpc/GNUmakefile.preamble             |    2 +-
 13 files changed, 22 insertions(+), 40 deletions(-)

diff --git a/sope-appserver/NGObjWeb/GNUmakefile.preamble b/sope-appserver/NGObjWeb/GNUmakefile.preamble
index ef5d9cc..c954d1b 100644
--- a/sope-appserver/NGObjWeb/GNUmakefile.preamble
+++ b/sope-appserver/NGObjWeb/GNUmakefile.preamble
@@ -38,7 +38,6 @@ DEP_DIRS = \
 	$(SOPE_ROOT)/sope-core/NGExtensions	\
 	$(SOPE_ROOT)/sope-core/EOControl	\
 	$(SOPE_ROOT)/sope-xml/DOM		\
-	$(SOPE_ROOT)/sope-xml/XmlRpc		\
 	$(SOPE_ROOT)/sope-xml/SaxObjC
 
 ifneq ($(frameworks),yes)
@@ -53,12 +52,12 @@ endif
 # dependencies
 
 ifneq ($(frameworks),yes)
-sope-xml-libs  = -lXmlRpc -lDOM -lSaxObjC
+sope-xml-libs  = -lDOM -lSaxObjC
 sope-core-libs = -lNGStreams -lNGExtensions -lEOControl
 sope-mime-libs = -lNGMime
 sope-ngobjweb-libs = -lNGObjWeb
 else
-sope-xml-libs  = -framework XmlRpc -framework DOM -framework SaxObjC
+sope-xml-libs  = -framework DOM -framework SaxObjC
 sope-core-libs = \
   -framework NGStreams -framework NGExtensions -framework EOControl
 sope-mime-libs = -framework NGMime -framework NGMail
@@ -68,7 +67,8 @@ endif
 libNGObjWeb_LIBRARIES_DEPEND_UPON += \
 	$(sope-mime-libs) \
 	$(sope-core-libs) \
-	$(sope-xml-libs)
+	$(sope-xml-libs) \
+	-lgnustep-base -lobjc
 NGObjWeb_LIBRARIES_DEPEND_UPON += \
 	$(sope-mime-libs) \
 	$(sope-core-libs)\
@@ -90,16 +90,6 @@ SoCore_BUNDLE_LIBS += \
 	$(sope-xml-libs)
 
 
-# platform specific settings
-
-ifneq ($(findstring openbsd, $(GNUSTEP_TARGET_OS)), openbsd)
-# OpenBSD does not require libcrypt
-ifneq ($(findstring darwin, $(GNUSTEP_TARGET_OS)), darwin)
-# and neither does MacOSX? ...
-libNGObjWeb_LIBRARIES_DEPEND_UPON += -lcrypt
-endif
-endif
-
 # Apple
 
 ifeq ($(FOUNDATION_LIB),apple)
diff --git a/sope-appserver/WEExtensions/GNUmakefile.preamble b/sope-appserver/WEExtensions/GNUmakefile.preamble
index e781eac..cb7e685 100644
--- a/sope-appserver/WEExtensions/GNUmakefile.preamble
+++ b/sope-appserver/WEExtensions/GNUmakefile.preamble
@@ -41,16 +41,15 @@ endif
 
 libWEExtensions_LIBRARIES_DEPEND_UPON += \
 	-lNGObjWeb	\
-	-lNGMime	\
-	-lNGStreams -lNGExtensions -lEOControl \
-	-lXmlRpc -lDOM -lSaxObjC
+	-lNGExtensions -lEOControl \
+	-lgnustep-base -lobjc -lm
 
 ifeq ($(frameworks),yes)
 WEExtensions_LIBRARIES_DEPEND_UPON += \
 	-framework NGObjWeb	\
 	-framework NGMime -framework NGMail \
 	-framework NGStreams -framework NGExtensions -framework EOControl \
-	-framework XmlRpc -framework DOM -framework SaxObjC
+	-framework DOM -framework SaxObjC
 endif
 
 
@@ -64,7 +63,6 @@ DEP_DIRS = \
 	$(SOPE_ROOT)/sope-core/NGExtensions	\
 	$(SOPE_ROOT)/sope-core/EOControl	\
 	$(SOPE_ROOT)/sope-xml/DOM		\
-	$(SOPE_ROOT)/sope-xml/XmlRpc		\
 	$(SOPE_ROOT)/sope-xml/SaxObjC
 
 ifneq ($(frameworks),yes)
@@ -92,7 +90,7 @@ WEExtensions_BUNDLE_LIBS   += \
 	-lNGObjWeb	\
 	-lNGMime	\
 	-lNGStreams -lNGExtensions -lEOControl \
-	-lXmlRpc -lDOM -lSaxObjC
+	-lDOM -lSaxObjC
 WEExtensions_WOBUNDLE_LIBS += $(WEExtensions_BUNDLE_LIBS)
 
 ifneq ($(GNUSTEP_BUILD_DIR),)
diff --git a/sope-appserver/WOExtensions/GNUmakefile.preamble b/sope-appserver/WOExtensions/GNUmakefile.preamble
index 04c2714..6c2376d 100644
--- a/sope-appserver/WOExtensions/GNUmakefile.preamble
+++ b/sope-appserver/WOExtensions/GNUmakefile.preamble
@@ -20,11 +20,8 @@ libWOExtensions_VERSION=$(MAJOR_VERSION).$(MINOR_VERSION).$(SUBMINOR_VERSION)
 # dependencies
 
 libWOExtensions_LIBRARIES_DEPEND_UPON += \
-	-lWEExtensions	\
 	-lNGObjWeb	\
-	-lNGMime	\
-	-lNGStreams -lNGExtensions -lEOControl \
-	-lXmlRpc -lDOM -lSaxObjC
+	-lgnustep-base -lobjc
 
 ifeq ($(frameworks),yes)
 WOExtensions_LIBRARIES_DEPEND_UPON += \
@@ -32,7 +29,7 @@ WOExtensions_LIBRARIES_DEPEND_UPON += \
 	-framework NGObjWeb	\
 	-framework NGMime -framework NGMail \
 	-framework NGStreams -framework NGExtensions -framework EOControl \
-	-framework XmlRpc -framework DOM -framework SaxObjC
+	-framework DOM -framework SaxObjC
 endif
 
 
@@ -48,7 +45,6 @@ DEP_DIRS = \
 	$(SOPE_ROOT)/sope-core/NGExtensions	\
 	$(SOPE_ROOT)/sope-core/EOControl	\
 	$(SOPE_ROOT)/sope-xml/DOM		\
-	$(SOPE_ROOT)/sope-xml/XmlRpc		\
 	$(SOPE_ROOT)/sope-xml/SaxObjC
 
 ifneq ($(frameworks),yes)
@@ -72,11 +68,10 @@ endif
 ifneq ($(frameworks),yes)
 
 WOExtensions_BUNDLE_LIBS += \
-	-lWOExtensions -lWEExtensions \
 	-lNGObjWeb	\
 	-lNGMime	\
 	-lNGStreams -lNGExtensions -lEOControl \
-	-lXmlRpc -lDOM -lSaxObjC
+	-lDOM -lSaxObjC
 WOExtensions_WOBUNDLE_LIBS += $(WOExtensions_BUNDLE_LIBS)
 
 endif
diff --git a/sope-core/EOControl/GNUmakefile.preamble b/sope-core/EOControl/GNUmakefile.preamble
index 5a4c19d..76bc30a 100644
--- a/sope-core/EOControl/GNUmakefile.preamble
+++ b/sope-core/EOControl/GNUmakefile.preamble
@@ -17,7 +17,7 @@ libEOControl_LIBRARIES_DEPEND_UPON += -lFoundation
 endif
 
 ifeq ($(FOUNDATION_LIB),gnu)
-libEOControl_LIBRARIES_DEPEND_UPON += -lgnustep-base
+libEOControl_LIBRARIES_DEPEND_UPON += -lgnustep-base -lobjc -lm
 endif
 
 # Apple
diff --git a/sope-core/NGExtensions/GNUmakefile.preamble b/sope-core/NGExtensions/GNUmakefile.preamble
index 998376c..39a3e90 100644
--- a/sope-core/NGExtensions/GNUmakefile.preamble
+++ b/sope-core/NGExtensions/GNUmakefile.preamble
@@ -22,9 +22,9 @@ endif
 # dependencies
 
 libNGExtensions_LIBRARIES_DEPEND_UPON += \
-	-lEOControl -lDOM -lSaxObjC \
+	-lEOControl -lDOM \
 	-lobjc \
-	-lz
+	-lz -lgnustep-base -lm
 
 NGExtensions_LIBRARIES_DEPEND_UPON += \
 	-framework EOControl \
diff --git a/sope-core/NGStreams/GNUmakefile.preamble b/sope-core/NGStreams/GNUmakefile.preamble
index 46ff501..aff9fad 100644
--- a/sope-core/NGStreams/GNUmakefile.preamble
+++ b/sope-core/NGStreams/GNUmakefile.preamble
@@ -10,9 +10,7 @@ NGStreams_INCLUDE_DIRS += $(libNGStreams_INCLUDE_DIRS)
 # dependencies
 
 libNGStreams_LIBRARIES_DEPEND_UPON += \
-	-lNGExtensions -lEOControl	\
-	-lDOM -lSaxObjC			\
-	-lz
+	-lz -lgnustep-base -lobjc
 NGStreams_LIBRARIES_DEPEND_UPON += \
 	-framework NGExtensions -framework EOControl	\
 	-framework DOM -framework SaxObjC		\
diff --git a/sope-gdl1/GDLAccess/GNUmakefile.preamble b/sope-gdl1/GDLAccess/GNUmakefile.preamble
index bfa5143..afe4bf9 100644
--- a/sope-gdl1/GDLAccess/GNUmakefile.preamble
+++ b/sope-gdl1/GDLAccess/GNUmakefile.preamble
@@ -29,7 +29,7 @@ endif
 
 # dependencies
 
-libGDLAccess_LIBRARIES_DEPEND_UPON += -lEOControl
+libGDLAccess_LIBRARIES_DEPEND_UPON += -lEOControl -lgnustep-base -lobjc
 GDLAccess_LIBRARIES_DEPEND_UPON    += -framework EOControl
 
 ifneq ($(frameworks),yes)
diff --git a/sope-gdl1/MySQL/GNUmakefile.preamble b/sope-gdl1/MySQL/GNUmakefile.preamble
index 1d44fa3..a0c2005 100644
--- a/sope-gdl1/MySQL/GNUmakefile.preamble
+++ b/sope-gdl1/MySQL/GNUmakefile.preamble
@@ -33,7 +33,6 @@ endif
 
 MySQL_BUNDLE_LIBS += \
 	-lGDLAccess	\
-	-lEOControl	\
 	`mysql_config --libs`
 
 MySQLD_BUNDLE_LIBS += \
diff --git a/sope-ldap/NGLdap/GNUmakefile.preamble b/sope-ldap/NGLdap/GNUmakefile.preamble
index 950e3e5..05103b2 100644
--- a/sope-ldap/NGLdap/GNUmakefile.preamble
+++ b/sope-ldap/NGLdap/GNUmakefile.preamble
@@ -15,7 +15,7 @@ ADDITIONAL_CPPFLAGS += -Wall -Wno-protocol
 
 libNGLdap_LIBRARIES_DEPEND_UPON += \
 	-lNGExtensions -lEOControl	\
-	-lDOM -lSaxObjC
+	-lgnustep-base -lobjc
 NGLdap_LIBRARIES_DEPEND_UPON += \
 	-framework NGExtensions -framework EOControl	\
 	-framework DOM -framework SaxObjC
diff --git a/sope-mime/GNUmakefile.preamble b/sope-mime/GNUmakefile.preamble
index 3d6ec70..839d8ec 100644
--- a/sope-mime/GNUmakefile.preamble
+++ b/sope-mime/GNUmakefile.preamble
@@ -19,7 +19,7 @@ libNGMime_INCLUDE_DIRS += \
 
 libNGMime_LIBRARIES_DEPEND_UPON += \
 	-lNGStreams -lNGExtensions -lEOControl	\
-	-lDOM -lSaxObjC
+	-lgnustep-base -lobjc
 
 NGMime_LIBRARIES_DEPEND_UPON += \
 	-framework NGStreams -framework NGExtensions -framework EOControl \
diff --git a/sope-xml/DOM/GNUmakefile.preamble b/sope-xml/DOM/GNUmakefile.preamble
index 1087787..1d59173 100644
--- a/sope-xml/DOM/GNUmakefile.preamble
+++ b/sope-xml/DOM/GNUmakefile.preamble
@@ -33,7 +33,7 @@ ADDITIONAL_CPPFLAGS += \
 ADDITIONAL_INCLUDE_DIRS += -I.. -I../..
 
 
-libDOM_LIBRARIES_DEPEND_UPON += -lSaxObjC
+libDOM_LIBRARIES_DEPEND_UPON += -lSaxObjC -lgnustep-base -lobjc
 
 ifneq ($(GNUSTEP_BUILD_DIR),)
 libDOM_LIB_DIRS += -L$(GNUSTEP_BUILD_DIR)/../SaxObjC/$(GNUSTEP_OBJ_DIR_NAME)
diff --git a/sope-xml/SaxObjC/GNUmakefile.preamble b/sope-xml/SaxObjC/GNUmakefile.preamble
index b97eab9..bff95d1 100644
--- a/sope-xml/SaxObjC/GNUmakefile.preamble
+++ b/sope-xml/SaxObjC/GNUmakefile.preamble
@@ -77,3 +77,5 @@ endif
 ifeq ($(GNUSTEP_TARGET_OS),cygwin32)
 libSaxObjC_LIBRARIES_DEPEND_UPON += -lobjc
 endif
+
+libSaxObjC_LIBRARIES_DEPEND_UPON += -lgnustep-base -lobjc
diff --git a/sope-xml/XmlRpc/GNUmakefile.preamble b/sope-xml/XmlRpc/GNUmakefile.preamble
index 9f47f46..3b15d5c 100644
--- a/sope-xml/XmlRpc/GNUmakefile.preamble
+++ b/sope-xml/XmlRpc/GNUmakefile.preamble
@@ -27,7 +27,7 @@ XmlRpc_HEADER_FILES = $(libXmlRpc_HEADER_FILES)
 XmlRpc_OBJC_FILES   = $(libXmlRpc_OBJC_FILES)
 
 
-libXmlRpc_LIBRARIES_DEPEND_UPON += -lSaxObjC -lDOM
+libXmlRpc_LIBRARIES_DEPEND_UPON += -lSaxObjC -lgnustep-base -lobjc
 
 ifneq ($(GNUSTEP_BUILD_DIR),)
 libXmlRpc_LIB_DIRS += \
-- 
Christian Mack

Christian Mack

2012-02-07 10:29

developer   ~0003378

See also Bug 0001616

buzzdee

buzzdee

2012-02-09 07:08

reporter   ~0003408

Its not only SOGo, but also OpenGroupware that relies on this SOPE.

wsourdeau

wsourdeau

2012-04-04 15:41

viewer   ~0003685

Please note that some dependencies are actually runtime dependencies. Meaning that the symbols are used via the objective-C runtime and that dependency trackers have no way to know that they are, hence the complaints. We link the relevant libraries then to avoid having to load them via dlopen, which I think is acceptable. One such library is libOGoContentStore.

Issue History

Date Modified Username Field Change
2012-02-06 20:45 dekkers New Issue
2012-02-06 20:45 dekkers File Added: 0004-link-everything-correctly.patch
2012-02-07 10:29 Christian Mack Note Added: 0003378
2012-02-09 07:08 buzzdee Note Added: 0003408
2012-02-09 08:04 Christian Mack Relationship added related to 0001616
2012-04-04 15:41 wsourdeau Note Added: 0003685
2012-10-25 18:15 wsourdeau Status new => resolved
2012-10-25 18:15 wsourdeau Fixed in Version => 2.0.2
2012-10-25 18:15 wsourdeau Resolution open => fixed
2012-10-25 18:15 wsourdeau Assigned To => wsourdeau