BackupGGCode / llvm-py

Python bindings for LLVM
BSD 3-Clause "New" or "Revised" License
0 stars 0 forks source link

Compilation error with llvm 2.5 #20

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
I was trying to compile llvm-py in Ubuntu 9.04.

The first problem I encountered was:

$ python setup.py build
Using llvm-config=llvm-config
Traceback (most recent call last):
  File "setup.py", line 134, in <module>
    ev = main()
  File "setup.py", line 128, in main
    call_setup(llvm_config)
  File "setup.py", line 86, in call_setup
    'asmparser' ])
  File "setup.py", line 50, in get_libs_and_objs
    assert part.endswith('.o')
AssertionError

After commenting line #50, I get the following error:

cc1plus: warning: command line option "-Wstrict-prototypes" is valid for
Ada/C/ObjC but not for C++
In file included from /usr/include/llvm/Support/MemoryBuffer.h:17,
                 from llvm/extra.cpp:45:
/usr/include/llvm/Support/DataTypes.h:42:3: error: #error "Must #define
__STDC_CONSTANT_MACROS before " "#including Support/DataTypes.h"
llvm/extra.cpp: In function ‘LLVMOpaqueModule*
LLVMGetModuleFromAssembly(const char*, unsigned int, char**)’:
llvm/extra.cpp:309: error: invalid initialization of non-const reference of
type ‘llvm::ParseError&’ from a temporary of type ‘llvm::ParseError*’
/usr/include/llvm/Assembly/Parser.h:46: error: in passing argument 3 of
‘llvm::Module* llvm::ParseAssemblyString(const char*, llvm::Module*,
llvm::ParseError&)’
llvm/extra.cpp:310: error: ‘class llvm::ParseError’ has no member named
‘getMessage’
error: command 'gcc' failed with exit status 1

Original issue reported on code.google.com by cogumbreiro@gmail.com on 15 May 2009 at 9:53

GoogleCodeExporter commented 9 years ago
Which version of llvm-py and LLVM are you using? The trunk compiles with LLVM 
2.5.

Original comment by mdevan.f...@gmail.com on 15 May 2009 at 5:18

GoogleCodeExporter commented 9 years ago
I am using 2.5

$ llvm-config --version
2.5

So the problem seems fixed in trunk.

Original comment by cogumbreiro@gmail.com on 15 May 2009 at 5:30

GoogleCodeExporter commented 9 years ago
Yes, use the trunk for LLVM 2.5. Release 0.5 works with LLVM 2.4.

Original comment by mdevan.f...@gmail.com on 16 May 2009 at 5:45