[haskell-llvm] Re: Re: MathExtras.h: error: there are no arguments to ‘INT64_C’ that depend on a template parameter, so a declaration of ‘INT64_C’ must be available
Henning Thielemann
lemming at henning-thielemann.de
Mon Apr 30 08:32:02 BST 2012
On Mon, 30 Apr 2012, Henning Thielemann wrote:
> On Mon, 30 Apr 2012, Henning Thielemann wrote:
>
>> I have now installed LLVM-3.0 and try to compile llvm-base from git
>> repository.
>
> The errors go away if I add the result of 'llvm-config --cppflags' to the
> CC-Options field in the Cabal file. Maybe this can be done from the
> 'configure' file in the same way as it is done for 'extra-libraries'?
I have replaced the cc-options line in llvm-base.buildinfo.in by:
cpp-options: -DTARGET=@llvm_target@
cc-options: @llvm_cppflags@
I do not know whether the Haskell code also needs the preprocessor
definitions that are intended for the C++ compiler. If yes, then
@llvm_cppflags@ must remain in cpp-options.
With this change the Haskell modules and the cbits can be compiled, but I
get the linker error:
/usr/local/llvm-3.0/lib/libLLVMipo.a(IPO.o): In function `LLVMAddAlwaysInlinerPass':
IPO.cpp:(.text+0x410): multiple definition of `LLVMAddAlwaysInlinerPass'
dist/build/cbits/extra.dyn_o:extra.cpp:(.text+0x1440): first defined here
/usr/local/llvm-3.0/lib/libLLVMScalarOpts.a(Scalar.o): In function `LLVMAddBasicAliasAnalysisPass':
Scalar.cpp:(.text+0x260): multiple definition of `LLVMAddBasicAliasAnalysisPass'
dist/build/cbits/extra.dyn_o:extra.cpp:(.text+0x13d0): first defined here
I can get rid of them by removing LLVMipo and LLVMScalarOpts from the
generated llvm-base.buildinfo and continue installation with
$ cabal build; cabal haddock; cabal copy; cabal register
I do not know, why the libraries LLVMipo and LLVMScalarOpts were added to
Extra-Libraries.
More information about the Haskell-llvm
mailing list