Subject: pkg/37633: graphics/imlib2 visibility attribute gcc4 solaris32/64
To: None <pkg-manager@netbsd.org, gnats-admin@netbsd.org,>
From: Gilles Dauphin <dauphin@enst.fr>
List: pkgsrc-bugs
Date: 12/28/2007 11:30:00
>Number:         37633
>Category:       pkg
>Synopsis:       graphics/imlib2 visibility attribute gcc4 solaris32/64
>Confidential:   no
>Severity:       critical
>Priority:       high
>Responsible:    pkg-manager
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Fri Dec 28 11:30:00 +0000 2007
>Originator:     Gilles Dauphin
>Release:        SunOS 5.10 i86pc
>Organization:
ENST 
>Environment:


System: SunOS bi.enst.fr 5.10 Generic_120012-14 i86pc


>Description:


the visibility attribute is definitively broken in Solaris's gcc >=4
either in 32 or in 64 bit mode.
Suppress the usage of visibility_hiding in all package for solaris.


>How-To-Repeat:


bmake 
all package with visibility_hiding


>Fix:


kind (imlib2 example) of patch is:

[root@redhot 1058] diff -u src/lib/common.h.orig src/lib/common.h                                    
--- src/lib/common.h.orig       Tue Apr 10 00:40:40 2007
+++ src/lib/common.h    Fri Dec 28 12:16:50 2007
@@ -15,7 +15,7 @@
 #include <sys/types.h>
 #endif
 
-#if defined(__GNUC__) && (__GNUC__ >= 4)
+#if defined(__GNUC__) && (__GNUC__ >= 4) && !defined(__sun__)
 #define __hidden __attribute__((visibility("hidden")))
 #else
 #define __hidden


-------------------------------------------------
look also at Xfuncproto.h
the package x11/libXft is broken because of this header in 32bit mode.