If dependencies use different versions of the `lunatic` compilation fails
bkolobara opened this issue · 0 comments
bkolobara commented
The error looks something like this:
= note: rust-lld: error: duplicate symbol: _lunatic_spawn_by_index
>>> defined in <project>/target/wasm32-wasi/debug/deps/liblunatic-5be2e6a3677e3780.rlib(lunatic-5be2e6a3677e3780.lunatic.39a91549-cgu.2.rcgu.o)
>>> defined in <project>/target/wasm32-wasi/debug/deps/liblunatic-9414a7eb552b5238.rlib(lunatic-9414a7eb552b5238.4nhn8gp7amf2rmyg.rcgu.o)
And it's related to exporting the _lunatic_spawn_by_index
function as an entry point for processes. So multiple of them can exist if different versions of lunatic are part of the same compilation target.
A solution could be to include the version number as part of the function name, that way two different versions would not conflict.