FOSDEM: Multiarch on Debian and Ubuntu
FOSDEM: Multiarch on Debian and Ubuntu
Posted Mar 7, 2012 0:18 UTC (Wed) by fest3er (guest, #60379)In reply to: FOSDEM: Multiarch on Debian and Ubuntu by khim
Parent article: FOSDEM: Multiarch on Debian and Ubuntu
... it's much simpler to put bunch of files in a single directory with appropriately named subdirectories and use some script to select proper binary.
I did this many years ago. Built binaries for SunOS (68k and SPARC), Solaris (SPARC), SysV68 (68k), SysV88 (88k), HPUX (PA-RISC) and Irix (MIPS). Put them in suitably-named subdirs and wrote a shell script that worked on all of them (though HPUX was problematic) that discovered the architecture and exec'ed the correct binary. NFS-mounted the dir everywhere; people then had the same programs at the same path regardless of which system they were using.
True multi-arch binary data files can be a pain to lay out. Especially when structs are involved. It's hard, but it can be done. We had a DB program on 68k. Worked great. But on 88k it didn't work. Many assumptions were made about where members were put and how things were aligned. We ended up using 'fillers' to force alignment. After that, the data files were usable on 68k and 88k, both big-endian. But I would expect that hton*() and ntoh*() would solve most of the endianness problems.
But, first things first. Get the library locations standardized. The rest will probably pert near fall into place.
