[LLVMdev] LLVMInitializeNativeTarget error

Keith Sheppard keithshep at gmail.com
Sun May 29 10:57:24 PDT 2011


Hello All,

I'm building an F# binding for LLVM and it seems to be working for the
parts of Core and BitWriter that I've tested but I've hit problems
with Target/ExecutionEngine. The following test code works with the
initializeNativeTarget line commented out like so:

<https://github.com/keithshep/llvm-fs/blob/b7050b841108dc703e58563a4cff8845603c950d/test/simpletest2.fs>

... but if I uncomment the initializeNativeTarget line I get the
following error from mono:

Unhandled Exception: System.EntryPointNotFoundException:
LLVMInitializeNativeTarget
  at (wrapper managed-to-native)
LLVM.Generated.Target:initializeNativeTargetNative ()
  at Simpletest2.main (System.String[] _arg5) [0x00000] in <filename unknown>:0

I'm using LLVM on OS X 10.5 and since enable-shared is needed for use
with mono it was configured as:
./configure --enable-shared --prefix=/Users/keith/lib
--exec-prefix=/Users/keith/bin

The LLVM bindings are generated by my F# code so they are not in the
repo, but here is the Target binding for example:
<https://gist.github.com/997985>

Do you have any ideas for what I need to fix in order for
initializeNativeTarget to work?

Thanks for any suggestions,
Keith

-- 
keithsheppard.name



More information about the llvm-dev mailing list