# Kernel headers not available in ppc64 and arm64

**URL:** <https://travis-ci.community/t/kernel-headers-not-available-in-ppc64-and-arm64/5974>\
**Category:** Multi CPU Architecture\
**Tags:** build-env, bug\
**Created:** [November 15, 2019, 8:03pm UTC](https://travis-ci.community/t/kernel-headers-not-available-in-ppc64-and-arm64/5974 "2019-11-15T20:03:43Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![djlwilder](https://sea1.discourse-cdn.com/flex015/user_avatar/travis-ci.community/djlwilder/32/3352_2.png) [@djlwilder](https://travis-ci.community/u/djlwilder)\
**Post date:** [November 15, 2019, 8:03pm UTC](https://travis-ci.community/t/kernel-headers-not-available-in-ppc64-and-arm64/5974/1 "2019-11-15T20:03:43Z")

</div>

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 ??)

> **[Travis CI - Test and Deploy Your Code with Confidence](https://travis-ci.org/djlwilder/hello-world/builds/612534813)**

Thanks

---

<div class="post-metadata">

**Author:** ![native-api](https://sea1.discourse-cdn.com/flex015/user_avatar/travis-ci.community/native-api/32/430_2.png) [@native-api](https://travis-ci.community/u/native-api)\
**Post date:** [November 15, 2019, 8:18pm UTC](https://travis-ci.community/t/kernel-headers-not-available-in-ppc64-and-arm64/5974/3 "2019-11-15T20:18:03Z")

</div>

I’ve checked this. [Stock Ubuntu repo for arm64](http://ports.ubuntu.com/ubuntu-ports/dists/xenial-updates/main/binary-arm64/Packages.gz) 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.

---

<div class="post-metadata">

**Author:** ![ghatwala](https://sea1.discourse-cdn.com/flex015/user_avatar/travis-ci.community/ghatwala/32/4342_2.png) [@ghatwala](https://travis-ci.community/u/ghatwala)\
**Post date:** [November 25, 2019, 7:23am UTC](https://travis-ci.community/t/kernel-headers-not-available-in-ppc64-and-arm64/5974/4 "2019-11-25T07:23:52Z")

</div>

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](https://travis-ci.com/ghatwala/checking-headers/builds/138002760) .

---

<div class="post-metadata">

**Author:** ![ghatwala](https://sea1.discourse-cdn.com/flex015/user_avatar/travis-ci.community/ghatwala/32/4342_2.png) [@ghatwala](https://travis-ci.community/u/ghatwala)\
**Post date:** [November 25, 2019, 9:47am UTC](https://travis-ci.community/t/kernel-headers-not-available-in-ppc64-and-arm64/5974/5 "2019-11-25T09:47:09Z")

</div>

**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](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](https://travis-ci.com/ghatwala/checking-headers/builds/138019863)

---

<div class="post-metadata">

**Author:** ![djlwilder](https://sea1.discourse-cdn.com/flex015/user_avatar/travis-ci.community/djlwilder/32/3352_2.png) [@djlwilder](https://travis-ci.community/u/djlwilder)\
**Post date:** [December 6, 2019, 10:27pm UTC](https://travis-ci.community/t/kernel-headers-not-available-in-ppc64-and-arm64/5974/6 "2019-12-06T22:27:44Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![junaruga](https://sea1.discourse-cdn.com/flex015/user_avatar/travis-ci.community/junaruga/32/8943_2.png) [@junaruga](https://travis-ci.community/u/junaruga)\
**Post date:** [December 9, 2019, 8:08pm UTC](https://travis-ci.community/t/kernel-headers-not-available-in-ppc64-and-arm64/5974/7 "2019-12-09T20:08:21Z")

</div>

> [@djlwilder](#):
>
> 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?

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`)

```auto
matrix:
  include:
    - arch: amd64
      dist: xenial
    - arch: ppc64le
      dist: bionic
    - arch: arm64
      dist: bionic

```

---

<div class="post-metadata">

**Author:** ![djlwilder](https://sea1.discourse-cdn.com/flex015/user_avatar/travis-ci.community/djlwilder/32/3352_2.png) [@djlwilder](https://travis-ci.community/u/djlwilder)\
**Post date:** [December 9, 2019, 11:28pm UTC](https://travis-ci.community/t/kernel-headers-not-available-in-ppc64-and-arm64/5974/8 "2019-12-09T23:28:10Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![ghatwala](https://sea1.discourse-cdn.com/flex015/user_avatar/travis-ci.community/ghatwala/32/4342_2.png) [@ghatwala](https://travis-ci.community/u/ghatwala)\
**Post date:** [December 10, 2019, 9:18am UTC](https://travis-ci.community/t/kernel-headers-not-available-in-ppc64-and-arm64/5974/9 "2019-12-10T09:18:58Z")

</div>

> [@djlwilder](#):
>
> Unless there is a way to specify the os version per arch?

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](https://github.com/ghatwala/checking-headers/blob/master/.travis.yml)  
Travis job link - [https://travis-ci.com/ghatwala/checking-headers/builds/140377560](https://travis-ci.com/ghatwala/checking-headers/builds/140377560)

---

<div class="post-metadata">

**Author:** ![sonals](https://avatars.discourse-cdn.com/v4/letter/s/b3f665/32.png) [@sonals](https://travis-ci.community/u/sonals)\
**Post date:** [September 14, 2020, 3:51am UTC](https://travis-ci.community/t/kernel-headers-not-available-in-ppc64-and-arm64/5974/10 "2020-09-14T03:51:20Z")

</div>

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](https://travis-ci.org/github/sonals/XRT/jobs/726863801)
