Crossbuilding Ruby packages
This is a TODO list for being able to cross-build Ruby packages.
Source package |
Required change change |
Notes |
Status |
vpim |
B-D on ruby-setup |
|
done |
ruby-rmagick |
B-D on ruby-setup |
|
in git |
ruby-tioga |
B-D on ruby-setup |
|
done |
gem2deb |
Architecture: all → any |
|
in git |
gem2deb |
Depends: build-essential → Recomments |
|
in git |
gem2deb |
Depends: ruby -> ruby:any |
² |
|
gem2deb |
Depends: perl -> perl:any |
|
|
gem2deb |
Depends: python3-debian → Recommends (? - needs to test) |
|
in git |
gem2deb |
remove Depends: ruby-setup |
¹ |
|
ruby-defaults |
ruby Architecture: all → any |
|
done |
ruby-defaults |
ruby Multi-Arch: allowed |
|
done |
rubyX.Y |
rubyX.Y Build-Depends: ruby should be ruby:native |
|
|
¹ move dependency to packages actually using it (--buildsystem=rubysetuprb)
- ² do nor upload this change before the updated ruby-defaults has hit testing
cross building ruby2.3
After appending :native to the Build-Depends: ruby, the only missing piece to satisfying Build-Depends is openssl. It is not clear whether openssl should be Multi-Arch: foreign. If it should, ruby2.3 should do nothing about it. If it shouldn't, ruby2.3 Build-Depends: openssl should gain :native as well.
Building fails somewhere during make install. While the build is verbose installation isn't. Fix:
sed -i -e '/MAKE.*install/s/$/ V=1/' ruby2.3-*/debian/rules
The actual issue happens in ext/ripper where the all target depends on check. Apparently check is run with RUBY set to the host arch ruby, which fails. The build succeeds when skipping the check target (but it is not clear whether the results are good).
Notes
to cross build, use sbuild --host=${foreign_arch}
longer version: CrossCompiling
