Apt addon does not work for armhf on arm64

The apt addon can be used to install packages of a different architecture, see for example https://github.com/bitcoin-core/secp256k1/blob/387d723c3f700990d1d22b643e53ba6e828635d5/.travis.yml#L44

However, the same does not work for arm64, see for example https://travis-ci.org/MarcoFalke/secp256k1/jobs/622882231#L62

I believe a call to dpkg --add-architecture armhf is needed before running the apt addon. See also https://github.com/travis-ci/travis-build/blob/67b1455810850cb372879d7c074666c7b70f192e/lib/travis/build/appliances/enable_i386.rb#L9

Does the hardware even support armhf? For reference, here’s a dump of /proc/cpuinfo and lscpu, it suggests that the processor is APM883832-X3. It has the fp flag but https://stackoverflow.com/questions/37790029/what-is-difference-between-arm64-and-armhf claims that an armhf-compliant CPU should rather have vfpv3 and that it’s a 32-bit architecture.


FWIW, you can run the necessary apt commands yourself – e.g. in the install: phase – and test.

I believe a call to dpkg --add-architecture armhf is needed before running the apt addon.

Possibly your suggestion makes sense for me.
Here is the default setting for Travis amd64 (x86_64) environment.

$ dpkg --print-architecture
amd64

$ dpkg --print-foreign-architectures
i386

see for example https://github.com/bitcoin-core/secp256k1/blob/387d723c3f700990d1d22b643e53ba6e828635d5/.travis.yml#L44

That’s the reason why this example worked.

For Travis arm64 environment, the result is like this.

$ dpkg --print-architecture
arm64

$ dpkg --print-foreign-architectures
 <= empty line.

However, the same does not work for arm64, see for example https://travis-ci.org/MarcoFalke/secp256k1/jobs/622882231#L62

That’s the reason this example did not work.

I think that the solution right now is to have own before_install or something for armhf case like this.

You can see https://github.com/junaruga/ci-multi-arch-native-test/blob/master/.travis.yml#L29-L46 , Travis log (arm32 case): https://travis-ci.org/junaruga/ci-multi-arch-native-test/builds/611526138

$ sudo dpkg --add-architecture armhf

$ dpkg --print-architecture
arm64

$ dpkg --print-foreign-architectures
armhf

$ sudo apt-get -yq install crossbuild-essential-armhf libc6:armhf
1 Like

Then you may want to vote on this feature request to make that possible:

Imprint