bugSwarm - Bugs: bug #42866, Compile failure with clang

 
 

bug #42866: Compile failure with clang

Submitter:  Ryan Carsten Schmidt <ryandesign>
Submitted:  Tue 29 Jul 2014 12:31:18 AM UTC
   
 
Category:  Swarm Severity:  3 - Normal
Item Group:  None Status:  None
Privacy:  Public Assigned to:  schristley
Open/Closed:  Open
* Mandatory Fields

Add a New Comment Rich Markup
   

Sun 08 Mar 2015 05:19:58 PM UTC, comment #2: 

The original Swarm code and the last stable release relies upon GNU Objective-C V1.0 internal data structures and a GCC that can compile for it. In the development branch, there is work to abstract the use of the Objective-C runtime and support Objective-C V2.0. This code compiles and works on Mac OSX using Xcode with an Xcode project file, but importantly this is a Mac native port that does not support the GUI classes and will not compile existing Swarm applications. They would essentially need to be rewritten.

Unfortunately, support for GNU/Linux systems needs to be finished, this includes compiling Swarm on Mac OSX as a Unix-like library using X-Windows and etc., which would allow existing Swarm applications to be compiled and run with minimal change. We are waiting for a volunteer to finish these changes, and we do not have a timeline on when that may occur.

Scott Christley <schristley>
Group administrator
Sat 04 Oct 2014 06:10:21 AM UTC, comment #1: 

Have you made any progress in making your code compatible with clang?

Ryan Carsten Schmidt <ryandesign>
Tue 29 Jul 2014 12:31:18 AM UTC, original submission:  

Hello, swarm 2.4.1 does not build on OS X with the clang compiler:


sendmsg.c:200:10: error: use of unknown builtin '__builtin_apply' [-Wimplicit-function-declaration]
  return __builtin_apply((apply_t)m->method_imp,
         ^
sendmsg.c:200:10: warning: incompatible integer to pointer conversion returning 'int' from a function with result type 'retval_t' (aka 'void *') [-Wint-conversion]
  return __builtin_apply((apply_t)m->method_imp,
         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
sendmsg.c:274:7: warning: implicit declaration of function '__objc_generate_gc_type_description' is invalid in C99 [-Wimplicit-function-declaration]
      __objc_generate_gc_type_description (class);
      ^
sendmsg.c:507:10: error: use of unknown builtin '__builtin_apply_args' [-Wimplicit-function-declaration]
  args = __builtin_apply_args ();
         ^
sendmsg.c:507:10: note: did you mean '__builtin_apply'?
sendmsg.c:200:10: note: '__builtin_apply' declared here
  return __builtin_apply((apply_t)m->method_imp,
         ^
sendmsg.c:507:8: warning: incompatible integer to pointer conversion assigning to 'void *' from 'int' [-Wint-conversion]
  args = __builtin_apply_args ();
       ^ ~~~~~~~~~~~~~~~~~~~~~~~
sendmsg.c:510:5: error: use of unknown builtin '__builtin_return' [-Wimplicit-function-declaration]
    __builtin_return (res);
    ^
sendmsg.c:520:8: warning: incompatible integer to pointer conversion assigning to 'void *' from 'int' [-Wint-conversion]
  args = __builtin_apply_args ();
       ^ ~~~~~~~~~~~~~~~~~~~~~~~
sendmsg.c:544:8: warning: incompatible integer to pointer conversion assigning to 'void *' from 'int' [-Wint-conversion]
  args = __builtin_apply_args ();
       ^ ~~~~~~~~~~~~~~~~~~~~~~~
sendmsg.c:567:8: warning: incompatible integer to pointer conversion assigning to 'void *' from 'int' [-Wint-conversion]
  args = __builtin_apply_args ();
       ^ ~~~~~~~~~~~~~~~~~~~~~~~
6 warnings and 3 errors generated.


It is important to allow your software to be compiled with the clang compiler, because that's the only compiler included in Xcode 5 and up on OS X.

Ryan Carsten Schmidt <ryandesign>

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by schristley (Posted a comment)
  • -email is unavailable- added by ryandesign (Submitted the item)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only logged-in users can vote.

     

    Follows 1 latest change.

    Date Changed by Updated Field Previous Value => Replaced by
    2015-03-08 schristley Assigned toNone schristley

    Back to the top

    Powered by Savane 3.13-f8d8.
    Corresponding source code