discuss-gnustep
[Top][All Lists]
Advanced

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

building dbuskit fails with llvm/clang


From: Sebastian Reitenbach
Subject: building dbuskit fails with llvm/clang
Date: Sat, 09 Apr 2011 11:29:16 +0200
User-agent: Mozilla/5.0 (X11; U; OpenBSD i386; en-US; rv:1.9.2.14) Gecko/20110404 Thunderbird/3.1.8

Hi,

I extended the list of libs/apps to be compiled and what I want to add
to the gnustep ports a little bit, and found dbuskit from svn does
compile with gcc, but not with llvm/clang.

The first error is, and is easy to fix, see attached patch:
clang DKArgument.m -c \
              -MMD -MP -DGNUSTEP -DGNUSTEP_BASE_LIBRARY=1
-DGNU_GUI_LIBRARY=1 -DGNU_RUNTIME=1 -DGNUSTEP_BASE_LIBRARY=1
-fno-strict-aliasing -fPIC -DDEBUG -fno-omit-frame-pointer -Wall
-DGSWARN -DGSDIAGNOSE -Wno-import -O2 -pipe -g -fgnu-runtime
-I/usr/local/include/dbus-1.0 -I/usr/local/lib/dbus-1.0/include -Wall
-Wdeclaration-after-statement -Werror
-fconstant-string-class=NSConstantString -I./derived_src -I.
-I/usr/local/include
-I/gnustep-dbuskit-0.1_writes_to_HOME/GNUstep/Library/Headers
-I/usr/local/include \
               -o obj/DBusKit.obj/DKArgument.m.o
DKArgument.m:495:14: error: equality comparison with extraneous
parentheses [-Werror,-Wparentheses]
          if ((type == DKDBusTypeForObjCType([sig methodReturnType])))
               ~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
DKArgument.m:495:14: note: use '=' to turn this equality comparison into
an assignment
          if ((type == DKDBusTypeForObjCType([sig methodReturnType])))
                    ^~
                    =
DKArgument.m:495:14: note: remove extraneous parentheses around the
comparison to silence this warning
          if ((type == DKDBusTypeForObjCType([sig methodReturnType])))
              ~     ^                                               ~
1 error generated.


the second error then later is:

clang DKEndpointManager.m -c \
              -MMD -MP -DGNUSTEP -DGNUSTEP_BASE_LIBRARY=1
-DGNU_GUI_LIBRARY=1 -DGNU_RUNTIME=1 -DGNUSTEP_BASE_LIBRARY=1
-fno-strict-aliasing -fPIC -DDEBUG -fno-omit-frame-pointer -Wall
-DGSWARN -DGSDIAGNOSE -Wno-import -O2 -pipe -g -fgnu-runtime
-I/usr/local/include/dbus-1.0 -I/usr/local/lib/dbus-1.0/include -Wall
-Wdeclaration-after-statement -Werror
-fconstant-string-class=NSConstantString -I./derived_src -I.
-I/usr/local/include
-I/gnustep-dbuskit-0.1_writes_to_HOME/GNUstep/Library/Headers
-I/usr/local/include \
               -o obj/DBusKit.obj/DKEndpointManager.m.o
DKEndpointManager.m:187:6: error: receiver 'GSStackTrace' is a forward
class and corresponding @interface may not exist [-Werror]
  [[[GSStackTrace alloc] init] release];
     ^
In file included from DKEndpointManager.m:23:
In file included from ./DKArgument.h:25:
In file included from ./DKIntrospectionNode.h:25:
/usr/local/include/Foundation/NSObject.h:186:1: note: method 'alloc' is
used for the forward class
+ (id) alloc;
^
DKEndpointManager.m:190:6: error: receiver 'DKWatcher' is a forward
class and corresponding @interface may not exist [-Werror]
  [[[DKWatcher alloc] init] release];
     ^
In file included from DKEndpointManager.m:23:
In file included from ./DKArgument.h:25:
In file included from ./DKIntrospectionNode.h:25:
/usr/local/include/Foundation/NSObject.h:186:1: note: method 'alloc' is
used for the forward class
+ (id) alloc;
^
2 errors generated.


both GSStackTrace and DKWatcher are added with @class statement. They
are both defined within a .m file, so not possible to include/import  a
.h file, which I'd have guessed would make the error go away.

Sebastian

Attachment: patch-Source_DKArgument_m
Description: Text document


reply via email to

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