Hi,
I am just letting you know that I have not been able to build LLVM
using CMake since I ran svn up yesterday.
And it would be great if somebody could tell me whether the problem is
on my end.
What I did was,
~/llvm$ svn up
~/llvm$ mkdir cmakebuild
~/llvm$ cd cmakebuild
~/llvm/cmakebuild$ cmake -DCMAKE_BUILD_TYPE:STRING="Release"
-DLLVM_TARGETS_TO_BUILD:STRING="X86" ..
-- Target triple:
-- LLVM_HOSTTRIPLE: i686-pc-linux-gnu
-- Threads enabled.
-- Targeting X86
-- Target triple:
-- Configuring done
-- Generating done
-- Build files have been written to: /home/selee/llvm/cmakebuild
~/llvm/cmakebuild$ make
After awhile, I got the following error message and couldn't complete the
build.
../../lib/libLLVMCore.a(Type.cpp.o): In function
`llvm::IntegerType::get(unsigned int)':
Type.cpp:(.text+0x394c): undefined reference to
`llvm::sys::RWMutex::reader_acquire()'
Type.cpp:(.text+0x397a): undefined reference to
`llvm::sys::RWMutex::reader_release()'
Type.cpp:(.text+0x3a7f): undefined reference to
`llvm::sys::RWMutex::writer_acquire()'
Type.cpp:(.text+0x3ab1): undefined reference to
`llvm::sys::RWMutex::writer_release()'
../../lib/libLLVMCore.a(Type.cpp.o): In function
`llvm::DerivedType::refineAbstractTypeTo(llvm::Type const*)':
Type.cpp:(.text+0x3ce0): undefined reference to
`llvm::sys::RWMutex::writer_acquire()'
../../lib/libLLVMCore.a(Type.cpp.o): In function
`llvm::StructType::get(std::vector<llvm::Type const*,
std::allocator<llvm::Type const*> > const&, bool)':
Type.cpp:(.text+0x3f76): undefined reference to
`llvm::sys::RWMutex::reader_acquire()'
Type.cpp:(.text+0x3fb0): undefined reference to
`llvm::sys::RWMutex::reader_release()'
Type.cpp:(.text+0x4090): undefined reference to
`llvm::sys::RWMutex::writer_acquire()'
Type.cpp:(.text+0x40c2): undefined reference to
`llvm::sys::RWMutex::writer_release()'
../../lib/libLLVMCore.a(Type.cpp.o): In function
`llvm::FunctionType::get(llvm::Type const*, std::vector<llvm::Type
const*, std::allocator<llvm::Type const*> > const&, bool)':
Type.cpp:(.text+0x42cc): undefined reference to
`llvm::sys::RWMutex::reader_acquire()'
Type.cpp:(.text+0x4309): undefined reference to
`llvm::sys::RWMutex::reader_release()'
Type.cpp:(.text+0x43f8): undefined reference to
`llvm::sys::RWMutex::writer_acquire()'
Type.cpp:(.text+0x442a): undefined reference to
`llvm::sys::RWMutex::writer_release()'
../../lib/libLLVMCore.a(Type.cpp.o): In function
`llvm::ArrayType::get(llvm::Type const*, unsigned long long)':
Type.cpp:(.text+0x4574): undefined reference to
`llvm::sys::RWMutex::reader_acquire()'
Type.cpp:(.text+0x4634): undefined reference to
`llvm::sys::RWMutex::reader_release()'
Type.cpp:(.text+0x4780): undefined reference to
`llvm::sys::RWMutex::reader_release()'
Type.cpp:(.text+0x4797): undefined reference to
`llvm::sys::RWMutex::writer_acquire()'
Type.cpp:(.text+0x47cd): undefined reference to
`llvm::sys::RWMutex::writer_release()'
../../lib/libLLVMCore.a(Type.cpp.o): In function
`llvm::VectorType::get(llvm::Type const*, unsigned int)':
Type.cpp:(.text+0x4932): undefined reference to
`llvm::sys::RWMutex::reader_acquire()'
Type.cpp:(.text+0x49c3): undefined reference to
`llvm::sys::RWMutex::reader_release()'
Type.cpp:(.text+0x4ad0): undefined reference to
`llvm::sys::RWMutex::reader_release()'
Type.cpp:(.text+0x4ae7): undefined reference to
`llvm::sys::RWMutex::writer_acquire()'
Type.cpp:(.text+0x4b1d): undefined reference to
`llvm::sys::RWMutex::writer_acquire()'
../../lib/libLLVMCore.a(Type.cpp.o): In function
`llvm::PointerType::get(llvm::Type const*, unsigned int)':
Type.cpp:(.text+0x4c42): undefined reference to
`llvm::sys::RWMutex::reader_acquire()'
Type.cpp:(.text+0x4cd3): undefined reference to
`llvm::sys::RWMutex::reader_release()'
Type.cpp:(.text+0x4de0): undefined reference to
`llvm::sys::RWMutex::reader_release()'
Type.cpp:(.text+0x4df7): undefined reference to
`llvm::sys::RWMutex::writer_acquire()'
Type.cpp:(.text+0x4e2d): undefined reference to
`llvm::sys::RWMutex::writer_release()'
../../lib/libLLVMCore.a(Type.cpp.o): In function
`llvm::DerivedType::refineAbstractTypeTo(llvm::Type const*)':
Type.cpp:(.text+0x3d09): undefined reference to
`llvm::sys::RWMutex::writer_release()'
../../lib/libLLVMCore.a(Type.cpp.o): In function `void
llvm::object_deleter<llvm::sys::RWMutex>(void*)':
Type.cpp:(.text._ZN4llvm14object_deleterINS_3sys7RWMutexEEEvPv[void
llvm::object_deleter<llvm::sys::RWMutex>(void*)]+0x12): undefined
reference to `llvm::sys::RWMutex::~RWMutex()'
../../lib/libLLVMCore.a(Type.cpp.o): In function `void*
llvm::object_creator<llvm::sys::RWMutex>()':
Type.cpp:(.text._ZN4llvm14object_creatorINS_3sys7RWMutexEEEPvv[void*
llvm::object_creator<llvm::sys::RWMutex>()]+0x1e): undefined reference
to `llvm::sys::RWMutex::RWMutex()'
collect2: ld returned 1 exit status
make[2]: *** [bin/opt] Error 1
make[1]: *** [tools/opt/CMakeFiles/opt.dir/all] Error 2
make: *** [all] Error 2
It seems that RWMutex has been added to the source tree yesterday, and
some source code files have been modified accordingly.
Thanks,
Sean
--
Sean Lee
PhD Student
Programming Language and Systems Research Group
School of Computer Science and Engineering
University of New South Wales
http://www.cse.unsw.edu.au/~seanl