stack build failure with latest binaryen, missing symbol BinaryenSetAPITracing
dboreham opened this issue · 4 comments
Describe the bug
Build failure due to missing symbol BinaryenSetAPITracing
in dependency binaryen when building current master.
To Reproduce
- Build binaryen from source, current master branch, install to
/usr/local
- Configure stack to search
/usr/local/lib
,/user/local/include
for dependencies. stack build asteruis
- Build fails with:
ghc: /home/david/.stack/snapshots/x86_64-linux-custom-asterius/8551c03968af719bdb99fb984222676ee8c9f976dd9ff465ed29268cd6315879/8.8.3/lib/x86_64-linux-ghc-8.8.3/binaryen-0.0.1.1-3RzwdaqM8GX9qlWxJ5nYKV/HSbinaryen-0.0.1.1-3RzwdaqM8GX9qlWxJ5nYKV.o: unknown symbol `BinaryenSetAPITracing'
ghc: unable to load package `binaryen-0.0.1.1'
Completed 4 action(s).
-- While building package asterius-0.0.1 using:
/home/david/.stack/setup-exe-cache/x86_64-linux-custom-asterius/Cabal-simple_mPHDZzAJ_3.0.1.0_ghc-8.8.3 --builddir=.stack-work/dist/x86_64-linux-custom-asterius/Cabal-3.0.1.0 build lib:asterius exe:Setup-ghc-prim exe:ahc exe:ahc-ar exe:ahc-boot exe:ahc-cabal exe:ahc-dist exe:ahc-ld exe:ahc-link exe:ahc-pkg exe:genconstants exe:unlit --ghc-options " -fdiagnostics-color=always"
Process exited with code: ExitFailure 1
Expected behavior
Build succeeds.
Environment
- Ubuntu 18.04 x64
- f55fc4f
Additional context
Apologies my haskell-fu is weak.
- The function
BinaryenSetAPITracing
was removed from binaryen as of v94. - Since it seems to not be mission-critical, I looked for references to it in asterius that I could comment out, but:
david@blackcube:~/projects/asterius (master)$ grep -R BinaryenSetAPITracing *
david@blackcube:~/projects/asterius (master)$
Workaround: use v93 of binaryen.
I ran into the same issue and workaround as well (only difference is xubuntu 20.04 x64).
@dboreham @TerrorJack I am getting a similar error when trying to install asterius from source. The package that can't be loaded is binaryen-0.0.2.0
and the missing symbol is BinaryenTypeExternref
when using the binaryen version from apt and BinaryenBlockGetChild
when using the binaryen version from current github master. It does work with version 94 of binaryen though.
fwiw since filing this issue I've found that the problem I reported appears to be fixed. I can build the latest master version of asterius against binaryen at its latest tag (version_95). Also fwiw the latest asterius now won't build against binaryen version_93, so you need to be careful to have the right version. Also fwiw I found that binaryen master head didn't work, so ymmv.
@anfelor I would be wary of using any code from apt in this context. I had to build everything from source on Ubuntu to succeed, and be careful to have the latest versions of ghc, stack, cabal. Basically any time I followed a widely cited document on Haskell tooling installation, nothing worked ;)