discuss-gnustep
[Top][All Lists]
Advanced

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

Ubuntu CMake instructions


From: Patryk Laurent
Subject: Ubuntu CMake instructions
Date: Thu, 27 Dec 2012 18:26:44 +0000 (GMT)

Greetings,

Here are some step-by-step instructions for installing the latest Objective C (including libobjc2) on a fresh Ubuntu server 12.10.  I have posted it to the Wiki in case anyone has edits.

http://wiki.gnustep.org/index.php/GNUstep_under_Ubuntu_Linux

Best,
Patryk


# Objective C 2.0 installation 
# On fresh install of Ubuntu 12.10 Server
# Patryk Laurent (http://pakl.net/)
# Dec 27, 2012

sudo aptitude install build-essential git subversion ninja cmake

svn co http://llvm.org/svn/llvm-project/llvm/trunk llvm
cd llvm/tools
svn co http://llvm.org/svn/llvm-project/cfe/trunk 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 http://svn.gna.org/svn/gnustep/modules/core
svn co http://svn.gna.org/svn/gnustep/libs/libobjc2/trunk libobjc2
cd core/make
./configure --enable-debug-by-default --with-layout=gnustep
make && sudo -E make install
. /usr/GNUstep/System/Library/Makefiles/GNUstep.sh # Add to .bashrc

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

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

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

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


reply via email to

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