Porting TalkFFI / LibClang to Pharo 5 UFFI

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Porting TalkFFI / LibClang to Pharo 5 UFFI

Ben Coman
Looks like I've been reinventing the wheel making an FFI interface to libclang.  I just bumped into Ciprian's TalkFFI which provides a NativeBoost interface to libclang (and was used to create libgit2 bindings)

* https://rochiamaya.wordpress.com/2013/07/30/create-bindings-with-talkffi/
* http://smalltalkhub.com/#!/~CipT/TalkFFI
* http://smalltalkhub.com/#!/~CipT/LibClang

But it is NativeBoost based and the Configuration loads AsmJit and NativeBoost packages, which seems to lock up while "Initializing Nativeboost."  What is involved in porting TalkFFI to Pharo 5.0 UFFI?

For a start, these can be manually load no problem... 
  LibClang-FFI-Types-CiprianTeodorov.2 
  LibClang-Tests-CiprianTeodorov.5
  LibClang-Examples-CiprianTeodorov.2

but loading LibClang-FFI-Binding-CiprianTeodorov.1
reports "This package depends on the following classes:
  CLLibraryMap
  CLExternalLibraryWrapper
You must resolve these dependencies before you will be able to load these definitions: 
  CXIndexH"

which I found these in TalkFFI-Runtime-CiprianTeodorov.7, but loading this
reports "This package depends on the following classes:
  NBExternalLibraryWrapper
You must resolve these dependencies before you will be able to load these definitions: 
  CLExternalLibraryWrapper

which I see is in Pharo 4.0 and not Pharo 5.0.  So what is the replacement for NBExternalLibraryWrapper?
What are the other general patterns for porting NativeBoost apps to UFFI?

cheers -ben



Reply | Threaded
Open this post in threaded view
|

Re: Porting TalkFFI / LibClang to Pharo 5 UFFI

Ben Coman


On Sat, Sep 10, 2016 at 3:14 PM, Ben Coman <[hidden email]> wrote:
Looks like I've been reinventing the wheel making an FFI interface to libclang.  I just bumped into Ciprian's TalkFFI which provides a NativeBoost interface to libclang (and was used to create libgit2 bindings)

* https://rochiamaya.wordpress.com/2013/07/30/create-bindings-with-talkffi/
* http://smalltalkhub.com/#!/~CipT/TalkFFI
* http://smalltalkhub.com/#!/~CipT/LibClang

But it is NativeBoost based and the Configuration loads AsmJit and NativeBoost packages, which seems to lock up while "Initializing Nativeboost."  What is involved in porting TalkFFI to Pharo 5.0 UFFI?

For a start, these can be manually load no problem... 
  LibClang-FFI-Types-CiprianTeodorov.2 
  LibClang-Tests-CiprianTeodorov.5
  LibClang-Examples-CiprianTeodorov.2

but loading LibClang-FFI-Binding-CiprianTeodorov.1
reports "This package depends on the following classes:
  CLLibraryMap
  CLExternalLibraryWrapper
You must resolve these dependencies before you will be able to load these definitions: 
  CXIndexH"

which I found these in TalkFFI-Runtime-CiprianTeodorov.7, but loading this
reports "This package depends on the following classes:
  NBExternalLibraryWrapper
You must resolve these dependencies before you will be able to load these definitions: 
  CLExternalLibraryWrapper

which I see is in Pharo 4.0 and not Pharo 5.0.  So what is the replacement for NBExternalLibraryWrapper?
What are the other general patterns for porting NativeBoost apps to UFFI?


For discussion I've compiled a rough comparison of classes of NativeBoost and UFFI.  Quite a bit of guesswork though.  Feel free to edit.  Probably could be slimmed by removing less significant classes like tests and OS specific classes.  

cheers -ben