discuss-gnustep
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Problems building gnustep-base on Ubuntu Linux with clang/llvm-3.7


From: David Lobron
Subject: Problems building gnustep-base on Ubuntu Linux with clang/llvm-3.7
Date: Thu, 24 Sep 2015 15:14:51 -0400

Hi All,

I am trying to build gnustep-base-1.24.8 on Ubuntu Linux, and hitting a few 
snags.  I would be very grateful if someone could suggest where I'm going wrong.

I first installed the llvm compiler, clang-3.8.0.  I tried to build 
gnustep-base after that with clang, but the configure script failed because it 
could not find objc/objc.h.  I presumed this was because the runtime wasn't 
installed, so I grabbed the source for libobjc2-1.7, unpacked it, and ran the 
suggested build command in the source dir:

mkdir Build; cd Build; cmake .. -DCMAKE_C_COMPILER=clang 
-DCMAKE_CXX_COMPILER=clang++

This resulted in the following error:

-- Untested version of LLVM (3.8.0svn) found.
-- Disabling LLVM options unless explicitly enabled.
-- No C++ runtime library found
-- GNUstep install type set to NONE
CMake Error at CMakeLists.txt:310 (install):
  install TARGETS given no LIBRARY DESTINATION for shared library target
  "objc".


-- Configuring incomplete, errors occurred!
See also "/home/dlobron/clang/libobjc2-1.7/Build/CMakeFiles/CMakeOutput.log".
See also "/home/dlobron/clang/libobjc2-1.7/Build/CMakeFiles/CMakeError.log".

I worked around this by simply running "make; make install".  That produced a 
warning that I should have used the cmake command, but it built the runtime and 
installed the headers.  

When I then tried to compile gnustep-base with clang, I was able to build 
Source, Additions, and libgnustep-base, but I hit some error in the ObjectiveC2 
subproject.  The first few of these look like this:

Making all for subproject ObjectiveC2...
 Compiling file NSBlocks.m ...
In file included from NSBlocks.m:19:
../../Headers/ObjectiveC2/objc/runtime.h:89:15: error: typedef redefinition 
with different types ('void *' vs 'struct objc_property *')
typedef void *objc_property_t;
              ^
/usr/local/include/objc/runtime.h:139:31: note: previous definition is here
typedef struct objc_property* objc_property_t;
                              ^
In file included from NSBlocks.m:19:
../../Headers/ObjectiveC2/objc/runtime.h:133:1: error: unknown type name 
'Method_t'; did you mean 'Method'?
Method * class_copyMethodList(Class cls, unsigned int *outCount);
^~~~~~
Method
../../Headers/ObjectiveC2/objc/runtime.h:84:17: note: expanded from macro 
'Method'
#       define Method Method_t
                      ^
/usr/local/include/objc/runtime.h:115:29: note: 'Method' declared here
typedef struct objc_method *Method;

More "Method" errors follow, and then some errors like this:

NSBlocks.m:35:8: error: unknown type name 'objc_mutex_t'
extern objc_mutex_t __objc_runtime_mutex;
       ^
NSBlocks.m:42:12: error: incomplete definition of type 'struct objc_class'
  metaClass->class_pointer = superclass->class_pointer;
  ~~~~~~~~~^
/usr/local/include/objc/runtime.h:73:16: note: forward declaration of 'struct 
objc_class'
typedef struct objc_class *Class;
               ^
NSBlocks.m:42:40: error: incomplete definition of type 'struct objc_class'
  metaClass->class_pointer = superclass->class_pointer;
                             ~~~~~~~~~~^
/usr/local/include/objc/runtime.h:73:16: note: forward declaration of 'struct 
objc_class'
typedef struct objc_class *Class;
               ^
NSBlocks.m:43:12: error: incomplete definition of type 'struct objc_class'
  metaClass->super_class = superclass->class_pointer;
  ~~~~~~~~~^
/usr/local/include/objc/runtime.h:73:16: note: forward declaration of 'struct 
objc_class'
typedef struct objc_class *Class;

At this point, the max error count has been hit, and the compiler gives up.

The first "typedef redefinition" error makes me suspect an incompatibility 
between the ObjectiveC2 subproject and the installed libobjc2-1.7.  I'm not 
sure if this because I built libobjc2-1.7 with a regular "make", as opposed to 
"cmake ..".   So my questions are:

- Is there a way to work around the "install TARGETS given no LIBRARY 
DESTINATION" error when building libobjc2 with cmake?  Is this the source of my 
errors above?
- Is libobjc2 the right runtime for gnustep-base?  

Any help would be appreciated here.

Thank you,

David



Attachment: smime.p7s
Description: S/MIME cryptographic signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]