Wrong binary format for CMake installed as an addon on ARM64-Graviton2

TravisCI installs x86_64 version of cmake on arm64-graviton2 VM: https://travis-ci.com/github/martin-g/activemq-artemis-native/jobs/448644561

See line 329:

 file `which cmake`

/usr/local/cmake-3.16.8/bin/cmake: ELF 64-bit LSB executable, x86-64, version 1 (GNU/Linux), dynamically linked, interpreter /lib64/ld-linux-x86-64.so.2, for GNU/Linux 2.6.18, BuildID[sha1]=18acaba09a959ae279851b03918f53ff81c6b4da, stripped

At line 144 is says that installs arm64 version:

Get:4 http://ports.ubuntu.com/ubuntu-ports focal/main arm64 cmake arm64 3.16.3-1ubuntu1 [3,115 kB]

There is no such issue with arch: arm64, i.e. the old ARM64 VMs.

I noticed that you are installing cmake with apt-get. In my tests, I see that cmake binary is correct. You could work around this bug by explicitly calling it at /usr/bin/cmake or by removing the x86_64 version from the path with something like chmod a-x /usr/local/cmake-*/bin/cmake.

1 Like