Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Compilation Problem #3

Open
lokeb opened this issue Nov 16, 2014 · 3 comments
Open

Compilation Problem #3

lokeb opened this issue Nov 16, 2014 · 3 comments

Comments

@lokeb
Copy link

lokeb commented Nov 16, 2014

I am trying to compile it on Ubuntu 14.04, but it stops with an error. Here's the log:

Build Project: EtoileFoundation

Making all for framework EtoileFoundation...
Compiling file Source/ETByteSizeFormatter.m ...
In file included from /home/loke/code/Etoile/Bootstrap/EtoileFoundation/EtoileFoundation/Macros.h:10:0,
from Source/ETByteSizeFormatter.m:9:
/home/loke/code/Etoile/Bootstrap/EtoileFoundation/EtoileFoundation/EtoileCompatibility.h:126:115: error: expected ‘)’ before ‘^’ token

  • (id)addObserverForName: (NSString *)name object: (id)object queue: (NSOperationQueue *)queue usingBlock: (void (^)(NSNotification *))block;
    ^
    /home/loke/code/Etoile/Bootstrap/EtoileFoundation/EtoileFoundation/EtoileCompatibility.h:126:117: error: expected ‘)’ before ‘(’ token
  • (id)addObserverForName: (NSString )name object: (id)object queue: (NSOperationQueue *)queue usingBlock: (void (^)(NSNotification *))block;
    ^
    make[3]: *
    * [obj/EtoileFoundation.obj/Source/ETByteSizeFormatter.m.o] Error 1
    make[2]: *** [internal-framework-run-compile-submake] Error 2
    make[1]: *** [EtoileFoundation.all.framework.variables] Error 2
    make: *** [internal-all] Error 2
@davidchisnall
Copy link
Member

It looks like your version of clang doesn't support blocks. Can you do make messages=yes and paste the output? This should tell you which copy of clang it's using. You can then do path/to/clang -v to find the version.

Although it looks as if you might be using GCC as an Objective-C compiler, which would be a very odd decision as GCC only supports an archaic version of Objective-C.

@lokeb
Copy link
Author

lokeb commented Nov 20, 2014

You are right, but now I have another problem. I compiled libobjc2 from http://download.gna.org/gnustep/. Now it fails while :

Build Project: LanguageKitCodeGen

Making all for framework LanguageKitCodeGen...
clang++ AMD64/AMD64ABIInfo.mm -c
-MMD -MP -DGNU_RUNTIME_VERSION=1 -DGNU_RUNTIME_VERSION=1 -DLLVM_MAJOR=3 -DLLVM_MINOR=4 -DGNU_RUNTIME_VERSION=1 -DLLVM_MAJOR=3 -DLLVM_MINOR=4 -DGNU_RUNTIME_VERSION=1 -DGNUSTEP -DGNUSTEP_BASE_LIBRARY=1 -DGNU_GUI_LIBRARY=1 -DGNU_RUNTIME=1 -DGNUSTEP_BASE_LIBRARY=1 -fno-strict-aliasing -fexceptions -fobjc-exceptions -D_NATIVE_OBJC_EXCEPTIONS -pthread -fPIC -Wall -DGSWARN -DGSDIAGNOSE -Wno-import -g -O2 -fgnu-runtime -std=c++11 -Wno-variadic-macros -Wno-gnu -Wno-pedantic -I/usr/lib/llvm-3.4/include -DNDEBUG -D_GNU_SOURCE -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -g -O2 -fomit-frame-pointer -fvisibility-inlines-hidden -fno-exceptions -fPIC -Woverloaded-virtual -Wcast-qual -g -fobjc-arc -fconstant-string-class=NSConstantString -I/home/loke/code/Etoile/Build -I/home/loke/code/Etoile/Languages/LanguageKit -I/home/loke/code/Etoile/Languages/LanguageKit/LanguageKit -I/home/loke/code/Etoile/Languages/LanguageKit/Headers -I/usr/include/gcc -dumpmachine/ -I/usr/Local/Library/Headers/dispatch -I/home/loke/code/Etoile/Build -I/home/loke/code/Etoile/Languages/LanguageKit/CodeGen -I/home/loke/code/Etoile/Languages/LanguageKit/CodeGen/LanguageKitCodeGen -I/home/loke/code/Etoile/Languages/LanguageKit/CodeGen/Headers -I/usr/include/gcc -dumpmachine/ -I/usr/Local/Library/Headers/dispatch -I/home/loke/code/Etoile/Build -I/home/loke/code/Etoile/Languages/LanguageKit/CodeGen -I/home/loke/code/Etoile/Languages/LanguageKit/CodeGen/LanguageKitCodeGen -I/home/loke/code/Etoile/Languages/LanguageKit/CodeGen/Headers -I/usr/include/gcc -dumpmachine/ -I/usr/Local/Library/Headers/dispatch -I/home/loke/code/Etoile/Build -I/home/loke/code/Etoile/Languages/LanguageKit/CodeGen -I/home/loke/code/Etoile/Languages/LanguageKit/CodeGen/LanguageKitCodeGen -I/home/loke/code/Etoile/Languages/LanguageKit/CodeGen/Headers -I/usr/include/gcc -dumpmachine/ -I/usr/Local/Library/Headers/dispatch -I./derived_src -I. -I/home/loke/GNUstep/Library/Headers -I/usr/local/include/GNUstep -I/usr/include/GNUstep
-o obj/LanguageKitCodeGen.obj/AMD64/AMD64ABIInfo.mm.o
error: -fobjc-arc is not supported on platforms using the legacy runtime
make[5]: *** [obj/LanguageKitCodeGen.obj/AMD64/AMD64ABIInfo.mm.o] Error 1
make[4]: *** [internal-framework-run-compile-submake] Error 2
make[3]: *** [LanguageKitCodeGen.all.framework.variables] Error 2
make[3]: Leaving directory /home/loke/code/Etoile/Languages/LanguageKit/CodeGen' make[2]: *** [internal-all] Error 2 make[2]: Leaving directory/home/loke/code/Etoile/Languages/LanguageKit'
make[1]: *** [internal-all] Error 2
make[1]: Leaving directory `/home/loke/code/Etoile/Languages'
make: *** [internal-all] Error 2

Do I have to compile the entire GNUstep from scratch with objc2 support, or there is a simpler way?

@davidchisnall
Copy link
Member

Yes, you should compile GNUstep with the an ABI from the last 5 years.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants