discuss-gnustep
[Top][All Lists]
Advanced

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

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


From: David Lobron
Subject: Re: Problems building gnustep-base on Ubuntu Linux with clang/llvm-3.7
Date: Tue, 29 Sep 2015 11:21:53 -0400

Hi David-

> Can you find the output in config.log from the test that’s determining that 
> you don’t have blocks support?  It may be that you need to add -fblocks to 
> [OBJ]C[C]FLAGS.  Just to confirm: You did reconfigure / reinstall 
> GNUstep-make after reinstalling the runtime?

Yes- I'm using a fresh build tree, and reinstalling GNUstep-make each time.  
But I think I may have found the culprit.  Peering into config.log, I see this:

configure:14781: checking for _Block_copy
configure:14837: clang -o conftest -m64 -march=opteron -mno-3dnow -ggdb -O2 
-Wall  
-I/home/dlobron/build/clangport/akamai/common/GNUstep/Local/Library/Headers 
-I/home/dlobron/build/clangport/akamai/common/GNUstep/Local/Library/Headers 
-I/home/dlobron/build/clangport/akamai/common/GNUstep/System/Library/Headers  
-fgnu-runtime -x objective-c -m64  
-L/home/dlobron/build/clangport/akamai/common/GNUstep/Local/Library/Libraries 
-L/home/dlobron/build/clangport/akamai/common/GNUstep/Local/Library/Libraries 
-L/home/dlobron/build/clangport/akamai/common/GNUstep/System/Library/Libraries 
conftest.c -lrt -ldl  -lpthread -rdynamic -m64 -fgnu-runtime 
-L/home/dlobron/GNUstep/Library/Libraries 
-L/home/dlobron/build/clangport/akamai/common/GNUstep/Local/Library/Libraries 
-L/home/dlobron/build/clangport/akamai/common/GNUstep/System/Library/Libraries 
-lobjc -lm     >&5
/tmp/conftest-a47ae0.o: In function `main':
/home/dlobron/build/clangport/akamai/gnustep-base/gnustep-base-1.24.8/conftest.c:140:
 undefined reference to `_Block_copy'

The line in the auto-generated conftest.c that caused the failure is:

  return _Block_copy ();

I repeated the above command from the command line, and verified that I get the 
same error.  

I checked and verified that I downloaded the compiler-rt sub-project when I 
built clang.  But the Makefile in the projects subdir in clang filters it out:

# Don't build compiler-rt, it isn't designed to be built directly.
DIRS := $(filter-out compiler-rt,$(DIRS))

The clang CMakeLists.txt has a "LLVM_BUILD_EXTERNAL_COMPILER_RT" option, which 
seems to be off by default.  If I recompile clang with that option, I don't 
know if it will enable RT in clang, or instead build the RT compiler as a 
separate project.  

I'll keep digging into this, but if you guys know anything offhand about how to 
build clang from source with block support on Linux, I'd be grateful for any 
suggestions.

Thanks!

--David

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


reply via email to

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