Skip to content

Example requires setting wasm_multi_value#1715

Closed
plicease wants to merge 1 commit intobytecodealliance:masterfrom
perlwasm:graham/fix-example
Closed

Example requires setting wasm_multi_value#1715
plicease wants to merge 1 commit intobytecodealliance:masterfrom
perlwasm:graham/fix-example

Conversation

@plicease
Copy link
Contributor

This example doesn't work without setting the wasm_multi_value option on the config object.

@alexcrichton
Copy link
Member

In theory this is no longer needed since #1667, were you testing with an older version of the wasmtime C API though?

@plicease
Copy link
Contributor Author

Originally I was trying it will 0.16.0, but I get the same thing with 8f2d442

helix% gcc -I/Users/ollisg/opt/wasmtime/dev-8f2d442/include examples/multi.c -L/Users/ollisg/opt/wasmtime/dev-8f2d442/lib -lwasmtime
helix% ./a.out 
Initializing...
Compiling module...
error: failed to compile module
invalid result arity: func type returns multiple values (at offset 41)

@alexcrichton
Copy link
Member

Hm so testing master I can get the panic you reproted in #1716, but I don't get invalid result arity: func type returns multiple values (at offset 41). Are you sure there wasn't a mixup of which version of wasmtime was installed where?

@alexcrichton
Copy link
Member

(also if you're linking dynamically, are you sure that the library at link-time is also selected at load-time?)

@plicease
Copy link
Contributor Author

(also if you're linking dynamically, are you sure that the library at link-time is also selected at load-time?)

Ah yes. I updated the flags to the compiler but forgot to update the dynamic linker path.

@plicease plicease closed this May 15, 2020
@plicease plicease deleted the graham/fix-example branch May 15, 2020 20:57
@plicease
Copy link
Contributor Author

This was my goof, but it would have been easier to diagnose if the version information were available in the dynamic library (and the .h file for C/C++). I'd love to see something implemented for #986

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants