[cfe-dev] clang: build failure on Ubuntu 11.10
Marc J. Driftmeyer
mjd at reanimality.com
Thu Nov 1 16:52:13 PDT 2012
What is your exact set up?
In reference on my system:
KNOWN:
Debian Sid/Unstable Kernel 3.2.
GCC DEFAULT SETUP:
gcc (Debian 4.7.2-4) 4.7.2
Copyright (C) 2012 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
LLVM/Clang/LLDB/Compiler-RT/LIBCXX Trunk via SVN under their proper
checkout points. [lldb/clang under /trunk/llvm/tools, compiler-rt/libcxx
under /trunk/llvm/projects, test-suite/llvm-test under /trunk/llvm/projects]
CONFIGURATION CMAKE SETUP:
cmake version 2.8.9
PROCEDURE I USE TO BUILD:
Two stages.
Create a build directory for trunk against gcc outside of trunk.
$ mkdir cmake-gcc-trunk
Configure with cmake generic configuration with no optimization flags on
the compilers just to get it to build.
user at host: cmake-gcc-trunk$ cmake -DCMAKE_C_COMPILER=/usr/bin/gcc
-DCMAKE_CXX_COMPILER=/usr/bin/g++ ../trunk/llvm
user at host: cmake-gcc-trunk$ make
You can edit the CMakeCache.txt file and set up MinSizeRel, set BOOL to
ON for LLVM_EXAMPLES, CLANG_EXAMPLES, TEST-SUITE, SHARED_LIBRARIES, etc.
You can also copy down all those areas you want configured how you want,
put them in a shell script and run the steps to update your cmake config
and thus keep the CMakeCache.txt file current.
Once you build and install into /usr/local
Create a build directory for trunk against clang/clang++ local outside
of trunk.
$ mkdir cmake-clang-trunk
Configure with cmake generic configuration with no optimization flags on
the compilers just to get it to build.
user at host: cmake-clang-trunk$ cmake -DCMAKE_C_COMPILER=/usr/local/clang
-DCMAKE_CXX_COMPILER=/usr/local/bin/clang++ ../trunk/llvm
user at host: cmake-gcc-trunk$ make
From then on you only occasionally have to deal with broken updates via
svn/git not fully up-to-date before clang/clang++ can self-host builds
under /usr/local.
NOTE: On occasion ubuntu, debian and other distributions have to update
their gcc defaults and made aware within llvm/clang when building
against and trying to find the necessary header files, but that always
gets resolved.
- Marc
On 11/01/2012 01:32 AM, Sujit Kamthe wrote:
>
> Hi,
>
> I tried building clag on Ubuntu 11.10 using instruction given at
> http://clang.llvm.org/get_started.html
>
> The make command throws following error:
>
> autobuild at CFCServer:~/CheckMate/build$ make
>
> make[1]: Entering directory `/home/autobuild/CheckMate/build/lib/Support'
>
> llvm[1]: Compiling APFloat.cpp for Debug+Asserts build
>
> In file included from
> /home/autobuild/CheckMate/llvm/include/llvm/Support/type_traits.h:20:0,
>
> from
> /home/autobuild/CheckMate/llvm/include/llvm/ADT/SmallVector.h:19,
>
> from
> /home/autobuild/CheckMate/llvm/include/llvm/ADT/ArrayRef.h:13,
>
> from
> /home/autobuild/CheckMate/llvm/include/llvm/ADT/APInt.h:18,
>
> from
> /home/autobuild/CheckMate/llvm/include/llvm/ADT/APFloat.h:104,
>
> from
> /home/autobuild/CheckMate/llvm/lib/Support/APFloat.cpp:15:
>
> /home/autobuild/CheckMate/build/include/llvm/Support/DataTypes.h:79:3:
> error: #error "Don't have a definition for uint64_t on this platform"
>
> In file included from
> /home/autobuild/CheckMate/llvm/include/llvm/Support/MathExtras.h:17:0,
>
> from
> /home/autobuild/CheckMate/llvm/include/llvm/ADT/APInt.h:20,
>
> from
> /home/autobuild/CheckMate/llvm/include/llvm/ADT/APFloat.h:104,
>
> from
> /home/autobuild/CheckMate/llvm/lib/Support/APFloat.cpp:15:
>
> Can anybody please help?
>
> Regards,
>
> *Sujit Kamthe*
>
> **
>
> *buildbox_logo*
>
> Productivity & FE |Automotive and Engineering SBU | KPITCummins
> Infosystems Ltd|Board: +91 20 66525000 | Extn:3102 |Mobile:7709076120
>
>
> This message contains information that may be privileged or
> confidential and is the property of the KPIT Cummins Infosystems Ltd.
> It is intended only for the person to whom it is addressed. If you are
> not the intended recipient, you are not authorized to read, print,
> retain copy, disseminate, distribute, or use this message or any part
> thereof. If you receive this message in error, please notify the
> sender immediately and delete all copies of this message. KPIT Cummins
> Infosystems Ltd. does not accept any liability for virus infected mails.
>
>
> _______________________________________________
> cfe-dev mailing list
> cfe-dev at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev
--
Marc J. Driftmeyer
Email :: mjd at reanimality.com <mailto:mjd at reanimality.com>
Web :: http://www.reanimality.com
Cell :: (509) 435-5212
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20121101/b0727edb/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: image/jpeg
Size: 4082 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20121101/b0727edb/attachment.jpe>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: mjd.vcf
Type: text/x-vcard
Size: 317 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20121101/b0727edb/attachment.vcf>
More information about the cfe-dev
mailing list