aws / amazon-ssm-agent

An agent to enable remote management of your EC2 instances, on-premises servers, or virtual machines (VMs).
https://aws.amazon.com/systems-manager/
Apache License 2.0
1.04k stars 323 forks source link

failed to build on debian ARM64 (aarch64) using docker. #335

Closed qxmips closed 3 years ago

qxmips commented 3 years ago
root@ip-10-1-10-50:/tmp/ssm/amazon-ssm-agent# lscpu
Architecture:        aarch64
Byte Order:          Little Endian
CPU(s):              2
On-line CPU(s) list: 0,1
Thread(s) per core:  1
Core(s) per socket:  2
Socket(s):           1
NUMA node(s):        1
Vendor ID:           ARM
Model:               1
Stepping:            r3p1
BogoMIPS:            243.75
L1d cache:           64K
L1i cache:           64K
L2 cache:            1024K
L3 cache:            32768K
NUMA node0 CPU(s):   0,1
Flags:               fp asimd evtstrm aes pmull sha1 sha2 crc32 atomics fphp asimdhp cpuid asimdrdm lrcpc dcpop asimddp ssbs
 docker run -it --rm --name ssm-agent-build-container -v `pwd`:/amazon-ssm-agent ssm-agent-build-image make build-release
....
.....
# command-line-arguments
loadinternal: cannot find runtime/cgo
/usr/local/go/pkg/tool/linux_arm64/link: running gcc failed: exit status 1
gcc: error: unrecognized command line option '-m64'

make: *** [makefile:114: build-any-amd64-linux] Error 2
VishnuKarthikRavindran commented 3 years ago

Thanks for reaching us. Could you please try using the latest source code from Github for building this and check whether this issue still persists?

qxmips commented 3 years ago

Hi @VishnuKarthikRavindran . that what i used previously. tried again. same:

root@ip-10-1-10-50:~/amazon-ssm-agent# git branch
* mainline
root@ip-10-1-10-50:~/amazon-ssm-agent# git log
commit a326e1231b70e72722a72c6915bde277aa617e2a (HEAD -> mainline, tag: 3.0.502.0, origin/mainline, origin/HEAD)
Author: Vishnu Karthik Ravindran <rvivi@amazon.com>
Date:   Fri Dec 11 13:13:13 2020 -0500

    Updated release notes

    cr https://code.amazon.com/reviews/CR-40668755

....

testing on t4g.micro debian AMI.

VishnuKarthikRavindran commented 3 years ago

Can you please try running this command? Looks like the AMI is ARM based so just changed the make target

docker run -it --rm --name ssm-agent-build-container -v `pwd`:/amazon-ssm-agent ssm-agent-build-image make build-arm64 package-rpm-arm64

Thanks, Vishnu karthik. R

VishnuKarthikRavindran commented 3 years ago

Please reopen if it is not resolved still