我们正尝试在Golang for ARM64中使用ACRCloud sdk构建docker映像。
我们能够为amd 64和linux两种版本构建sdk,包括拉伸版本和高山版本。 但是,当我们尝试同时使用gcc和gnueabi编译器为arm64构建它时,我们会看到:
golang:1.12和使用gnueabihf编译器的高山docker镜像:
Step 17/32 : RUN go build -o $GOPATH/pkg/linux_arm64/acrcloud.a
---> Running in a1150605660a
<span># runtime/cgo</span>
In file included from _cgo_export.c:4:0:
cgo-gcc-export-header-prolog:25:14: error: size of array '_check_for_64_bit_pointer_matching_GoInt' is negative
.
.
.
使用gcc编译器的golang:1.12.4-alpine3.9和golang:1.12图像
span>TERM='dumb' gcc -I . -fPIC -pthread -fmessage-length=0 -fdebug-prefix-map=$WORK/b059=/tmp/go-build -gno-record-gcc-switches -I $WORK/b059/ -g -O2 -Wall -Werror -o $WORK/b059/_x012.o -c gcc_arm64.S</span>
<span># runtime/cgo</span>
gcc_arm64.S: Assembler messages:
gcc_arm64.S:27: Error: no such instruction: `stp x19,x20,[sp,'
gcc_arm64.S:28: Error: no such instruction: `stp x21,x22,[sp,'
.
.
.
我在这里提供了Linux的最新编译二进制文件: https://github.com/acrcloud/acrcloud_sdk_golang/tree/master/linux/x86-64/acrcloud
请告知我们如何前进。请让我知道您需要什么其他信息/日志。