View Issue Details

IDProjectCategoryView StatusLast Update
0002235SOGoBackend Generalpublic2013-10-21 15:38
Reporterbuzzdee Assigned Toludovic  
PrioritynormalSeveritymajorReproducibilityalways
Status closedResolutionfixed 
Product Version2.0.4b 
Target Versionmaybe sometimesFixed in Version2.1.0 
Summary0002235: SOGo compilation fails with clang 3.2
Description

compiling SOGo with clang 3.2, it fails when it comes to linking. It has undefined references to sel_eq.

Attached patch fixes it. Tested with gcc 4.2.1 and clang 3.2 against libobjc2.

Additional Information

should probably be tested against libobjc from gcc.

TagsNo tags attached.

Activities

2013-02-06 10:25

 

sogo-fix-selectors.diff (3,410 bytes)   
$OpenBSD$
--- SOPE/GDLContentStore/EOQualifier+GCS.m.orig	Wed Feb  6 12:51:46 2013
+++ SOPE/GDLContentStore/EOQualifier+GCS.m	Wed Feb  6 12:52:26 2013
@@ -27,10 +27,6 @@
 
 #import "EOQualifier+GCS.h"
 
-#if __GNU_LIBOBJC__ >= 20100911
-#  define sel_eq(__A__,__B__) sel_isEqual(__A__,__B__)
-#endif
-
 @implementation EOQualifier(GCS)
 
 - (void)_appendAndQualifier:(EOAndQualifier *)_q 
@@ -92,21 +88,21 @@
 
   val = [_q value];
   if (val && [val isNotNull]) {
-    if (sel_eq(op, EOQualifierOperatorEqual))
+    if (sel_isEqual(op, EOQualifierOperatorEqual))
       qOperator = @"=";
-    else if (sel_eq(op, EOQualifierOperatorNotEqual))
+    else if (sel_isEqual(op, EOQualifierOperatorNotEqual))
       qOperator = @"!=";
-    else if (sel_eq(op, EOQualifierOperatorLessThan))
+    else if (sel_isEqual(op, EOQualifierOperatorLessThan))
       qOperator = @"<";
-    else if (sel_eq(op, EOQualifierOperatorGreaterThan))
+    else if (sel_isEqual(op, EOQualifierOperatorGreaterThan))
       qOperator = @">";
-    else if (sel_eq(op, EOQualifierOperatorLessThanOrEqualTo))
+    else if (sel_isEqual(op, EOQualifierOperatorLessThanOrEqualTo))
       qOperator = @"<=";
-    else if (sel_eq(op, EOQualifierOperatorGreaterThanOrEqualTo))
+    else if (sel_isEqual(op, EOQualifierOperatorGreaterThanOrEqualTo))
       qOperator = @">=";
-    else if (sel_eq(op, EOQualifierOperatorLike))
+    else if (sel_isEqual(op, EOQualifierOperatorLike))
       qOperator = @"LIKE";
-    else if (sel_eq(op, EOQualifierOperatorCaseInsensitiveLike)) {
+    else if (sel_isEqual(op, EOQualifierOperatorCaseInsensitiveLike)) {
       isCI = YES;
       qOperator = @"LIKE";
     }
@@ -128,11 +124,11 @@
     }
   }
   else {
-    if (sel_eq(op, EOQualifierOperatorEqual)) {
+    if (sel_isEqual(op, EOQualifierOperatorEqual)) {
       qOperator = @"IS";
       qValue = @"NULL";
     }
-    else if (sel_eq(op, EOQualifierOperatorNotEqual)) {
+    else if (sel_isEqual(op, EOQualifierOperatorNotEqual)) {
       qOperator = @"IS NOT";
       qValue = @"NULL";
     }
$OpenBSD$
--- SOPE/GDLContentStore/GCSFolder.m.orig	Wed Feb  6 12:50:58 2013
+++ SOPE/GDLContentStore/GCSFolder.m	Wed Feb  6 12:51:38 2013
@@ -44,10 +44,6 @@
 #import "EOQualifier+GCS.h"
 #import "GCSStringFormatter.h"
 
-#if __GNU_LIBOBJC__ >= 20100911
-#  define sel_eq(__A__,__B__) sel_isEqual(__A__,__B__)
-#endif
-
 typedef enum {
   noTableRequired = 0,
   quickTableRequired = 1,
@@ -395,20 +391,20 @@ static GCSStringFormatter *stringFormatter = nil;
     
     if (i > 0) [sql appendString:@", "];
     
-    if (sel_eq(sel, EOCompareAscending)) {
+    if (sel_isEqual(sel, EOCompareAscending)) {
       [sql appendString:column];
       [sql appendString:@" ASC"];
     }
-    else if (sel_eq(sel, EOCompareDescending)) {
+    else if (sel_isEqual(sel, EOCompareDescending)) {
       [sql appendString:column];
       [sql appendString:@" DESC"];
     }
-    else if (sel_eq(sel, EOCompareCaseInsensitiveAscending)) {
+    else if (sel_isEqual(sel, EOCompareCaseInsensitiveAscending)) {
       [sql appendString:@"UPPER("];
       [sql appendString:column];
       [sql appendString:@") ASC"];
     }
-    else if (sel_eq(sel, EOCompareCaseInsensitiveDescending)) {
+    else if (sel_isEqual(sel, EOCompareCaseInsensitiveDescending)) {
       [sql appendString:@"UPPER("];
       [sql appendString:column];
       [sql appendString:@") DESC"];
sogo-fix-selectors.diff (3,410 bytes)   
buzzdee

buzzdee

2013-06-29 09:16

reporter   ~0005725

same as with the similar report against SOPE, its not clang, but libobjc2 that causes the trouble. After update to 1.7, I get the same linking errors compiling with gcc.

2013-06-29 10:47

 

fix-unresolved-symbols.diff (2,109 bytes)   
$OpenBSD$
--- UI/MailerUI/GNUmakefile.orig	Sat Jun 29 15:59:59 2013
+++ UI/MailerUI/GNUmakefile	Sat Jun 29 16:00:49 2013
@@ -32,6 +32,7 @@ MailerUI_OBJC_FILES += \
 	UIxMailWindowCloser.m		\
 	\
 	UIxMailUserRightsEditor.m	\
+	../MailPartViewers/UIxMailRenderingContext.m \
 	UIxMailUserDelegationEditor.m	\
 #	UIxMailEditorAction.m		\
 #	UIxMailReplyAction.m		\
$OpenBSD$
--- UI/MailPartViewers/GNUmakefile.preamble.orig	Sat Jun 29 16:05:53 2013
+++ UI/MailPartViewers/GNUmakefile.preamble	Sat Jun 29 16:06:10 2013
@@ -2,3 +2,10 @@ ifeq ($(HAS_LIBRARY_ssl),yes)
 ADDITIONAL_CPPFLAGS += -DHAVE_OPENSSL=1
 BUNDLE_LIBS += -lcrypto
 endif
+
+ADDITIONAL_CPPFLAGS += \
+        -Wall -DCOMPILE_FOR_GSTEP_MAKE=1        \
+        -DUIX_MAILER_MAJOR_VERSION="@\"$(MAJOR_VERSION)\""   \
+        -DUIX_MAILER_MINOR_VERSION="@\"$(MINOR_VERSION)\""   \
+        -DUIX_MAILER_SUBMINOR_VERSION="@\"$(SUBMINOR_VERSION)\""
+
$OpenBSD$
--- UI/MailPartViewers/GNUmakefile.orig	Thu Jun 27 17:50:25 2013
+++ UI/MailPartViewers/GNUmakefile	Sat Jun 29 16:39:10 2013
@@ -26,6 +26,24 @@ MailPartViewers_OBJC_FILES += \
 	UIxMailPartICalViewer.m		\
 	\
 	UIxMailPartICalActions.m	\
+	../../SoObjects/Mailer/SOGoMailBodyPart.m \
+	../../SoObjects/Mailer/SOGoHTMLMailBodyPart.m \
+	../../SoObjects/Mailer/SOGoCalendarMailBodyPart.m \
+	../../SoObjects/Mailer/SOGoMailAccounts.m \
+	../../SoObjects/Mailer/SOGoMailBaseObject.m \
+	../../SoObjects/Mailer/SOGoMailAccount.m \
+	../../SoObjects/Mailer/SOGoMailNamespace.m \
+	../../SoObjects/Mailer/SOGoDraftsFolder.m \
+	../../SoObjects/Mailer/SOGoSentFolder.m \
+	../../SoObjects/Mailer/SOGoTrashFolder.m \
+	../../SoObjects/Mailer/SOGoMailFolder.m \
+	../../SoObjects/Mailer/SOGoDraftObject.m \
+	../../SoObjects/Mailer/SOGoMailObject.m \
+	../../SoObjects/Appointments/SOGoEMailAlarmsManager.m \
+	../../SoObjects/Appointments/SOGoAppointmentObject.m \
+	../../SoObjects/Appointments/SOGoComponentOccurence.m \
+	../../SoObjects/Appointments/SOGoAppointmentOccurence.m \
+	../../SoObjects/Appointments/SOGoCalendarComponent.m
 
 MailPartViewers_RESOURCE_FILES += \
 	product.plist		\
fix-unresolved-symbols.diff (2,109 bytes)   
buzzdee

buzzdee

2013-06-29 10:48

reporter   ~0005727

this fix-unresolved-symbols.diff went to the wrong bug report, sorry

ludovic

ludovic

2013-07-18 09:37

administrator   ~0005752

So fix-unresolved-symbols.diff shouldn't be applied for this bug report, only sogo-fix-selectors.diff right?

buzzdee

buzzdee

2013-07-18 10:33

reporter   ~0005755

Yes, but meanwhile I recognized that with the patch applied, and the other patch to the similar bug against SOPE, I have trouble with SOGo starting up, giving weird errors when trying to log on :(
Either here, on in the patch against SOPE, I might have done something stupid, which makes the compiler happy, but not the program itself.

ludovic

ludovic

2013-07-18 10:53

administrator   ~0005756

https://github.com/inverse-inc/sogo/commit/048bae2fc510f0cdd39b07d23bb23cf492001921

ludovic

ludovic

2013-07-19 10:16

administrator   ~0005764

This patch was seriously breaking SOGo on previous gcc/gnu objc runtime.

buzzdee

buzzdee

2013-10-19 07:25

reporter  

fix-sogo-libobjc2.diff (1,032 bytes)   
$OpenBSD: patch-SOPE_GDLContentStore_EOQualifier+GCS_m,v 1.1 2013/10/19 09:49:16 sebastia Exp $
--- SOPE/GDLContentStore/EOQualifier+GCS.m.orig	Sun Oct 13 18:35:24 2013
+++ SOPE/GDLContentStore/EOQualifier+GCS.m	Sun Oct 13 18:35:46 2013
@@ -27,7 +27,7 @@
 
 #import "EOQualifier+GCS.h"
 
-#if __GNU_LIBOBJC__ >= 20100911
+#if (defined(__GNU_LIBOBJC__) && (__GNU_LIBOBJC__ >= 20100911)) || defined(APPLE_RUNTIME) || defined(__GNUSTEP_RUNTIME__)
 #  define sel_eq(__A__,__B__) sel_isEqual(__A__,__B__)
 #endif
 
$OpenBSD: patch-SOPE_GDLContentStore_GCSFolder_m,v 1.1 2013/10/19 09:49:16 sebastia Exp $
--- SOPE/GDLContentStore/GCSFolder.m.orig	Sun Oct 13 18:35:05 2013
+++ SOPE/GDLContentStore/GCSFolder.m	Sun Oct 13 18:35:16 2013
@@ -44,7 +44,7 @@
 #import "EOQualifier+GCS.h"
 #import "GCSStringFormatter.h"
 
-#if __GNU_LIBOBJC__ >= 20100911
+#if (defined(__GNU_LIBOBJC__) && (__GNU_LIBOBJC__ >= 20100911)) || defined(APPLE_RUNTIME) || defined(__GNUSTEP_RUNTIME__)
 #  define sel_eq(__A__,__B__) sel_isEqual(__A__,__B__)
 #endif
 
fix-sogo-libobjc2.diff (1,032 bytes)   
buzzdee

buzzdee

2013-10-19 07:26

reporter   ~0006143

the new patch fix-sogo-libobjc2.diff tested with libobjc2-1.6 on OpenBSD macppc and i386, and libobjc2-1.7 on amd64.

ludovic

ludovic

2013-10-21 15:38

administrator   ~0006148

Fix pushed: https://github.com/inverse-inc/sogo/commit/053b090affbd6a20f62e181d66058583926fca19

Issue History

Date Modified Username Field Change
2013-02-06 10:25 buzzdee New Issue
2013-02-06 10:25 buzzdee File Added: sogo-fix-selectors.diff
2013-06-25 10:57 ludovic Target Version => 2.0.7
2013-06-29 09:16 buzzdee Note Added: 0005725
2013-06-29 10:47 buzzdee File Added: fix-unresolved-symbols.diff
2013-06-29 10:48 buzzdee Note Added: 0005727
2013-07-18 09:37 ludovic Note Added: 0005752
2013-07-18 10:33 buzzdee Note Added: 0005755
2013-07-18 10:53 ludovic Note Added: 0005756
2013-07-18 10:53 ludovic Status new => closed
2013-07-18 10:53 ludovic Resolution open => fixed
2013-07-18 10:53 ludovic Fixed in Version => 2.0.7
2013-07-19 10:16 ludovic Note Added: 0005764
2013-07-19 10:16 ludovic Status closed => feedback
2013-07-19 10:16 ludovic Resolution fixed => reopened
2013-07-19 10:16 ludovic Fixed in Version 2.0.7 =>
2013-07-19 10:16 ludovic Target Version 2.0.7 => maybe sometimes
2013-10-19 07:25 buzzdee File Added: fix-sogo-libobjc2.diff
2013-10-19 07:26 buzzdee Note Added: 0006143
2013-10-19 07:26 buzzdee Status feedback => new
2013-10-21 15:38 ludovic Note Added: 0006148
2013-10-21 15:38 ludovic Status new => closed
2013-10-21 15:38 ludovic Assigned To => ludovic
2013-10-21 15:38 ludovic Resolution reopened => fixed
2013-10-21 15:38 ludovic Fixed in Version => 2.1.0