gnustep-dev
[Top][All Lists]
Advanced

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

Failed to build on Ubuntu 13.04 Server with augmented clang/LLVM.


From: Maxthon Chan
Subject: Failed to build on Ubuntu 13.04 Server with augmented clang/LLVM.
Date: Thu, 18 Jul 2013 23:49:43 +0800

clang is surprisingly fast if built with LLVM link-time optimisation - even faster than GCC, from my experience. So I am setting up a new server with this LTO’d clang. But then I get a SIGSEGV when testing libobjc2 built with this augment clang. Can anyone test and tell me the reason why?

Build method, starting from a vanilla Ubuntu 13.04 Server:

$ apt-get install build-essential bunutils-gold binutils-dev libffi-dev libedit-dev swig libpython-dev libxml2-dev libxslt1-dev libxml2-utils # Install libraries for LLVM/clang
$ clang co ... # Check out LLVM, clang, LLDB, Compiler-RT, clang-tools-extra and livcxx, version 3.3 Release
$ mkdir -p {llvm,libcxx}-3.3/build
$ cd llvm-3.3/build
$ CC=gcc CXX=g++ ccmake .. # Build clang for the first pass, using GCC, with LLVMgold building but without LLDB.
$ make -j8 -k
$ sudo make install
$ cd ../../libcxx-3.3/build
$ CC=clang CXX=clang++ ccmake .. # Build libc++ using this intermediate clang Bootstrapping clang requires libc++
$ make -j8 -k
$ sudo make install
$ cd ../../llvm-3.3/build
$ rm -r ./* # Clean the build directory to yield for the second pass.
$ CC=clang CXX=clang++ ccmake .. # Build clang again, with optimisation "-Ofast -flto” (I am turning speed optimisation to the nines),
$ # CXXFLAGS=“-std=gnu++11 -stdlib=libc++” LDFLAGS="-stdlib=libc++”, enabling all modules including LLDB.
$ # From my experiences, this optimisation yields a binary runs even faster than GCC.
$ make -j8 -k # On linux, it may complain for missing symbols in archives, since Linux ld (even gold) does not recognise LLVM bit code.
$ ranlib —plugin LLVMgold lib/*.a # This will make it build a little bit more.
$ make -j8 -k
$ # ... It will repeat for a couple times.
$ sudo make install # It will overwrite the preliminary clang.
$ export CC=clang CXX=clang++
$ cd ../../gnustep/core/make
$ ./configure ...
$ make
$ sudo make install # Seems okay.
$ cd ../../dev-libs/libobjc2
$ mkdir build
$ cd build
$ ccmake .. # I need lib

reply via email to

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