bugGNUstep - Bugs: bug #35777, GSWeb build on Mac OS X fails due...

 
 

You are not allowed to post comments on this tracker with your current authentification level.

bug #35777: GSWeb build on Mac OS X fails due to object_getClass()

Submitted by:  Graham Lee <leeg>
Submitted on:  Fri 09 Mar 2012 09:54:30 PM UTC  
 
Category: gswebSeverity: 3 - Normal
Item Group: BugStatus: None
Privacy: PublicAssigned to: None
Open/Closed: Open

Sat 21 Dec 2013 07:14:50 AM UTC, comment #3:

Is this still an issue?

Sebastian Reitenbach <buzzdee>
Project Member
Fri 11 May 2012 12:39:17 PM UTC, comment #2:

I realised I confused things with the discussions about patches: the one at https://savannah.gnu.org/bugs/download.php?file_id=25312 works correctly. It's the patch in the submission comment that should be ignored. Sorry.

Graham Lee <leeg>
Sat 10 Mar 2012 04:17:00 AM UTC, comment #1:

I made a mistake, the apple runtime does support object_getClass(), but the GSW source doesn't include the header for the function. The patch I attached shouldn't be used, and I'll create a new one.

Graham Lee <leeg>
Fri 09 Mar 2012 09:54:30 PM UTC, original submission:

Building for apple-apple-apple fails with this error:

$ make
This is gnustep-make 2.6.2. Type 'make print-gnustep-make-help' for help.
Making all in GSWeb ...
Making build-headers for framework WebObjects...
Making all for framework WebObjects...
Compiling file GSWConstants.m ...
In file included from GSWeb.h:176,
from GSWConstants.m:37:
GSWDynamicElement.h: In function ‘GSWDynamicElement_evaluateValueInContext’:
GSWDynamicElement.h:62: error: implicit declaration of function ‘object_getClass’
GSWDynamicElement.h:62: warning: comparison between pointer and integer
make[3]: *** [obj/WebObjects/WebObjects.obj/GSWConstants.m.o] Error 1
make[2]: *** [internal-framework-run-compile-submake] Error 2
make[1]: *** [WebObjects.all.framework.variables] Error 2
make: *** [internal-all] Error 2

On the new Apple Objective-C runtime, the API for getting a class (objc_getClass()) takes a name, not an instance. Therefore I've patched this by using the -class method, which should work with any Objective-C runtime.

Index: GSWeb/GSWDynamicElement.h
===================================================================
--- GSWeb/GSWDynamicElement.h (revision 34917)
+++ GSWeb/GSWDynamicElement.h (working copy)
@@ -58,8 +58,7 @@
BOOL GSWDynamicElement_evaluateValueInContext(GSWDynamicElement* element,Class standardClass,
GSWIMP_BOOL imp,GSWAssociation* condition,GSWContext* context)
{
- // was object_get_class
- if (imp && object_getClass(element)==standardClass)
+ if (imp && ([element class]==standardClass))
{
return (*imp)(element,evaluateConditionInContextSEL,
condition,context);

Graham Lee <leeg>

 

Attached Files
file #25312:  gsw-objc2runtime.patch added by leeg (1kB - application/octet-stream - Patch to conditionally include Apple's objc header if the apple runtime is used)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by buzzdee (Posted a comment)
  • -unavailable- added by leeg (Submitted the item)
  •  

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follows 1 latest change.

    Date Changed By Updated Field Previous Value => Replaced By
    Sat 10 Mar 2012 04:33:04 AM UTCleegAttached File-=>Added gsw-objc2runtime.patch, #25312

    Back to the top


    Powered by Savane 3.1-cleanup