<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 TRANSITIONAL//EN">
<HTML>
<HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; CHARSET=UTF-8">
<META NAME="GENERATOR" CONTENT="GtkHTML/3.26.0">
</HEAD>
<BODY>
On Thu, 2010-12-09 at 13:04 -0500, Robert Hooker wrote:
<BLOCKQUOTE TYPE=CITE>
<PRE>
From: Robert Hooker <<A HREF="mailto:robert.hooker@canonical.com">robert.hooker@canonical.com</A>>
Fixes these build failures with ld --no-add-needed
CCLD smproxy
/usr/bin/ld: smproxy.o: undefined reference to symbol 'IceProcessMessages'
/usr/bin/ld: note: 'IceProcessMessages' is defined in DSO /usr/lib/libICE.so.6 so try adding it to the linker command line
/usr/lib/libICE.so.6: could not read symbols: Invalid operation
collect2: ld returned 1 exit status
CCLD smproxy
/usr/bin/ld: smproxy.o: undefined reference to symbol 'XGetWMProtocols'
/usr/bin/ld: note: 'XGetWMProtocols' is defined in DSO /usr/lib/libX11.so.6 so try adding it to the linker command line
/usr/lib/libX11.so.6: could not read symbols: Invalid operation
collect2: ld returned 1 exit status
Signed-off-by: Robert Hooker <<A HREF="mailto:robert.hooker@canonical.com">robert.hooker@canonical.com</A>>
---
configure.ac | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/configure.ac b/configure.ac
index 14c2ecb..b1e87f2 100644
--- a/configure.ac
+++ b/configure.ac
@@ -38,6 +38,6 @@ XORG_DEFAULT_OPTIONS
AC_CHECK_FUNCS([mkstemp])
# Checks for pkg-config packages
-PKG_CHECK_MODULES(SMPROXY, sm xt xmuu)
+PKG_CHECK_MODULES(SMPROXY, sm ice x11 xt xmuu)
</PRE>
</BLOCKQUOTE>
<BR>
What is your version of pkg-config? Version 0.22 or higher is required.
<BLOCKQUOTE>
<PRE>
$ pkg-config --libs sm
-L/home/nadon/xorg/src/lib -lSM -lICE
$ pkg-config --libs xt
-L/home/nadon/xorg/src/lib -lXt -lX11
$ pkg-config --libs xmuu
-L/home/nadon/xorg/src/lib -lXmuu -lX11
</PRE>
</BLOCKQUOTE>
In libSM/sm.pc:
<BLOCKQUOTE>
<PRE>
Requires: ice xproto
Requires.private: ice
Cflags: -I${includedir}
Libs: -L${libdir} -lSM
</PRE>
</BLOCKQUOTE>
libICE is pulled in when returning cflags for libSM due to the Requires statement.<BR>
<BR>
I ge this command:
<PRE>
gcc -std=gnu99 [...] -I/home/nadon/xorg/src/include -g -O2 -o smproxy save.o smproxy.o
-L/home/nadon/xorg/src/lib -lSM -lICE -lXt -lXmuu -lX11
</PRE>
<BR>
<BR>
<BR>
<BLOCKQUOTE TYPE=CITE>
<PRE>
AC_OUTPUT([Makefile])
</PRE>
</BLOCKQUOTE>
</BODY>
</HTML>