How would one setup a .travis.yml to do cross compilation for MIPS target ? For PowerPC, this is trivial:
addons:
apt:
packages:
- gcc-powerpc-linux-gnu
Since I have access to the package directly.
For MIPS I cannot find a compiler for it in Ubuntu Trusty:
Even though it appears to be whitelisted:
It seems I would need an updated Ubuntu image (not possible on Travis):
The alternate solution would be to use some pre-build MIPS compiler, eg:
But documentation rather explicitely says not to cache those things:
Large files that are quick to install but slow to download do not benefit from caching, as they take as long to download from the cache as from the original source:
- Android SDKs
- Debian packages
- JDK packages
- Compiled binaries
- Docker images
How would you install a mips cross compiler on the default Ubuntu Travis image ?
Update I tried a naive solution:
addons:
apt:
sources:
- debian-sid
packages:
- gcc-mips-linux-gnu
But this fails with:
dpkg-deb: error: archive '/var/cache/apt/archives/gcc-7-base_7.2.0-18_amd64.deb' has premature member 'control.tar.xz' before 'control.tar.gz', giving up
dpkg: error processing archive /var/cache/apt/archives/gcc-7-base_7.2.0-18_amd64.deb (--unpack):
subprocess dpkg-deb --control returned error exit status 2
It seems dpkg in Ubuntu/Trusty will not support those deb files:
It seems I cannot use container based because of this requirement, I gave up and simply used:
sudo: true
dist: trusty
addons:
apt:
packages:
- u-boot-tools
before_install:
- sudo add-apt-repository -y "deb http://archive.ubuntu.com/ubuntu/ xenial main universe"
- sudo apt-get -qq update
- sudo apt-get install -qq gcc-mips-linux-gnu
I am still intrigued by the fact that gcc-mips-linux-gnu is explicitly white-listed.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With