! Please note that this is a snapshot of our old Bugzilla server, which is read only since May 29, 2020. Please go to gitlab.xfce.org for our new server !
libxfce4util does not compile under Solaris
Status:
RESOLVED: FIXED
Severity:
enhancement
Product:
Libxfce4util
Component:
General

Comments

Description William Bonnet 2008-11-06 20:43:27 CET
G_GNUC_INTERNAL macro must be added at the be beginning of lines to compile with Sun Studio compiler under solaris
Comment 1 Brian J. Tarricone (not reading bugmail) 2008-11-06 21:08:43 CET
That sounds a little odd.  Error messages?  Patches to which declarations?
Comment 2 William Bonnet 2008-11-06 21:28:35 CET
Created attachment 1959 
This patch solve the problem with sunstudio cc
Comment 3 William Bonnet 2008-11-06 21:29:03 CET
Humm sorry patch was not added the first time
Comment 4 Brian J. Tarricone (not reading bugmail) 2008-11-06 21:45:44 CET
Again, please post the error messages.
Comment 5 William Bonnet 2008-11-06 21:58:38 CET
Here are the error logs

cc -DHAVE_CONFIG_H -I. -I.. -I.. "-DDEFAULT_XDG_CACHE_HOME=\"~/.cache\"" "-DDEFAULT_XDG_DATA_HOME=\"~/.local/share\"" "-DDEFAULT_XDG_CONFIG_HOME=\"~/.config\"" -DDEFAULT_XDG_DATA_DIRS=\"/opt/csw/share:/usr/local/share:/usr/share\" -DDEFAULT_XDG_CONFIG_DIRS=\"/opt/csw/etc/xdg:/opt/csw/etc/xfce4:/etc/xdg\" -DDATADIR=\"/opt/csw/share\" -DSYSCONFDIR=\"/opt/csw/etc\" -DPACKAGE_LOCALE_DIR=\"/opt/csw/share/locale\" -DG_LOG_DOMAIN=\"libxfce4util\" -DKIOSKDIR=\"/opt/csw/etc/xdg/xfce4/kiosk\" -DKIOSKDEF=\"ALL\" -DLIBXFCE4UTIL_COMPILATION -I/export/home/william/community/blastwave/build.5.11-i386/opt/csw/include -I/opt/csw/include -I/export/home/william/community/blastwave/build.5.11-i386/opt/csw/include/xfce4 -I/opt/csw/include/glib-2.0 -I/opt/csw/lib/glib-2.0/include -xO3 -xtarget=generic -xarch=generic -I/export/home/william/community/blastwave/build.5.11-i386/opt/csw/include -I/opt/csw/include -xlibmil -errtags=yes -erroff=E_EMPTY_DECLARATION -DG_DISABLE_CAST_CHECKS -DG_DISABLE_ASSERT -DG_DISABLE_CHECKS -c libxfce4util-private.c  -KPIC -DPIC -o .libs/libxfce4util_la-libxfce4util-private.o
"../libxfce4util/libxfce4util-private.h", line 33: warning: no explicit type given (E_NO_EXPLICIT_TYPE_GIVEN)
"../libxfce4util/libxfce4util-private.h", line 33: warning: useless declaration (E_USELESS_DECLARATION)
"../libxfce4util/libxfce4util-private.h", line 35: syntax error before or at: ;
"libxfce4util-private.c", line 38: identifier redefined: _xfce_i18n_init
        current : function(void) returning void
        previous: function(void) returning void : "../libxfce4util/libxfce4util-private.h", line 33
cc: acomp failed for libxfce4util-private.c
gmake[4]: *** [libxfce4util_la-libxfce4util-private.lo] Erreur 1
Comment 6 William Bonnet 2008-11-06 22:01:05 CET
Line 33 where stands the error is the following :

void _xfce_i18n_init (void) G_GNUC_INTERNAL;

Macro G_GNUC_INTERNAL is expended to __hidden and has to be at the beginning of the line when compiling with SunStudio.

Kind regards,
W.
Comment 7 Brian J. Tarricone (not reading bugmail) 2008-11-06 22:24:12 CET
Does it work at the beginning of the line (not just compile, but function as intended) for gcc as well?  Otherwise this is kinda a no-go...
Comment 8 Brian J. Tarricone (not reading bugmail) 2008-11-06 22:32:10 CET
Or maybe we should just drop G_GNUC_INTERNAL entirely; those symbols won't get exported anyway due to -export-symbols-regex excluding symbols that start with a '_'.
Comment 9 William Bonnet 2008-11-06 22:34:49 CET
If some one already has a build environnement setup and some minutes, would it be possible to test my patch on linux for instance please ?

Otherwise i can set ip up but i won't do it before the end of the long coming week end...

Thanks in advance.

King regards
Comment 10 Brian J. Tarricone (not reading bugmail) 2008-11-06 23:00:54 CET
Looks like before is OK for gcc as well:
http://library.gnome.org/devel/glib/stable/glib-Miscellaneous-Macros.html#G-GNUC-INTERNAL:CAPS
Comment 11 William Bonnet 2008-11-06 23:29:11 CET
So if you could accept my patch if would be cool for SunStudio users, bec
Comment 12 William Bonnet 2008-11-06 23:30:34 CET
So if you could accept this proposal it would be cool for SunStudio users, because i submitted many fixes of this kind for Thunar and others like Terminal.

Thanks in advance

regards
Comment 13 Olivier Fourdan editbugs 2008-11-08 09:12:52 CET
Builds fine here.
Comment 14 Olivier Fourdan editbugs 2008-11-08 09:17:31 CET
Brian, the link you provided states that "for portability, the attribute should be placed before the function declaration. While GCC allows the macro after the declaration, Sun Studio does not."

So it looks like a no brainer to me and I am ready to commit that patch in both trunk and 4.4 branch if noone disagrees.
Comment 15 Brian J. Tarricone (not reading bugmail) 2008-11-08 09:47:33 CET
Yes, that's what I said ^_^.  Go for it.
Comment 16 Olivier Fourdan editbugs 2008-11-08 10:52:28 CET
Applied, both branches. Thanks for the patch :)

Bug #4580

Reported by:
William Bonnet
Reported on: 2008-11-06
Last modified on: 2009-07-14

People

Assignee:
Xfce Bug Triage
CC List:
1 user

Version

Attachments

Additional information