FS#67154 - [tinygo] Wasm builds fail
Attached to Project:
Community Packages
Opened by lu4p (lu4p) - Tuesday, 30 June 2020, 15:15 GMT
Last edited by Anatol Pomozov (anatolik) - Thursday, 02 July 2020, 17:23 GMT
Opened by lu4p (lu4p) - Tuesday, 30 June 2020, 15:15 GMT
Last edited by Anatol Pomozov (anatolik) - Thursday, 02 July 2020, 17:23 GMT
|
Details
Description:
Missing lld dependency, leads to failing wasm builds. Additional info: * package version(s) * config and/or log files etc. * link to upstream bug report, if any Steps to reproduce: Create this file main.go: ``` package main // This calls a JS function from Go. func main() { println("adding two numbers:", add(2, 3)) // expecting 5 } // This function is imported from JavaScript, as it doesn't define a body. // You should define a function named 'main.add' in the WebAssembly 'env' // module from JavaScript. func add(x, y int) int // This function is exported to JavaScript, so can be called using // exports.multiply() in JavaScript. //go:export multiply func multiply(x, y int) int { return x * y; } ``` Run: ``` tinygo build -o wasm.wasm -target wasm ./main.go ``` Output: ``` error: failed to link /tmp/tinygo930068771/main: none of these commands were found in your $PATH: wasm-ld-10 wasm-ld ``` This error occurs because the executable `/usr/bin/wasm-ld` is missing, it is part of the `lld` package. |
This task depends upon
Closed by Anatol Pomozov (anatolik)
Thursday, 02 July 2020, 17:23 GMT
Reason for closing: Implemented
Additional comments about closing: r657501
Thursday, 02 July 2020, 17:23 GMT
Reason for closing: Implemented
Additional comments about closing: r657501
Yes in this case "lld" should be in the dependency list for "tinygo". @lu4p, if you install "lld" does it resolve your problems with WASM?