Can you please consider adding static builds to the Github Releases? Thanks! I'm more than capable of building a static version myself but the time and effort to do so is a bit large for me right now.
There are already (mostly) static builds in GitHub Releases. Do they not work on your system?
There are already (mostly) static builds in GitHub Releases. Do they not work on your system?
Yeah the last release I tried didn't work; I don't think they're completely statically linked? I can try the latest release and report back...
As I've seen before these aren't really statically linked:
# ./bin/tinygo
-sh: ./bin/tinygo: not found
# ldd ./bin/tinygo > ldd.log 2>&1
# wc -l ldd.log
2958 ldd.log
# head ldd.log
/lib64/ld-linux-x86-64.so.2 (0x7f93c3284000)
Error loading shared library libstdc++.so.6: No such file or directory (needed by ./bin/tinygo)
librt.so.1 => /lib64/ld-linux-x86-64.so.2 (0x7f93c3284000)
libdl.so.2 => /lib64/ld-linux-x86-64.so.2 (0x7f93c3284000)
libpthread.so.0 => /lib64/ld-linux-x86-64.so.2 (0x7f93c3284000)
libm.so.6 => /lib64/ld-linux-x86-64.so.2 (0x7f93c3284000)
Error loading shared library libgcc_s.so.1: No such file or directory (needed by ./bin/tinygo)
libc.so.6 => /lib64/ld-linux-x86-64.so.2 (0x7f93c3284000)
Error loading shared library ld-linux-x86-64.so.2: No such file or directory (needed by ./bin/tinygo)
Error relocating ./bin/tinygo: _ZSt15set_new_handlerPFvvE: symbol not found
#
No they aren't statically linked, but the most important library we use (LLVM) is statically linked.
What system are you running that all these libraries are not available? Especially this error confuses me:
Error loading shared library ld-linux-x86-64.so.2: No such file or directory (needed by ./bin/tinygo)
What system are you running that all these libraries are not available?
Reading that page (from Google Cache because the website is down) it doesn't seem like a distribution for normal usage - it doesn't even seem to support modern compilers (GCC/Clang). I'm not sure we can support such exotic systems.
That said, I do think it is worthwhile to try to get the TinyGo release builds linked entirely statically: it would avoid a number of issues with making the binary portable across Linux distributions (see #342 and #1064 for example).
I'm investigating that option by building TinyGo on Alpine Linux (which AFAIK doesn't link statically by default but makes that a whole lot easier).
Reading that page (from Google Cache because the website is down) it doesn't seem like a distribution for normal usage - it doesn't even seem to support modern compilers (GCC/Clang). I'm not sure we can support such exotic systems.
Sorry about the "offline"-ness. I'm rebuilding the VM that runs the Website.
And yes you are right. It is not designed for "everyday" use per se -- certainly not for Desktop use. I am the author and I am primarily designing it to directly replace RancherOS as the primary container distirbution. Which it already does quite well.
That said, I do think it is worthwhile to try to get the TinyGo release builds linked entirely statically: it would avoid a number of issues with making the binary portable across Linux distributions (see #342 and #1064 for example).
I'm investigating that option by building TinyGo on Alpine Linux (which AFAIK doesn't link statically by default but makes that a whole lot easier).
This would be great. and the reason I raise this issue. Thank you for considing this!
Unfortunately, it appears impossible to use libclang with a statically linked musl. I get the following error:
Call to dladdr() failed
At these lines:
if (dladdr((void *)(uintptr_t)clang_createTranslationUnit, &info) == 0)
llvm_unreachable("Call to dladdr() failed");
It is called from here.
Maybe this is fixable in libclang, I'm not sure. Please let me know if you have any ideas how to proceed.
EDIT: also reported here: https://github.com/iovisor/bpftrace/issues/911