Problems linking to cups

Rizzo, John john.rizzo at
Tue Sep 23 16:27:37 GMT 2003

I'm having problems linking to cups.  I didn't see any entry in the bugs
database so I wanted to send this and see what you guys thought.

I compiled cups 1.1.19 and installed it in /usr/local/cups-1.1.19.  This
directory includes everything for cups; libs, include files, config
files, etc.  The binaries for cups were installed in /usr/local/bin and
/usr/local/sbin though.

someuser at somehost [548][~/samba-3.0.0rc4/source]$./configure
--prefix=/usr/local/cups-3.0.0rc4 --with-winbind --with-ldapsam
--with-ldap --with-ads --with-krb5=/usr/kerberos
--with-libiconv=/usr/local/gnu --with-cups=/usr/local/cups
...	Removed lines for brevity
Using libraries:
    LIBS = -lcrypt -lresolv -lnsl -ldl   -liconv
    KRB5_LIBS = -L/usr/kerberos/lib  -lcom_err -lk5crypto -lcrypto
-lkrb5 -lgssapi_krb5
    LDAP_LIBS =  -llber -lldap
    AUTH_LIBS = -lcrypt
checking configure summary... yes
configure: creating ./config.status
config.status: creating include/stamp-h
config.status: creating Makefile
config.status: creating script/findsmb
config.status: creating smbadduser
config.status: creating script/
config.status: creating include/config.h
...	Removed lines for brevity
someuser at somehost [547][~/samba-3.0.0rc4/source]$make
WARNING: you need to run ./config.status
Using FLAGS =  -g -O2 -I/usr/local/cups-1.1.19/include
-I/usr/kerberos/include  -Iinclude
-I/u/jrizzo/samba-3.0.0rc4/source/smbwrapper  -I. -D_LARGEFILE64_SOURCE
-D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE -I/usr/local/gnu/include
-I/usr/kerberos/include -I/u/jrizzo/samba-3.0.0rc4/source
      LIBS = -lcrypt -lresolv -lnsl -ldl -liconv
      LDSHFLAGS = -shared  -L/usr/local/gnu/lib -L/usr/local/gnu/lib
      LDFLAGS = -L/usr/local/gnu/lib -L/usr/local/gnu/lib
...	Removed Compiling lines for brevity
Linking bin/smbd
/usr/bin/ld: cannot find -lcups
collect2: ld returned 1 exit status
make: *** [bin/smbd] Error 1

You can see that they are using -I/usr/local/cups-1.1.19/include but not
-L/usr/local/cups-1.1.19/lib.  If I modify the file and
rerun everything then it adds the correct -L for cups but obviously this
isn't a perminant fix.  Adding /usr/local/cups-1.1.19/lib to
/etc/ does not help.  What do you guys think?


This e-mail message is intended only for the named recipient(s) above. It may contain confidential information. If you are not the intended recipient you are hereby notified that any dissemination, distribution or copying of this e-mail and any attachment(s) is strictly prohibited. If you have received this e-mail in error, please immediately notify the sender by replying to this e-mail and delete the message and any attachment(s) from your system. Thank you.

More information about the samba-technical mailing list