1

I've tried to use a CUPS filter compiled for x86 on Raspbian, however when I send a printing task I always get this reply.

/usr/lib/cups/filter/rastertg failed

I would like to know if there is a way I can use this CUPS filter compiled for x86 on Raspbian which runs on ARM?

Thank you.

1

Not really. You can't run an executable compiled for one processor type on another processor.

You could use Qemu to emulate an x86 processor, and install an x86 system that you run in Qemu, and set up all the plumbing. This would be a lot of work to set up, and it would be slow and memory-hungry. I mention it for completeness, not as a practical solution.

Qemu can also be used to emulate another processor to run a binary transparently. There's a tutorial for Debian. I've never done this, I don't know how easy it is to set up. Note that most literature on this topic will be to run arm or mips or ppc on x86, you're doing the opposite (x86 on arm).

The most practical solution is to compile that filter for your system. You can either do the compilation on your Pi or use a cross-compiler on a PC. There are several ABIs for ARM, so make sure to use a cross-compiler for Raspbian.

If you don't have the source of that filter, ask the printer manufacturer for a suitable binary, or look for an alternative, open-source driver. As a last resort, use a PC to print.

  • Couldn't we minimize Qemu hungriness for resources by using some Linux OS that only has a CUPS service? – Fábio Antunes Oct 29 '14 at 1:58
  • @FábioAntunes You wouldn't even need to run CUPS in the x86 virtual machine, only that rastertg program. – Gilles Oct 29 '14 at 9:40
  • I'm new to Qemu, could you please confirm if this operational procedure would be accurate? I would start by setting up a minimal instance of Debian 7 i386 on Qemu. Then I would load it every time the host system boots with crontab. Would it then safe to assume that when the host CUPS "calls up" rastertg would he be directed to run through Qemu and work as expected? Meaning if I were to call ./i386binary on a terminal after loading Qemu would the binary run normally. – Fábio Antunes Oct 29 '14 at 10:49
  • @FábioAntunes No: Qemu creates a virtual machine, you would need quite a bit of additional work to send the information to and from the rastertg process which is running inside the VM. It's also possible to run Qemu to run one binary though, and this is what you should do here if you want to go the Qemu route. There's a tutorial for Debian. – Gilles Oct 29 '14 at 11:18
  • Thank you. I will try it as soon Raspbian finishes compiling the core of the project, which should be in two days. – Fábio Antunes Oct 29 '14 at 11:45

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.