All of lore.kernel.org
 help / color / mirror / Atom feed
From: Till Kamppeter <till.kamppeter@gmx.net>
To: Norm Jacobs <Norm.Jacobs@Sun.COM>
Cc: printing-architecture <printing-architecture@freestandards.org>,
	"desktop_printing@osdl.org" <desktop_printing@osdl.org>
Subject: Re: [Desktop_printing] Re: [Printing-architecture] Re: Building PAPI implementation
Date: Thu, 18 May 2006 11:48:27 +0200	[thread overview]
Message-ID: <446C42EB.4020709@gmx.net> (raw)
In-Reply-To: <446B8F9E.5070306@gmx.net>

Now I got it working with CUPS by changing the default print service at
compile time. The problem was the quoting. The current code

-----------------------------------------------------------------------
#ifndef DEFAULT_PRINT_SERVICE
#define DEFAULT_PRINT_SERVICE   "lpsched"
#endif

...

char *scheme = DEFAULT_PRINT_SERVICE;
-----------------------------------------------------------------------

requires from the user to supply also the quotes. So in the spec file I
had to do

-----------------------------------------------------------------------
export CFLAGS="$CFLAGS -DDEFAULT_PRINT_SERVICE=\\\"ipp\\\""
%configure --without-apache
%make
-----------------------------------------------------------------------

Note the quoted quotes in the first line. This I did not do in the first
place and therefore it broke.

But please still supply the documentation to configure PAPI at run time.
Also a possibility to define the compile time default by the configure
script, both by spooler auto discovery and also by command line option
would be great.

Note also that on the linker call(s) for the Ruby bindings the

-L$RPM_BUILD_DIR/papi/source/libpapi-dynamic/.libs

is missing. So I had to put

-----------------------------------------------------------------------
export LDFLAGS="$LDFLAGS -L$RPM_BUILD_DIR/papi/source/libpapi-dynamic/.libs"
-----------------------------------------------------------------------

before the "%configure" in the spec file.

   Till



Till Kamppeter wrote:
> Now I got it RPMized so that it can be installed on a machine with
> already installed CUPS. No I tried to make it actually working with the
> installed CUPS. I found out by running an "lpr" command through strace
> that it tries to load the non-existing "lpsched" service
> (/usr/lib/psm-lpsched.so) and I have seen in the source code that
> "lpsched" is used a s the default service (should not be as "lpsched"
> does not ship with the package.
> 
> So I compile with
> 
> export CFLAGS="$CFLAGS -DDEFAULT_PRINT_SERVICE=ipp"
> ./configure --without-apache --without-ruby
> make
> 
> to make it using "ipp" as default service (can one configure/switch the
> service at run time? There are no files in /etc/... and no documentation
> about such files, man pages are only in section 1 and 8, nothing in
> section 5).
> 
> But with this setting it does not build:
> 
> ------------------------------------------------------------------------------------
> [...]
> Making all in libpapi-dynamic
> make[2]: Entering directory
> `/home/tkamppeter/rpm/BUILD/papi/source/libpapi-dynamic'
> if /bin/sh ../../libtool --tag=CC --mode=compile
> i586-mandriva-linux-gnu-gcc -DHAVE_CONFIG_H -I. -I.
> -I../../source/libpapi-common  -I. -DPSM_DIR=\"/usr/lib\"
> -I../libpapi-common  -I./nss -DNSS_EMULATION   -I/usr/include/apr-1
> -DDEFAULT_PRINT_SERVICE=ipp -MT psm.lo -MD -MP -MF ".deps/psm.Tpo" -c -o
> psm.lo psm.c; \
> then mv -f ".deps/psm.Tpo" ".deps/psm.Plo"; else rm -f ".deps/psm.Tpo";
> exit 1; fi
> mkdir .libs
>  i586-mandriva-linux-gnu-gcc -DHAVE_CONFIG_H -I. -I.
> -I../../source/libpapi-common -I. -DPSM_DIR=\"/usr/lib\"
> -I../libpapi-common -I./nss -DNSS_EMULATION -I/usr/include/apr-1
> -DDEFAULT_PRINT_SERVICE=ipp -MT psm.lo -MD -MP -MF .deps/psm.Tpo -c
> psm.c  -fPIC -DPIC -o .libs/psm.o
> if /bin/sh ../../libtool --tag=CC --mode=compile
> i586-mandriva-linux-gnu-gcc -DHAVE_CONFIG_H -I. -I.
> -I../../source/libpapi-common  -I. -DPSM_DIR=\"/usr/lib\"
> -I../libpapi-common  -I./nss -DNSS_EMULATION   -I/usr/include/apr-1
> -DDEFAULT_PRINT_SERVICE=ipp -MT service.lo -MD -MP -MF
> ".deps/service.Tpo" -c -o service.lo service.c; \
> then mv -f ".deps/service.Tpo" ".deps/service.Plo"; else rm -f
> ".deps/service.Tpo"; exit 1; fi
>  i586-mandriva-linux-gnu-gcc -DHAVE_CONFIG_H -I. -I.
> -I../../source/libpapi-common -I. -DPSM_DIR=\"/usr/lib\"
> -I../libpapi-common -I./nss -DNSS_EMULATION -I/usr/include/apr-1
> -DDEFAULT_PRINT_SERVICE=ipp -MT service.lo -MD -MP -MF .deps/service.Tpo
> -c service.c  -fPIC -DPIC -o .libs/service.o
> service.c: In function 'service_load':
> service.c:60: error: 'ipp' undeclared (first use in this function)
> service.c:60: error: (Each undeclared identifier is reported only once
> service.c:60: error: for each function it appears in.)
> ICECREAM[19319]: Compiled on 192.168.2.67
> make[2]: *** [service.lo] Error 1
> make[2]: Leaving directory
> `/home/tkamppeter/rpm/BUILD/papi/source/libpapi-dynamic'
> make[1]: *** [all-recursive] Error 1
> make[1]: Leaving directory `/home/tkamppeter/rpm/BUILD/papi/source'
> make: *** [all-recursive] Error 1
> ------------------------------------------------------------------------------------
> 
> Can you tell me how to get it correctly talking with CUPS? Thanks.
> 
>    Till
> 


  reply	other threads:[~2006-05-18  9:48 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-05-17 13:28 [Printing-architecture] Building PAPI implementation Till Kamppeter
2006-05-17 14:32 ` [Printing-architecture] " Norm Jacobs
2006-05-17 21:03   ` Till Kamppeter
2006-05-18  9:48     ` Till Kamppeter [this message]
2006-05-18 15:29       ` [Desktop_printing] " Till Kamppeter
2006-05-18 19:02         ` Norm Jacobs
2006-05-18 21:24           ` Till Kamppeter
2006-05-18 22:25             ` Till Kamppeter
2006-05-19  3:35               ` Norm Jacobs
2006-05-19  9:38                 ` Till Kamppeter
2006-05-19 12:13                   ` Norm Jacobs

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=446C42EB.4020709@gmx.net \
    --to=till.kamppeter@gmx.net \
    --cc=Norm.Jacobs@Sun.COM \
    --cc=desktop_printing@osdl.org \
    --cc=printing-architecture@freestandards.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.