Open LAfricain opened 3 years ago
this is a GDI printer. It requires a driver from manufacturer. It does not understand ANY standard format. you may try this: https://github.com/abhisekp/ricoh-sp100/tree/b9bcdb1ce45d982a89a5f672199ef7f305214ec0
Yes I know, my ppa provide this driver. But something is missing in the server edition, I would like to know which filter. It's working well on the desktop edition, probably the desktop install more package then the server. But I have no idea which one.
The problem is here:
D [16/Mar/2021:10:40:55 +0000] [Job 9] execv failed: Exec format error
D [16/Mar/2021:10:40:55 +0000] [Job 9] PID 49078 (/usr/lib/cups/filter/rastertolilo) stopped with status 108 (Exec format error)
D [16/Mar/2021:10:40:55 +0000] [Job 9] Hint: Try setting the LogLevel to "debug" to find out more.
It seems to be inside your rastertolilo
filter. Perhaps you need to try running this filter manually from the command line, on both Desktop and Server editions.
Is there perhaps a mismatch of platforms? For example running amd64 code on an i386 system?
I don't think about a mismatching platform, on the same raspberry pi it's working with the desktop version, but not with the server version.
@LAfricain could you run your rastertolilo
filter from the command line? Could you also run
file rastertolilo
Is perhaps your Desktop installation arm64 and your Server installation armhf (or vice versa)?
The filter executable rastertolilo in your deb package is i386, although it is packed into a amd64 package. Are you seriously running this on an arm platform?
I have no idea about platform, I help a French user on the ubuntu french forum, the only thing I can say it's working with the desktop and not with the server edition. It's not a question about platform. For this reason I opened this issue. Sorry for the lack of help.
Are you running the server edition and desktop edition both on a raspberry pi ?? Your ppa results in a package that installs an "all" architectures, but that does not mean that it will run on all architectures. The error message looks like a architecture / platform issue. Your binaries will only work on either i386 or on a amd64, nothing else.
Yes the problem is on the same computer, and is only with the server edition. The guy tested on two computers, with both server and desktop editions.
please paste the output of uname -a from both computers, and maybe also lshw -c cpu
Hi, I am the French guy. Here is the return of the commands. The first commands are those made from my Raspberry Pi, the 2nd are those made from my ubuntu Desktop 20.04. Thank you
Rpi Ubuntu 20.04 server :
pi@raspberrypi:~ $ uname -a
Linux raspberrypi 5.10.17-v7+ #1403 SMP Mon Feb 22 11:29:51 GMT 2021 armv7l GNU/Linux
pi@raspberrypi:~ $ sudo lshw -c cpu
*-cpu:0 description: CPU product: cpu physical id: 0 bus info: cpu@0 size: 1200MHz capacity: 1200MHz capabilities: half thumb fastmult vfp edsp neon vfpv3 tls vfpv4 idiva idivt vfpd32 lpae evtstrm crc32 cpufreq *-cpu:1 description: CPU product: cpu physical id: 1 bus info: cpu@1 size: 1200MHz capacity: 1200MHz capabilities: half thumb fastmult vfp edsp neon vfpv3 tls vfpv4 idiva idivt vfpd32 lpae evtstrm crc32 cpufreq *-cpu:2 description: CPU product: cpu physical id: 2 bus info: cpu@2 size: 1200MHz capacity: 1200MHz capabilities: half thumb fastmult vfp edsp neon vfpv3 tls vfpv4 idiva idivt vfpd32 lpae evtstrm crc32 cpufreq *-cpu:3 description: CPU product: cpu physical id: 3 bus info: cpu@3 size: 1200MHz capacity: 1200MHz capabilities: half thumb fastmult vfp edsp neon vfpv3 tls vfpv4 idiva idivt vfpd32 lpae evtstrm crc32 cpufreq
Ubuntu Desktop 20.04 :
inifaress@inifaress-Latitude-E5430-non-vPro:~$ uname -a
Linux inifaress-Latitude-E5430-non-vPro 5.8.0-50-generic #56~20.04.1-Ubuntu SMP Mon Apr 12 21:46:35 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux
inifaress@inifaress-Latitude-E5430-non-vPro:~$ sudo lshw -c cpu
*-cpu
description: CPU
produit: Intel(R) Core(TM) i5-3230M CPU @ 2.60GHz
fabricant: Intel Corp.
identifiant matériel: 51
information bus: cpu@0
version: Intel(R) Core(TM) i5-3230M CPU @ 2.60GHz
emplacement: SOCKET 0
taille: 1357MHz
capacité: 3200MHz
bits: 64 bits
horloge: 100MHz
fonctionnalités: lm fpu fpu_exception wp vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx rdtscp x86-64 constant_tsc arch_perfmon pebs bts rep_good nopl xtopology nonstop_tsc cpuid aperfmperf pni pclmulqdq dtes64 monitor ds_cpl vmx est tm2 ssse3 cx16 xtpr pdcm pcid sse4_1 sse4_2 x2apic popcnt tsc_deadline_timer aes xsave avx f16c rdrand lahf_lm cpuid_fault epb pti ssbd ibrs ibpb stibp tpr_shadow vnmi flexpriority ept vpid fsgsbase smep erms xsaveopt dtherm ida arat pln pts md_clear flush_l1d cpufreq
configuration : cores=2 enabledcores=2 threads=4
Thanks
Hi @jschwender @tillkamppeter @LAfricain
This topic is a bit old but the problem is still present. So I allow myself to revive the topic. Thank you for your help
@inifaress the desktop is amd64, therefore the driver executable works on it, the server is ARM and therefore the driver executable does not work on it.
The problem here is that the manufacturer provides a binary-only (closed-source) driver executable for the i386 platform. Such binaries can only get executed on i386 and amd64 platforms, not on completely different processor platforms like ARM.
A solution here could be an emulator, a software running on processor platform X and emulating processor platform Y. There are many free emulators around, like emulating a Commodore Amiga on amd64 or ARM platforms. Perhaps we are lucky that there is an i386 emulator which can be run on an ARM, would be slow if this exists, but for printing it would be good enough.
hi @tillkamppeter im on the same situation of @inifaress do you any idea of emulator that i can use on my raspbery pi to print thank you in advance
You can use qemu to emulate an x86 environment.
First you have to decide which distro to use. I just use the same debian my raspbian is based on by using lsb_release -c
. But you can also define it manually.
# get qemu user mode binaries
sudo apt install -y qemu-user-static binfmt-support
# create x86 debian base system. Hint: for older distros like stretch use http://archive.debian.org/debian
sudo mkdir -p /opt/qemu
sudo debootstrap --foreign --verbose --no-check-gpg --arch=i386 --include=libcups2,libcupsimage2 --variant=minbase $(lsb_release -sc) /opt/qemu/debian-i386 http://deb.debian.org/debian
# copy qemu static binary to debootstrapped system
sudo cp $(grep interpreter /proc/sys/fs/binfmt_misc/qemu-i386 | cut -d' ' -f 2) /opt/qemu/debian-i386/usr/bin/
# initialize debootstrapped system
sudo chroot /opt/qemu/debian-i386 /debootstrap/debootstrap --verbose --no-check-gpg --second-stage
Now that you have your emulated x86 debian, you just need to copy the rastertolilo file.
sudo mkdir -p /opt/qemu/debian-i386/usr/lib/cups/filter
sudo cp rastertolilo /opt/qemu/debian-i386/usr/lib/cups/filter/
sudo chown -R root:root /opt/qemu/debian-i386/usr/lib/cups
sudo chmod +x /opt/qemu/debian-i386/usr/lib/cups/filter/rastertolilo
Now you may check if it works
sudo chroot /opt/qemu/debian-i386 /usr/lib/cups/filter/rastertolilo
# cancel it by pressing ctrl+c
Now that you got the cups filter working, create a helper script to execute it
echo | sudo tee /usr/lib/cups/filter/rastertolilo << EOF
#!/usr/bin/env sh
sudo -n chroot /opt/qemu/debian-i386 \$0
exit \$?
EOF
sudo chmod +x /usr/lib/cups/filter/rastertolilo
All you have left to do is to allow user lp (which usually runs print jobs for cups) to run chroot
echo "lp ALL=(ALL) NOPASSWD: /usr/sbin/chroot" | sudo tee /etc/sudoers.d/011_lp-chroot
And that's about it. Happy printing!
@DannieDarko Thank you very much! This is a great HOWTO for getting a proprietary closed-source driver working when you are on the "wrong" architecture.
@tillkamppeter Thanks for the acknowledgement. I had the very same problem getting this Ricoh printer running with cups on a raspberry printserver some years ago. I ended up just using it as a shared raw printer and had the drivers installed in supported os like windows and macOS. These days I grew tired of not being able to use airprint and decided to give it another go. That's when I came up with the posted solution.
Hello, For a ricoh SP 211 on an Ubuntu server edition, the driver from this ppa is not working due to a missing filter. It's working perfectly on an desktop edition. I need your help because I have no idea which cups package is missing on the server edition. This is the /var/log/cups/error_log file:
A French post is opened on the Ubuntu forum.