build gtkD use ldc

12 views
Skip to first unread message

unread,
Jul 23, 2009, 2:28:24 PM7/23/09
to LDC - the LLVM D compiler
when me build gktD,The following error occurred is :

ldc -O2 -Isrc -c src/gdk/Drawable.d -ofsrc/gdk/Drawable.o
ldc: /build/buildd/llvm-2.5/lib/VMCore/Instructions.cpp:290: void
llvm::CallInst::init(llvm::Value*, llvm::Value* const*, unsigned int):
Assertion `(NumParams == FTy->getNumParams() || (FTy->isVarArg() &&
NumParams > FTy->getNumParams())) && "Calling a function with bad
signature!"' failed.
0 ldc 0x0000000000cf1273
1 libc.so.6 0x00002ac95e696040
2 libc.so.6 0x00002ac95e695fb5 gsignal + 53
3 libc.so.6 0x00002ac95e697bc3 abort + 387
4 libc.so.6 0x00002ac95e68ef09 __assert_fail + 233
5 ldc 0x0000000000c812cf llvm::CallInst::init(llvm::Value*,
llvm::Value* const*, unsigned int) + 543
6 ldc 0x00000000005e5a3c
llvm::CallInst::CallInst<__gnu_cxx::__normal_iterator<llvm::Value**,
std::vector<llvm::Value*, std::allocator<llvm::Value*> > > >
(llvm::Value*, __gnu_cxx::__normal_iterator<llvm::Value**,
std::vector<llvm::Value*, std::allocator<llvm::Value*> > >,
__gnu_cxx::__normal_iterator<llvm::Value**, std::vector<llvm::Value*,
std::allocator<llvm::Value*> > >, std::string const&,
llvm::Instruction*) + 252
7 ldc 0x00000000005e5b96 llvm::CallInst* llvm::IRBuilder<true,
llvm::ConstantFolder>::CreateCall<__gnu_cxx::__normal_iterator<llvm::Value**,
std::vector<llvm::Value*, std::allocator<llvm::Value*> > > >
(llvm::Value*, __gnu_cxx::__normal_iterator<llvm::Value**,
std::vector<llvm::Value*, std::allocator<llvm::Value*> > >,
__gnu_cxx::__normal_iterator<llvm::Value**, std::vector<llvm::Value*,
std::allocator<llvm::Value*> > >, char const*) + 134
8 ldc 0x00000000005e68cc llvm::CallSite
IRState::CreateCallOrInvoke<__gnu_cxx::__normal_iterator<llvm::Value**,
std::vector<llvm::Value*, std::allocator<llvm::Value*> > > >
(llvm::Value*, __gnu_cxx::__normal_iterator<llvm::Value**,
std::vector<llvm::Value*, std::allocator<llvm::Value*> > >,
__gnu_cxx::__normal_iterator<llvm::Value**, std::vector<llvm::Value*,
std::allocator<llvm::Value*> > >, char const*) + 1132
9 ldc 0x000000000062aaf9 DtoCallFunction(Loc&, Type*, DValue*,
Expressions*) + 1129
10 ldc 0x0000000000647e1e CallExp::toElem(IRState*) + 190
11 ldc 0x00000000005dc90c ExpStatement::toIR(IRState*) + 108
12 ldc 0x00000000005dc729 CompoundStatement::toIR(IRState*) +
89
13 ldc 0x00000000005fc38d DtoDefineFunction(FuncDeclaration*) +
1965
14 ldc 0x00000000006715c9 Ir::emitFunctionBodies() + 57
15 ldc 0x00000000006640e1 Module::genLLVMModule(Ir*) + 673
16 ldc 0x000000000064f555 main + 5429
17 libc.so.6 0x00002ac95e6815a6 __libc_start_main + 230
18 ldc 0x0000000000552309

Christian Kamm

unread,
Jul 24, 2009, 1:50:45 AM7/24/09
to ldc...@googlegroups.com
On Thursday 23 July 2009 20:28 鹏 wrote:
> when me build gktD,The following error occurred is :
>
> ldc -O2 -Isrc -c src/gdk/Drawable.d -ofsrc/gdk/Drawable.o
> ldc: /build/buildd/llvm-2.5/lib/VMCore/Instructions.cpp:290: void
> llvm::CallInst::init(llvm::Value*, llvm::Value* const*, unsigned int):
> Assertion `(NumParams == FTy->getNumParams() || (FTy->isVarArg() &&
> NumParams > FTy->getNumParams())) && "Calling a function with bad
> signature!"' failed.

This works fine for me on x86-32 Linux with LDC tip and LLVM 75891. We can't
really help you without knowing a lot more about your setup.
* Platform?
* LDC version/revision?
* LLVM revision (if you compiled LDC yourself)?
* GtkD version?

Christian

signature.asc

Tomas Lindquist Olsen

unread,
Jul 25, 2009, 7:57:34 PM7/25/09
to ldc...@googlegroups.com


It looks like you're using an old LDC/LLVM version. We no longer
support LLVM 2.5, since it has a lot of bugs.
Using a more recent LDC like the 0.9.1 release, or building your own
with LLVM 2.6svn will most likely fix things.

Tomas

Reply all
Reply to author
Forward
0 new messages