Closed dom96 closed 1 year ago
I've not looked at that at all so far. What did you change?
Setup.py to point at the -staticlib variant in cffi_modules
and an update to binaryen_extract_path
in build_ffi_module-staticlib.py.
I'm not super familiar with how setup.py operates. But maybe best approach is to look for "./binaryen" and if it doesn't exist fail with a nice error that explains to put the binaryen source code inside ./binaryen
? Downloading this automatically would also work but not sure how complex you wanna make it.
what's the reason you're not going with the default dynamic linked install?
As best as I could tell it required binaryen to be in /usr/include and I couldn't find a package that installed it there.
I build binaryen directly from source and it places its header files there when installed like that. Where are yours located? Maybe it's a good idea to add an alternative search location for the header files?
ahh, I didn't build binaryen directly. Does its build process automatically install the header files into /usr/include
?
What I did is just downloaded a release tarball and searched for a way to use it with this package :)
Hmm, it used to ... older builds did... but the current one installs to /usr/local/include
by default.
I haven't looked much into binaryen's build process though, I guess you can configure the install location. I guess distro maintainers might change this default if they supply a binaryen package.
For the default build of the python wrapper, setup.py chooses the dynamically linked build and expects the include files either in /usr/local/include or in /usr/include .
I don't know of another way to select the statically linked build, other than indeed manuall change the reference to the other cffi gen script in setup.py.
Just setup a CI for my project and ended up just downloading a Binaryen release, then symlinking the files manually into /usr/
. Created a PR to add instructions on how to do that :)
Thank you for putting this library together!
I had to end up editing the setup file to run the -staticlib variant manually for the install. Is there a better way?