Closed jacobschloss closed 1 year ago
Manually setting zcm/DEBIAN/control.in Architecture line to arm64 did allow creating an installable ./build/zcm_1.1.5_arm64.deb file.
Looks like waf can detect the platform in ctx.env.DEST_CPU, so maybe possible with a variable substitution?
Adding this to the wscript:
print('waf thinks platform is: {:s}'.format(ctx.env.DEST_CPU))
prints out
waf thinks platform is: aarch64
So the platform is being detected correctly. Would need to add the substitution to control.in and map from waf platform names to debian control file platform names.
Ok basic detection for aarch64 and amd64 seems to work:
https://github.com/suburbanmarine/zcm/commit/6664f5c798053d1cf4fb49e21dcfdd2b92d5f72b
When building the debian package with ./scripts/make_debian_package.sh, the created package uses a control file with the architecture hard-coded to amd64. The prevents use of the package on aarch64, even though it was built locally on a aarch64 host.
Eg, installing gives this error:
Using a detected architecture from eg dpkg --print-architecture, or something at configure time might be better (but this won't work during cross compile - I know how to set this for a cmake based cross packing system, but not waf + scripts)