Bug 48486 - libxcb 1.8 doesn't build/install on Solaris 10 and 11. xcb_str_sizeof undefined
Summary: libxcb 1.8 doesn't build/install on Solaris 10 and 11. xcb_str_sizeof undefined
Status: RESOLVED WORKSFORME
Alias: None
Product: XCB
Classification: Unclassified
Component: Library (show other bugs)
Version: unspecified
Hardware: x86-64 (AMD64) Solaris
: medium major
Assignee: xcb mailing list dummy
QA Contact: xcb mailing list dummy
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-04-09 17:43 UTC by mark
Modified: 2012-04-09 18:15 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Attachments

Description mark 2012-04-09 17:43:46 UTC
Recipe:
    Compile python 2.7
    Compile xcb-proto 1.8
    Compile libpthread-stubs 0.3
    Compile libXau 1.0.6
    Compile libXdmcp 1.0.3
    Compile xcmiscproto 1.2.0
    Compile bigreqsproto 1.1.0
    Compile libxml2 2.7.7
    Compile libxslt 1.1.26
    Compile libgpg-error 1.9
    Compile libgcrypt1.4.6
    Compile libcheck 0.9.8
    Compile flex.2.5.35
    Compile doxygen 1.7.1

    setenv LDFLAGS -L/usr/local/lib
    cd /var/tmp
    rm -rf /xcb libxcb-1.8
    untgz /usr/local/src/x11/libxcb-1.8.tar.gz
    cd libxcb-1.8
    mkdir /xcb
    /bin/perl -pe "s%^LIBTOOL=.*%LIBTOOL='/usr/local/bin/libtool'%" -i configure
    ./configure --prefix=/xcb \
        --disable-silent-rules
    gmake
    gmake install

All versions of Solaris 10/11 SPARC/x86 pass a 'gmake' but fail on the 'gmake install'

SunOS box1 5.10 Generic_142901-13 i86pc i386 i86pc
SunOS box2 5.11 snv_134 i86pc i386 i86pc
SunOS box3 5.10 Generic_142909-17 sun4v sparc SUNW,T5240

libtool: install: warning: relinking `libxcb-render.la'
libtool: install: (cd /var/tmp/libxcb-1.8/src; /bin/bash /usr/local/bin/libtool  --tag CC --mode=relink cc -v -I/usr/local/include -I/usr/local/include -L/usr/local/lib -I/usr/local/include -version-info 0:0:0 -no-undefined -L/usr/local/lib -o libxcb-render.la -rpath /xcb/lib render.lo libxcb.la -lsocket )
libtool: relink: cc -G -z defs -h libxcb-render.so.0 -o .libs/libxcb-render.so.0.0.0  .libs/render.o   -R/xcb/lib -R/usr/local/lib -L/usr/local/lib -L/xcb/lib -lxcb -lXau -lXdmcp -lsocket -lc   
Undefined                       first referenced
 symbol                             in file
xcb_str_sizeof                      .libs/render.o
ld: fatal: Symbol referencing errors. No output written to .libs/libxcb-render.so.0.0.0
libtool: install: error: relink `libxcb-render.la' with the above command before installing it
gmake[3]: *** [install-libLTLIBRARIES] Error 1
gmake[3]: Leaving directory `/var/tmp/libxcb-1.8/src'

This is what it does:
box1:/var/tmp/libxcb-1.8 root# cd src
box1:/var/tmp/libxcb-1.8/src root# cc -G -z defs -h libxcb-render.so.0 -o .libs/libxcb-render.so.0.0.0  .libs/render.o   -R/xcb/lib -R/usr/local/lib -L/usr/local/lib -L/xcb/lib -lxcb -lXau -lXdmcp -lsocket -lc
Undefined                       first referenced
 symbol                             in file
xcb_str_sizeof                      .libs/render.o
ld: fatal: Symbol referencing errors. No output written to .libs/libxcb-render.so.0.0.0

This is what it should do: (add .libs/xproto.o)
box1:/var/tmp/libxcb-1.8/src root# cc -G -z defs -h libxcb-render.so.0 -o .libs/libxcb-render.so.0.0.0 .libs/render.o .libs/xproto.o -R/xcb/lib -R/usr/local/lib -L/usr/local/lib -L/xcb/lib -lxcb -lXau -lXdmcp -lsocket -lc
box1:/var/tmp/libxcb-1.8/src root#

Doing the recipe with this step after the gmake patches the problem:
    gmake
    /bin/perl -pe "s%render.lo %render.lo xproto.lo %" -i src/libxcb-render.la
    gmake install

The build now completes.
Comment 1 Alan Coopersmith 2012-04-09 18:06:51 UTC
Strange, I don't remember ever seeing that when building xcb on Solaris 11,
which I do regularly.

This appears to be caused by your custom libtool translating "libxcb.la" into
-lxcb and linking against the previously installed libxcb.so instead of the
one you just built in the same directory, which has the xcb_str_sizeof symbol
in it.
Comment 2 mark 2012-04-09 18:11:00 UTC
I'll pay that :)
Comment 3 Alan Coopersmith 2012-04-09 18:12:06 UTC
Oh, and just for comparison, this is the output of the link line in my build:

/bin/sh ../libtool  --tag=CC   --mode=link cc -v -I/usr/X11R7/include   -I/usr/X11R7/include   -v -xildoff -features=extensions -xF=%all -xO4 -xbuiltin=%none -xlibmil -m64 -version-info 0:0:0 -no-undefined  -z lazyload -M /usr/lib/ld/map.pagealign -z guidance -L/net/also.us.oracle.com/export/alanc/X.Org/amd64/install/usr/X11R7/lib -R/usr/X11R7/lib -R/usr/lib/64 -L/usr/sfw/lib//64 -R/usr/sfw/lib//64 -o libxcb-render.la -rpath /usr/X11R7/lib render.lo libxcb.la -lsocket 

libtool: link: cc -G -z defs -h libxcb-render.so.0 -o .libs/libxcb-render.so.0.0.0  .libs/render.o   -R/export/alanc/X.Org/amd64/xcb/libxcb/src/.libs -R/usr/X11R7/lib -R/usr/lib/64 -R/usr/sfw/lib//64 -L/net/also.us.oracle.com/export/alanc/X.Org/amd64/install/usr/X11R7/lib -L/usr/sfw/lib//64 ./.libs/libxcb.so -L/usr/X11R7/lib -lXau -lXdmcp -lsocket -lc  -m64  

Note that "libxcb.la" was translated into "./.libs/libxcb.so", not -lxcb using
the -L/-R paths.

(And yes, this is my private test build, which is why I haven't cleaned up the
 cruft like -R/export/alanc/... that's fixed in the official Solaris package
 builds.)
Comment 4 mark 2012-04-09 18:15:01 UTC
Yeah removing that LIBTOOL= line solved it here as well... it's been required for other builds recently so I left it in there for this one.


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.