<html>
    <head>
      <base href="https://bugs.freedesktop.org/" />
    </head>
    <body>
      <p>
        <div>
            <b><a class="bz_bug_link 
          bz_status_NEEDINFO "
   title="NEEDINFO --- - 1.12.2 won't build on Solaris w/ Sun Studio cc. _cairo_unbounded_rectangle undefined symbol"
   href="https://bugs.freedesktop.org/show_bug.cgi?id=49669#c4">Comment # 4</a>
              on <a class="bz_bug_link 
          bz_status_NEEDINFO "
   title="NEEDINFO --- - 1.12.2 won't build on Solaris w/ Sun Studio cc. _cairo_unbounded_rectangle undefined symbol"
   href="https://bugs.freedesktop.org/show_bug.cgi?id=49669">bug 49669</a>
              from <span class="vcard"><a class="email" href="mailto:mark@ibiblio.org" title="mark@ibiblio.org">mark@ibiblio.org</a>
</span></b>
        <pre>
Ignore the cairo_region and cairo_device symbol cut-and-paste above, I
neglected to pkgrm cairo 1.8.10 from the system first. Those libs were getting
picked up during the install phase.

This URL however says -xO2 does the dead code cleanup so I'm using that
instead.

<a href="http://docs.oracle.com/cd/E19205-01/819-5265/bjavm/index.html">http://docs.oracle.com/cd/E19205-01/819-5265/bjavm/index.html</a>

The end status is -xO1/-xO2 will fix the issue and finish the compile on
Solaris 10 & 11 Intel, but not Solaris 10 SPARC. `make check' passes most
things on Solaris Intel except where GNU grep is assumed.

Digging into it:

/bin/bash ../libtool  --tag=CC   --mode=link cc -xtarget=ultra -m64
-xcode=pic32 -xc99 -xO2  -L/usr/local/lib -I/usr/local/include
-D_POSIX_PTHREAD_SEMANTICS   -o libcairoperf.la  cairo-perf.lo
cairo-perf-report.lo cairo-stats.lo cairo-time.lo   -lrt  -lm
libtool: link: ar cru .libs/libcairoperf.a .libs/cairo-perf.o
.libs/cairo-perf-report.o .libs/cairo-stats.o .libs/cairo-time.o 
libtool: link: ranlib .libs/libcairoperf.a
libtool: link: ( cd ".libs" && rm -f "libcairoperf.la" && ln -s
"../libcairoperf.la" "libcairoperf.la" )
/bin/bash ../libtool  --tag=CC   --mode=link cc -xtarget=ultra -m64
-xcode=pic32 -xc99 -xO2  -L/usr/local/lib -I/usr/local/include
-D_POSIX_PTHREAD_SEMANTICS   -o cairo-analyse-trace cairo-analyse-trace.o
cairo-error.o ../util/cairo-script/libcairo-script-interpreter.la
../util/cairo-missing/libcairo-missing.la libcairoperf.la
../boilerplate/libcairoboilerplate.la ../src/libcairo.la -lrt  -lm
libtool: link: cc -xtarget=ultra -m64 -xcode=pic32 -xc99 -xO2
-I/usr/local/include -D_POSIX_PTHREAD_SEMANTICS -o .libs/cairo-analyse-trace
cairo-analyse-trace.o cairo-error.o  -L/usr/local/lib
../util/cairo-script/.libs/libcairo-script-interpreter.so
../util/cairo-missing/.libs/libcairo-missing.a ./.libs/libcairoperf.a
../boilerplate/.libs/libcairoboilerplate.a
/var/tmp/cairo-1.12.14/src/.libs/libcairo.so -ldl ../src/.libs/libcairo.so
/usr/local/lib/libpixman-1.so /usr/local/lib/libfontconfig.so -lbz2
/usr/local/lib/libexpat.so /usr/local/lib/libintl.so -lc
/usr/local/lib/libiconv.so /usr/local/lib/libfreetype.so
/usr/local/lib/libpng16.so -lcurses /usr/local/lib/libxcb-shm.so
/usr/local/lib/libX11-xcb.so /usr/local/lib/libxcb-render.so
/usr/local/lib/libXrender.so /usr/local/lib/libXext.so /usr/local/lib/libX11.so
/usr/local/lib/libxcb.so /usr/local/lib/libXau.so /usr/local/lib/libXdmcp.so
-lnsl -lsocket -lz -lrt -lm -R/cairo/lib -R/usr/local/lib
ld: warning: file ../src/.libs/libcairo.so: linked to
/var/tmp/cairo-1.12.14/src/.libs/libcairo.so: attempted multiple inclusion of
file
Undefined                       first referenced
 symbol                             in file
_cairo_unbounded_rectangle          cairo-error.o  (symbol scope specifies
local binding)
ld: fatal: symbol referencing errors. No output written to
.libs/cairo-analyse-trace
gmake[4]: *** [cairo-analyse-trace] Error 2
gmake[4]: Leaving directory `/var/tmp/cairo-1.12.14/perf'
gmake[3]: *** [all-recursive] Error 1
gmake[3]: Leaving directory `/var/tmp/cairo-1.12.14/perf'
gmake[2]: *** [all] Error 2
gmake[2]: Leaving directory `/var/tmp/cairo-1.12.14/perf'
gmake[1]: *** [all-recursive] Error 1
gmake[1]: Leaving directory `/var/tmp/cairo-1.12.14'
gmake: *** [all] Error 2


perf/.libs/libcairoperf.a[cairo-time.o]: [88]   |                   0|         
        16|OBJT |GLOB |2    |UNDEF  |_cairo_unbounded_rectangle

./src/.libs/libcairo.a[cairo-rectangle.o]: [78] |                  20|         
        16|OBJT |GLOB |2    |3      |_cairo_unbounded_rectangle

Putting /var/tmp/cairo-1.12.14/src/.libs/libcairo.a in the command above gives
a functional linking.

This recipe now compiles everything:

    cd /var/tmp
    rm -rf cairo-1.12.14
    unxz -c /usr/local/src/graphics/cairo-1.12.14.tar.xz | tar -xvf -
    cd cairo-1.12.14
    ./configure --prefix=/usr/local \
        --enable-xml \
        --enable-xlib-xcb \
        --disable-silent-rules \
        --with-x
    gmake
    perl -pe "s#dependency_libs=\'#dependency_libs=\'../src/.libs/libcairo.a #"
-i perf/libcairoperf.la
    gmake install

The dependency_lib mod above also removes the need for the -xO1/-xO2 compiler
flag.</pre>
        </div>
      </p>
      <hr>
      <span>You are receiving this mail because:</span>
      
      <ul>
          <li>You are the QA Contact for the bug.</li>
      </ul>
    </body>
</html>