3 ms·
Why wouldn't you just cross-compile Go programs, instead of compiling them from inside an x86 emulator? CGO?
by coder543 5y ago
Why wouldn't you just cross-compile Go programs, instead of compiling them from inside an x86 emulator? CGO?
- Nursie 5y agoBeing able to control the base platform is sometimes important - in this case the target is aws lambda, and even building on Ubuntu 20.10 we ended up with links to incompatible GlibC library versions compared to the lambda runtime environment. Quick fix for all of this - whatever platform you run the build on, do it in docker on the exact same base image that lambda uses at runtime. I know, you’re going to tell me there’s an easy way around this with cross-compilation. But when you already have docker available , quite often everything looks like a nail.