Compiling problem -CUPS

Using applications, configuring, problems
Post Reply
Message
Author
april

Compiling problem -CUPS

#1 Post by april »

Im getting this message while compiling Cups on Precise 5.7.1

Code: Select all

Installing init scripts...
Installing data files in systemv...
Installing data files in conf...
Installing data files in data...
Installing data files in desktop...
Installing cups.conf in /etc/dbus-1...
Installing desktop menu...
Installing desktop icons...
Installing data files in locale...
Installing data files in man...
/usr/bin/ld: /usr/lib/i386-linux-gnu/heimdal/libgssapi.a(gss_mech_switch.o): undefined reference to symbol 'dlopen@@GLIBC_2.1'
/usr/bin/ld: note: 'dlopen@@GLIBC_2.1' is defined in DSO /lib/libdl.so.2 so try adding it to the linker command line
/lib/libdl.so.2: could not read symbols: Invalid operation
collect2: ld returned 1 exit status
make[1]: *** [mantohtml] Error 1
make: *** [install-data] Error 1
# 
Note

Code: Select all

/usr/bin/ld: note: 'dlopen@@GLIBC_2.1' is defined in DSO /lib/libdl.so.2 so try adding it to the linker command line
So if I wanted to add it to the linker command line what should I be looking for?
I'm assuming I should be looking in the makefile right?

jafadmin
Posts: 1249
Joined: Thu 19 Mar 2009, 15:10

#2 Post by jafadmin »

April, I suspect you need to add "ldl" to the library environment variable.

I don't know how your make file is organized, but in a situation where someone is just using a command line compilation, the command would look something like:

Code: Select all

gcc foo.c -lldl -o foo
In a makefile it would look something like: LIBS=-ldl

april

#3 Post by april »

Thanks jafadmin

I dont have a "library" variable in ENV.
The closest I can see is "LD_LIBRARY_PATH=/lib:/usr/lib:/usr/X11R7/lib:/root/my-applications/lib:/usr/local/lib:/usr/lib/seamonkey"

Can you be more explicit?
My makefile has .....echo Using LIBS="$(LIBS)"....
I guess Ive got to get it in there somehow but I dont see where $(LIBS) is made yet
In cups_config-in

Code: Select all

LIBS="@LIBGSSAPI@ @EXPORT_SSLLIBS@ @LIBZ@ @LIBS@"
I'll try it there-Nah that didnt work

jafadmin
Posts: 1249
Joined: Thu 19 Mar 2009, 15:10

#4 Post by jafadmin »

if you run:

Code: Select all

ldconfig -p | grep libld; env | grep LD_
it should show you if the library exists in the library path (LD_LIBRARY_PATH) already.

When I run the command on my Precise 571 setup I get:

Code: Select all

sh-4.1# ldconfig -p | grep libdl; env | grep LD_
	libdl.so.2 (libc6, OS ABI: Linux 2.6.24) => /lib/libdl.so.2 <<<<<<<----HERE-----
	libdl.so (libc6, OS ABI: Linux 2.6.24) => /usr/lib/libdl.so
LD_LIBRARY_PATH=/lib:/usr/lib:/usr/X11R7/lib:/root/my-applications/lib:/usr/local/lib:/usr/lib/seamonkey
which shows me the library DOES exist in my library environment variable at "/lib"

If the library already exists in the path, you don't need to specify it by path again, and adding it to the "LIBS =" statement in the makefile should work. There can be multiple libraries listed in that variable, i.e.:

Code: Select all

LIBS = -lthislib -lthatlib -ldl
As always, it would help if we could see that actual library line from your makefile.

User avatar
OscarTalks
Posts: 2196
Joined: Mon 06 Feb 2012, 00:58
Location: London, England

#5 Post by OscarTalks »

Are you trying to compile the latest version of CUPS?
2.2.5 was released a few days ago I see.
In Wheezy I am able to compile this (in Stretch too).
I do have to add a few missing deps: namely libkrb5-dev plus its dependencies.
I just grabbed those from packages.debian.org and clicked on them.
Then ./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var --disable-systemd --disable-pam
The make command then completes OK. No mention of the above error or any need to add LIBS to the linker.
Attachments
cups225-wheezy.jpg
CUPS-2.2.5 compiled and running in Wheezy
(43.84 KiB) Downloaded 109 times
Oscar in England
Image

april

#6 Post by april »

Spot on - Thanks again Oscar

Used Stretch
Got libkrb5-dev and
krb5-multidev debs
in i386 versions
Installed both

Then the compile went straight through . Did not use the line you supplied just ./configure make make install

Thanks to jafadmin too !

april

#7 Post by april »

jafadmin wrote:if you run:

Code: Select all

ldconfig -p | grep libld; env | grep LD_
it should show you if the library exists in the library path (LD_LIBRARY_PATH) already.

When I run the command on my Precise 571 setup I get:

Code: Select all

sh-4.1# ldconfig -p | grep libdl; env | grep LD_
	libdl.so.2 (libc6, OS ABI: Linux 2.6.24) => /lib/libdl.so.2 <<<<<<<----HERE-----
	libdl.so (libc6, OS ABI: Linux 2.6.24) => /usr/lib/libdl.so
LD_LIBRARY_PATH=/lib:/usr/lib:/usr/X11R7/lib:/root/my-applications/lib:/usr/local/lib:/usr/lib/seamonkey
which shows me the library DOES exist in my library environment variable at "/lib"
I get

Code: Select all

# ldconfig -p | grep libld; env | grep LD_
	libldap_r-2.4.so.2 (libc6) => /usr/lib/libldap_r-2.4.so.2
LD_LIBRARY_PATH=/lib:/usr/lib:/usr/X11R7/lib:/root/my-applications/lib:/usr/local/lib:/usr/lib/seamonkey
# 
? Wonder why its different

jafadmin
Posts: 1249
Joined: Thu 19 Mar 2009, 15:10

#8 Post by jafadmin »

I get

Code: Select all

# ldconfig -p | grep libld; env | grep LD_
	libldap_r-2.4.so.2 (libc6) => /usr/lib/libldap_r-2.4.so.2
LD_LIBRARY_PATH=/lib:/usr/lib:/usr/X11R7/lib:/root/my-applications/lib:/usr/local/lib:/usr/lib/seamonkey
# 
? Wonder why its different
libdl, not libld ..

april

#9 Post by april »

Code: Select all

# ldconfig -p | grep libdl; env | grep LD_
	libdl.so.2 (libc6, OS ABI: Linux 2.6.24) => /lib/libdl.so.2
	libdl.so (libc6, OS ABI: Linux 2.6.24) => /usr/lib/libdl.so
LD_LIBRARY_PATH=/lib:/usr/lib:/usr/X11R7/lib:/root/my-applications/lib:/usr/local/lib:/usr/lib/seamonkey
#
Bloody letterers make a diff on computers . Wish they would make one that knows what I want !!

jafadmin
Posts: 1249
Joined: Thu 19 Mar 2009, 15:10

#10 Post by jafadmin »

april wrote: Bloody letterers make a diff on computers . Wish they would make one that knows what I want !!
Your sposed to be using spelcheck

Post Reply