Kernel headers not available in ppc64 and arm64

Hi-

From travis.yml

<snip>
addons:
  apt:
    update: true
    packages:
      - linux-headers-$(uname -r)
<snip>

Log message:

E: Unable to locate package linux-headers-5.3.0-19-generic
E: Couldn't find any package by glob 'linux-headers-5.3.0-19-generic'
E: Couldn't find any package by regex 'linux-headers-5.3.0-19-generic'

Works ok on amd64, broken on arm64 and ppc64le (repo missing ??)

https://travis-ci.org/djlwilder/hello-world/builds/612534813

Thanks

1 Like

I’ve checked this. Stock Ubuntu repo for arm64 only has 4.x kernels and headers and stuff. But build machines use a 5.x kernel.

So whoever provides the build machines for Travis needs to provide a repo with corresponding packages for the nonstandard kernel(s) they use.

2 Likes

Rightly pointed out by @native-api , for the lxd back end based jobs

  • amd64 base image has 4.15.0-1028-gcp kernel

  • ppc64le , s390x ,arm64 base images have 5.0.0-23-generic kernel

Also seems kernel headers not available in “s390x” too - https://travis-ci.com/ghatwala/checking-headers/builds/138002760 .

Update :
@native-api , @djlwilder
Looks like these kernel headers are present after all in ppc64le , s390x and arm64 travis builds , however only for bionic distribution and are not present in default xenial travis default distribution .
read here about being available in bionic - https://packages.ubuntu.com/bionic-updates/linux-headers-5.0.0-23-generic
and travis job example to validate them being available on s390x,ppc64le,arm64 - https://travis-ci.com/ghatwala/checking-headers/builds/138019863

1 Like

Sorry for the delayed reply.
Thanks for the workaround, however this solution presents a problem. If a project’s community (who is doing developing mostly on amd) wants to test on a specific version of an os then this solution excludes other arches from testing on travis. Unless there is a way to specify the os version per arch?

I understand that different arches may need to support different kernel versions but it must be a requirement to provide the matching kernel headers.

1 Like

Though I am not sure I understand your concern correctly.
Here is the way to specify the os version (dist: foo) per arch (arch: bar)

matrix:
  include:
    - arch: amd64
      dist: xenial
    - arch: ppc64le
      dist: bionic
    - arch: arm64
      dist: bionic
2 Likes

thank you, that helps. I will give it a try.

There is a way to specify os version per arch in a matrix . for eg

matrix:
include:
- arch: amd64
dist: xenial
- arch: ppc64le
dist: bionic
- arch: arm64
dist: bionic
- arch: s390x
dist: bionic

Github repo link - https://github.com/ghatwala/checking-headers/blob/master/.travis.yml
Travis job link - https://travis-ci.com/ghatwala/checking-headers/builds/140377560

1 Like

For ppc64le neither Bionic nor Focal has the correct kernel-headers/linux-headers package available. ppc64le Bionic on Travis uses Linux kernel 5.4.28 – which incidentaly is not the standard Ubuntu kernel – but the kernel-headers are missing inside the LXD container so Linux kernel driver builds are failing.

Travis Job-- https://travis-ci.org/github/sonals/XRT/jobs/726863801

Imprint