douxidang9092 2019-05-06 19:27
浏览 376

如何为ARM构建Golang Acrcloud SDK

We are trying to build a docker image with ACRCloud sdk in Golang for ARM64.

We are able to build the sdk for amd 64 for linux, both on stretch and alpine flavors. But when we try building it for arm64 using both gcc and gnueabi compilers, we see:

golang:1.12 & alpine docker images using gnueabihf compiler:

Step 17/32 : RUN go build -o $GOPATH/pkg/linux_arm64/acrcloud.a
---> Running in a1150605660a
<span># runtime&#x2F;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
.
.
.

golang:1.12.4-alpine3.9 & golang:1.12 images using gcc compiler

span>TERM=&#x27;dumb&#x27; gcc -I . -fPIC -pthread -fmessage-length=0 -fdebug-prefix-map=$WORK&#x2F;b059=&#x2F;tmp&#x2F;go-build -gno-record-gcc-switches -I $WORK&#x2F;b059&#x2F; -g -O2 -Wall -Werror -o $WORK&#x2F;b059&#x2F;_x012.o -c gcc_arm64.S</span>‌
<span># runtime&#x2F;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,'
.
.
.

I have the latest compiled binaries for Linux you have provided here: https://github.com/acrcloud/acrcloud_sdk_golang/tree/master/linux/x86-64/acrcloud

Please advise how we can move forward. Please let me know what additional information/ logs you would need to do this.

  • 写回答

0条回答 默认 最新

    报告相同问题?

    悬赏问题

    • ¥15 sqlite 附加(attach database)加密数据库时,返回26是什么原因呢?
    • ¥88 找成都本地经验丰富懂小程序开发的技术大咖
    • ¥15 如何处理复杂数据表格的除法运算
    • ¥15 如何用stc8h1k08的片子做485数据透传的功能?(关键词-串口)
    • ¥15 有兄弟姐妹会用word插图功能制作类似citespace的图片吗?
    • ¥200 uniapp长期运行卡死问题解决
    • ¥15 latex怎么处理论文引理引用参考文献
    • ¥15 请教:如何用postman调用本地虚拟机区块链接上的合约?
    • ¥15 为什么使用javacv转封装rtsp为rtmp时出现如下问题:[h264 @ 000000004faf7500]no frame?
    • ¥15 乘性高斯噪声在深度学习网络中的应用