Hey Group,
I’m in search of some recommendation on cross-compiling a Go utility for ARM64 the place CGO_ENABLED=1.
We beforehand tackled a runtime subject in AWS Lambda associated to lacking shared libraries (libpcsclite.so.1). The repair concerned utilizing an Amazon Linux 2 base picture, putting in the required libraries, and manually copying them into our deployment bundle.
Now, the problem is constructing the ARM64 binary from our Jenkins agent, which runs on AMD64. Since we’d like CGO_ENABLED=1, I’m a bit misplaced on which cross-compiler (CC) I ought to be utilizing to accurately goal the ARM64 structure on this setup.
Any ideas or advisable approaches can be tremendous useful!
i used arm-linux-gnueabihf-gcc
on ubuntu,maye be it may make it easier to
you may set up with sudo apt-get set up gcc-arm-linux-gnueabihf
or in your mac brew set up FiloSottile/musl-cross/musl-cross --without-x86_64 --with-arm