[PATCH smproxy] Add ice and x11 to PKG_CHECK_MODULES

Gaetan Nadon memsize at videotron.ca
Thu Dec 9 12:00:27 PST 2010


On Thu, 2010-12-09 at 13:04 -0500, Robert Hooker wrote:

> From: Robert Hooker <robert.hooker at canonical.com>
> 
> 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 <robert.hooker at canonical.com>
> ---
>  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)


What is your version of pkg-config? Version 0.22 or higher is required.

        $ 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  

In libSM/sm.pc:

        Requires: ice xproto
        Requires.private: ice
        Cflags: -I${includedir}
        Libs: -L${libdir} -lSM

libICE is pulled in when returning cflags for libSM due to the Requires
statement.

I ge this command:

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   





>  
>  AC_OUTPUT([Makefile])
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.x.org/archives/xorg-devel/attachments/20101209/ad645fb6/attachment.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: This is a digitally signed message part
URL: <http://lists.x.org/archives/xorg-devel/attachments/20101209/ad645fb6/attachment.pgp>


More information about the xorg-devel mailing list