LLVM on Windows MSVC 10

Hi,

I'm trying to build svn LLVM with Visual Studio 2010:

cd build
cmake .. -G"NMake Makefiles"
nmake

and several link steps fail due to a missing symbol:

LLVMX86CodeGen.lib(X86JITInfo.cpp.obj) : error LNK2019: unresolved external symbol X86CompilationCallback referenced in function "public: virtual void (__cdecl*__cdecl llvm::X86JITInfo::getLazyResolverFunction(void * (__cdecl*)(void *)))(void)" (?getLazyResolverFunction@X86JITInfo@llvm@@UEAAP6AXXZP6APEAXPEAX@Z@Z)

What can/should I do?

Thanks!

Ruben

I first sent this to the Clang dev list, but they told me to come here:

I don’t normally build using nmake… but I just tried and it worked 100% here.
Are you sure you are using the trunk?

[LLVM questions belong to llvmdev@cs.uiuc.edu]

Ruben Van Boxem <vanboxem.ruben@gmail.com>
writes:

I'm trying to build svn LLVM with Visual Studio 2010:

cd build
cmake .. -G"NMake Makefiles"
nmake

and several link steps fail due to a missing symbol:

LLVMX86CodeGen.lib(X86JITInfo.cpp.obj) : error LNK2019: unresolved

external symbol X86CompilationCallback referenced in function "public:
virtual void (__cdecl*__cdecl
llvm::X86JITInfo::getLazyResolverFunction(void * (__cdecl*)(void
*)))(void)"
(?getLazyResolverFunction@X86JITInfo@llvm@@UEAAP6AXXZP6APEAXPEAX@Z@Z)

What can/should I do?

It builds fine here on VS 10 Windows XP 32 bits with latests svn
sources.

I'm using SVN Rev. 122644 (trunk), and building for Windows x64 (from
the MSVC Command prompt).

Ruben

Ruben Van Boxem <vanboxem.ruben@gmail.com> writes:

I'm trying to build svn LLVM with Visual Studio 2010:

cd build
cmake .. -G"NMake Makefiles"
nmake

and several link steps fail due to a missing symbol:

> LLVMX86CodeGen.lib(X86JITInfo.cpp.obj) : error LNK2019: unresolved
> external symbol X86CompilationCallback referenced in function "public:
> virtual void (__cdecl*__cdecl llvm::X86JITInfo::getLazyResolverFunction(void
> * (__cdecl*)(void *)))(void)"
> (?getLazyResolverFunction@X86JITInfo@llvm@@UEAAP6AXXZP6APEAXPEAX@Z@Z)

What can/should I do?

I'm using SVN Rev. 122644 (trunk), and building for Windows x64 (from
the MSVC Command prompt).

This is probably a bug with Windows64 support. Please file a bug report.

Ruben Van Boxem <vanboxem.ruben@gmail.com> writes:

I'm trying to build svn LLVM with Visual Studio 2010:

cd build
cmake .. -G"NMake Makefiles"
nmake

and several link steps fail due to a missing symbol:

> LLVMX86CodeGen.lib(X86JITInfo.cpp.obj) : error LNK2019: unresolved
> external symbol X86CompilationCallback referenced in function "public:
> virtual void (__cdecl*__cdecl llvm::X86JITInfo::getLazyResolverFunction(void
> * (__cdecl*)(void *)))(void)"
> (?getLazyResolverFunction@X86JITInfo@llvm@@UEAAP6AXXZP6APEAXPEAX@Z@Z)

What can/should I do?

I'm using SVN Rev. 122644 (trunk), and building for Windows x64 (from
the MSVC Command prompt).

This is probably a bug with Windows64 support. Please file a bug report.

To follow up on MSVC x64 problems: running CMake like this:

cmake ../../Source/LLVM -G"Visual Studio 10 Win64"

causes following error:

-- Targeting X86
CMake Error at M:/Development/utils/cmake/share/cmake-2.8/Modules/CMakeDetermineASMCompiler.cmake:68 (CMAKE_DETERMINE_COMPILER_ID_VENDOR):
Unknown CMake command "CMAKE_DETERMINE_COMPILER_ID_VENDOR".
Call Stack (most recent call first):
M:/Development/utils/cmake/share/cmake-2.8/Modules/CMakeDetermineASM_MASMCompiler.cmake:26 (INCLUDE)
lib/Target/X86/CMakeLists.txt:44 (enable_language)

CMake Error: Could not find cmake module file:M:/Development/x64-msvc/llvm/CMakeFiles/CMakeASM_MASMCompiler.cmake
-- Configuring incomplete, errors occurred!

I have filed a bug report: 8885 – CMake Generator "Visual Studio 10 Win64" fails

Thanks!

Ruben