Subject: pkg/31855: cairo solaris10 gcc x86
To: None <pkg-manager@netbsd.org, gnats-admin@netbsd.org,>
From: Gilles Dauphin <dauphin@enst.fr>
List: pkgsrc-bugs
Date: 10/18/2005 12:30:00
>Number:         31855
>Category:       pkg
>Synopsis:       cairo solaris10 gcc x86
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    pkg-manager
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Tue Oct 18 12:30:00 +0000 2005
>Originator:     Gilles Dauphin
>Release:        SunOS 5.10 i86pc
>Organization:
ENST 
>Environment:


System: SunOS bi.enst.fr 5.10 Generic i86pc


>Description:


gcc -shared -Wl,-h -Wl,libcairo.so.2 -o .libs/libcairo.so.2.2.3  .libs/cairo.o .libs/cairo-arc.o .libs/cairo-array.o .libs/cairo-cache.o .libs/cairo-clip.o .libs/cairo-color.o .libs/cairo-debug.o .libs/cairo-fixed.o .libs/cairo-font.o .libs/cairo-font-options.o .libs/cairo-gstate.o .libs/cairo-hash.o .libs/cairo-hull.o .libs/cairo-image-surface.o .libs/cairo-matrix.o .libs/cairo-path.o .libs/cairo-path-bounds.o .libs/cairo-path-data.o .libs/cairo-path-fill.o .libs/cairo-path-stroke.o .libs/cairo-pen.o .libs/cairo-polygon.o .libs/cairo-region.o .libs/cairo-slope.o .libs/cairo-spline.o .libs/cairo-surface.o .libs/cairo-traps.o .libs/cairo-pattern.o .libs/cairo-unicode.o .libs/cairo-output-stream.o .libs/cairo-wideint.o .libs/cairo-meta-surface.o .libs/cairo-ft-font.o .libs/cairo-ps-surface.o .libs/cairo-pdf-surface.o .libs/cairo-font-subset.o .libs/cairo-png.o .libs/cairo-xlib-surface.o .libs/cairo-xlib-screen.o .libs/cairo-glitz-surface.o -Wl,-z -Wl,allextract,../pixman/src/.l
 ibs/libpixman.a -Wl,-z -Wl,defaultextract  -R/usr/pkgsrc/graphics/cairo/work/.buildlink/lib -R/usr/pkgsrc/graphics/cairo/work/.buildlink/lib -R/usr/openwin/lib -L/usr/pkgsrc/graphics/cairo/work/.buildlink/lib -L/usr/pkgsrc/graphics/cairo/work/.x11-buildlink/lib /usr/pkgsrc/graphics/cairo/work/.buildlink/lib/libXrender.so -lX11 /usr/pkgsrc/graphics/cairo/work/.buildlink/lib/libpng.so /usr/pkgsrc/graphics/cairo/work/.buildlink/lib/libglitz.so /usr/pkgsrc/graphics/cairo/work/.buildlink/lib/libfontconfig.so /usr/pkgsrc/graphics/cairo/work/.buildlink/lib/libfreetype.so -lz -lm -lc  -Wl,-R/usr/pkg/lib -Wl,-R/usr/sfw/lib -Wl,-R/usr/pkg/lib -Wl,-R/usr/openwin/lib
ld: fatal: relocation error: R_386_GOTOFF: file .libs/cairo.o: symbol cairo_pattern_nil: relocation must bind locally
collect2: ld returned 1 exit status
*** Error code 1

Stop.
bmake: stopped in /usr/pkgsrc/graphics/cairo/work/cairo-1.0.2/src
*** Error code 1

Stop.



>How-To-Repeat:


bmake 


>Fix:


same as glitz

----------------------------------------------
--- src/cairoint.h.orig Mon Oct  3 22:44:43 2005
+++ src/cairoint.h      Tue Oct 18 14:08:08 2005
@@ -66,7 +66,7 @@
 #include "cairo-debug.h"
 #include <pixman.h>
 
-#if __GNUC__ >= 3 && defined(__ELF__)
+#if __GNUC__ >= 3 && defined(__ELF__) && !defined(__sun__)
 # define slim_hidden_proto(name)       slim_hidden_proto1(name, INT_##name)
 # define slim_hidden_def(name)         slim_hidden_def1(name, INT_##name)
 # define slim_hidden_proto1(name, internal)                            \
@@ -94,7 +94,7 @@
 #endif
 
 /* slim_internal.h */
-#if (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 3)) && defined(__ELF__)
+#if (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 3)) && defined(__ELF__) && !def
ined(__sun__)
 #define cairo_private          __attribute__((__visibility__("hidden")))
 #else
 #define cairo_private
--------------------------------------------------
--- pixman/src/slim_internal.h.orig     Wed Mar  2 16:43:33 2005
+++ pixman/src/slim_internal.h  Tue Oct 18 14:25:13 2005
@@ -47,7 +47,7 @@
 /* ??? Not marked with "slim" because that makes it look too much
    like the function name instead of just an attribute.  */
 
-#if (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 3)) && defined(__ELF__)
+#if (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 3)) && defined(__ELF__) && !def
ined(__sun__)
 #define pixman_private __attribute__((__visibility__("hidden")))
 #else
 #define pixman_private
@@ -77,7 +77,7 @@
    the C symbol "EXT_foo", which is renamed to "foo" at the assembly
    level.  */
 
-#if __GNUC__ >= 3 && defined(__ELF__)
+#if __GNUC__ >= 3 && defined(__ELF__) && !defined(__sun__)
 # define slim_hidden_proto(name)       slim_hidden_proto1(name, INT_##name)
 # define slim_hidden_def(name)         slim_hidden_def1(name, INT_##name)
 # define slim_hidden_proto1(name, internal)