[cups] Still conceptually possible to use SCSI backend in latest CUPS?

Jörg Thümmler listen at vordruckleitverlag.de
Sun Feb 21 22:58:52 PST 2021


Am 20.02.21 um 18:47 schrieb Protea Wines Japan:
> On Fri, Feb 19, 2021 at 4:01 PM Johannes Meixner <jsmeix at suse.de> wrote:
> 
>>
>> Hello,
>>
>> On 2021-02-18 18:20, Protea Wines Japan wrote (excerpt):
>>> Is it conceptually still possible to compile
>>> the old scsi.c backend in CUPS 1.2
>>
>> conceptually a CUPS backend is an arbitrary program
>> that gets data and sends it to a recipient, see
>>
>> https://en.opensuse.org/SDB:Using_Your_Own_Backends_to_Print_with_CUPS
> 
> 
> Many thanks Johannes, I could tell from your document that there is nothing
> specifically preventing the SCSI backend from being used, provided it uses
> the right commands to the SCSI high-level driver.
> I spent some time reading up on the SCSI subsystem in linux again, and the
> sg3 high-level driver.
> It looks like the scsi.c file should still be compilable and usable as is,
> since it uses the sg_io_hdr which is what is currently used in sg3 also.
> 
> I ran into a problem with compiling though. I wonder if you or anyone
> familiar with the current (forked?) CUPS code can help:
> 
> hase at hase:~/src/CUPS-SCSI-Backend$ gcc -o scsi-backend scsi.c
> In file included from scsi.c:59:
> /usr/include/cups/i18n.h:18:12: fatal error: config.h: No such file or
> directory
>     18 | #  include "config.h"
>        |            ^~~~~~~~~~
> compilation terminated.
> 
> It looks like the CUPS header file config.h is missing. I am not sure where
> I should find this, I have all available development packages installed I
> think. Even downloading the Debian CUPS source package does not find this
> file although there are 2 config.h files in subsystem source trees:
> hase at hase:~/src/CUPS-SCSI-Backend/cups-2.3.3op2$ find . -name config.h
> ./vcnet/config.h
> ./xcode/config.h
> 
> As for linux, there are 2 config.h files in the source tree (none in the
> common headers):
> hase at hase:~/src/CUPS-SCSI-Backend/cups-2.3.3op2$ find
> /usr/src/linux-headers-5.10.0-3-amd64 -name config.h
> /usr/src/linux-headers-5.10.0-3-amd64/include/config/snd/intel/dsp/config.h
> /usr/src/linux-headers-5.10.0-3-amd64/include/config/pci/lockless/config.h
> 
> Best regards,
> Gernot Hassenpflug
> _______________________________________________
> cups mailing list
> cups at cups.org
> https://lists.cups.org/mailman/listinfo/cups
> 

Hi,

i'm in no case familiar with cups code ;-)

But your "gcc -o scsi-backend scsi.c" may need some -I<dir> option (see 
man gcc) as it may not find the config.h in its standard include path.

Or - another "blind shot" - you may have to install the kernel header 
files therefor. "i18n.h" sounds like an include a lot of programs will 
use so it may be will look for a "central" config.h...

At least a look into this i18n.h will maybe show, in which context the 
"config.h" is searched and that may give you a hint, which "config.h" to 
include.

Another way may be to use the "configure" feature (if cups-devel has 
that), which usually does the trick of writing of correct make files for 
compiling and then try to find a appropriate gcc line for some analogue 
backend compiling.

just my 2 ct...

-- 
cu

jth


More information about the cups mailing list