GNUstep under Ubuntu Linux

From GNUstepWiki

Revision as of 18:30, 27 December 2012; view current revision
←Older revision | Newer revision→
# Objective C 2.0 installation 
# On fresh install of Ubuntu 12.10 Server
# Patryk Laurent (
# Dec 27, 2012

sudo aptitude install build-essential git subversion ninja cmake

svn co llvm
cd llvm/tools
svn co clang
cd .. # Back to llvm directory
./configure --enable-optimized
make -j4  # Go off to prepare cup of coffee here.

export PATH=$PATH:~/llvm/Release+Asserts/bin  # Add to .bashrc
export CC=clang  # Add to .bashrc
clang -v

svn co
svn co libobjc2
cd core/make
./configure --enable-debug-by-default --with-layout=gnustep
make && sudo -E make install
. /usr/GNUstep/System/Library/Makefiles/ # Add to .bashrc

sudo aptitude install gobjc   # Otherwise we get "cc1obj not found"
cd ../../libobjc2
mkdir build
cd build
cmake ..
sudo -E make install

cat > blocktest.m << EOF
#include <stdio.h>

int main() {
    void (^hello)(void) = ^(void) {
        printf("Hello, block!\n");
    return 0;

clang `gnustep-config --objc-flags` `gnustep-config --objc-libs` -fobj-arc -fobjc-nonfragile-abi -fblocks  -lobjc  blocktest.m