Find the answer to your Linux question:
Results 1 to 8 of 8
Hello: This is my first posting. I am running Ubuntu 10.10 I bought a Citizen CDS500 receipt printer. I downloaded the driver file, extracted it and copied it to /work/ ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Apr 2011
    Posts
    5

    Question Citizen CDS500 Printer, Rastor File not Compiling


    Hello:

    This is my first posting. I am running Ubuntu 10.10

    I bought a Citizen CDS500 receipt printer. I downloaded the driver file, extracted it and copied it to /work/ directory.

    In order to compile the rastortocds500.c file, I executed the following command in the /work/ directory:

    /work$ gcc -Wl,-rpath,/usr/lib -Wall -fPIC -O2 -o rastertocds500 rastertocds500.c -lcupsimage -lcups


    I received the following error message:
    rastertocds500.c:37: fatal error: cups/cups.h: No such file or directory
    compilation terminated.

    Should I create the missing directory and try again or is there something else I am missing? The file cups/cups.h exists, do I need to point the compiler to those directories? How do I do that? I am somewhat familiar with Ubuntu and Linux, but have never had to run any compilation programs.

    Thanks

  2. #2
    Linux Guru reed9's Avatar
    Join Date
    Feb 2009
    Location
    Boston, MA
    Posts
    4,651
    First, have you installed the various build tools?
    Code:
    sudo apt-get install build-essential
    Second, I think you may need to install libcups2-dev.
    Code:
    sudo apt-get install libcups2-dev
    I tested it and was able to compile the drive on Arch, but they don't separate out devel packages. There was a warning, but that shouldn't be a deal breaker.
    Code:
    reed@reed-laptop ~/citizen % gcc -Wl,-rpath,/usr/lib -Wall -fPIC -O2 -o rastertocds500 rastertocds500.c -lcupsimage -lcups
    rastertocds500.c: In function ‘main’:
    rastertocds500.c:435:2: warning: ‘cupsRasterReadHeader’ is deprecated (declared at /usr/include/cups/raster.h:339) [-Wdeprecated-declarations]
    Obviously, I don't have the printer so I have no idea if it works.

  3. #3
    Just Joined!
    Join Date
    Apr 2011
    Posts
    5
    Thanks Archway.

    I ran those two files

    "sudo apt-get install build-essential"

    and

    "sudo apt-get install libcups2-dev" in the root directory

    then changed to /work/ directory and executed /work$ gcc -Wl,-rpath,/usr/lib -Wall -fPIC -O2 -o rastertocds500 rastertocds500.c -lcupsimage -lcups

    and got this:

    rastertocds500.c:39: fatal error: cups/raster.h: No such file or directory
    compilation terminated.

    So I am stuck again. Any thoughts?

  4. #4
    Linux Guru reed9's Avatar
    Join Date
    Feb 2009
    Location
    Boston, MA
    Posts
    4,651
    Gah, Ubuntu has too many development packages.

    I found raster.h in libcupsimage2-dev.
    Code:
    sudo apt-get install libcupsimage2-dev
    You'll probably also need libcupsys2-dev
    Code:
    sudo apt-get install libcupsys2-dev

  5. #5
    Just Joined!
    Join Date
    Apr 2011
    Posts
    5
    Well, we are getting closer.

    I ran both programs in the /work/ directory and got this:

    rastertocds500.c: In function ‘main’:
    rastertocds500.c:435: warning: ‘cupsRasterReadHeader’ is deprecated (declared at /usr/include/cups/raster.h:321)
    /usr/bin/ld: cannot open output file rastertocds500: Permission denied
    collect2: ld returned 1 exit status
    ace@Front-Office:/work$

    Thanks

  6. #6
    Linux Guru reed9's Avatar
    Join Date
    Feb 2009
    Location
    Boston, MA
    Posts
    4,651
    I'm not sure on that one. ld is the linker program. Googling, the error can occur if the build environment isn't clean. Perhaps your previous attempts have created some files in there that are screwing things up.

    I would create a new build directory and start over just moving the original tar ball in there.

  7. #7
    Just Joined!
    Join Date
    Apr 2011
    Posts
    5

    Citizen CDS500 Printer, Rastor File not Compiling

    Thanks Reed(, looks like I am almost there.

    The next step is:

    Copy the CDS500.ppd file to /usr/share/cups/model/ directory.
    Execute the following command.
    cp CDS500.ppd /usr/share/cups/model

    I cannot find the "/model" directory. Where should I copy this in unbuntu?

    The next step is

    Add a execute permission to the copied rastertocds500 file in the /usr/lib/cups/filter/
    directory.
    Execute the following command.
    chmod +x /usr/lib/cups/filter/rastertocds500

    got this:

    chmod: cannot access `/usr/lib/cups/filter/rastertocds500': No such file or directory

    I know that the file is there in /usr/lib/cups/filter

    I rebooted

    Tried to install the printer and got this:

    Printer 'CDS500-' requires the 'rastertocds500' program but it is not currently installed. Please install it before using this printer.


    Thanks

  8. #8
    Just Joined!
    Join Date
    Apr 2011
    Posts
    5
    Thanks Reed9.

    I finally got it to work. It just needs some tweaking.


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •