compile problems (xfce's Thunar application)

What could be causing this error? It works fine with gcc, I am using the same compiler/linker flags for both. Per the developer of this application, it doesn't appear to be the application related...? Thanks.

gmake[1]: Entering directory `/data/Xfce-beta-src/xfce-4.3.99.1-src/Thunar-0.4.0rc1/thunar-vfs'

source='thunar-vfs-io-local.c' object='libthunar_vfs_1_la-thunar-vfs-io-local.lo' libtool=yes \

DEPDIR=.deps depmode=none /bin/bash ../depcomp \

/bin/bash ../libtool --mode=compile --tag=CC /opt/SUNWspro/bin/cc -DHAVE_CONFIG_H -I. -I. -I.. -I.. -DEXO_API_SUBJECT_TO_CHANGE -DEXO_DISABLE_DEPRECATED -DG_LOG_DOMAIN=\"thunar-vfs\" -DLIBEXECDIR=\"/opt/Xfce-beta/libexec\" -DSN_API_NOT_YET_FROZEN -DTHUNAR_VFS_COMPILATION -DTHUNAR_VFS_VERSION_API=\"1\" -NDEBUG -DG_DISABLE_CAST_CHECKS -I/opt/Xfce-beta/include -I/usr/local/include -I/usr/X11/include -I/usr/openwin/include -I/usr/sfw/include -I/opt/Xfce-beta/include/exo-0.3 -I/opt/Xfce-beta/include/gtk-2.0 -I/opt/Xfce-beta/include/xfce4 -I/opt/Xfce-beta/lib/gtk-2.0/include -I/opt/Xfce-beta/include/atk-1.0 -I/opt/Xfce-beta/include/cairo -I/opt/Xfce-beta/include/pango-1.0 -I/opt/Xfce-beta/include/glib-2.0 -I/opt/Xfce-beta/lib/glib-2.0/include -I/opt/Xfce-beta/include/freetype2 -I/opt/Xfce-beta/include -I/opt/Xfce-beta/include/libpng12-D_REENTRANT -I/opt/Xfce-beta/include/glib-2.0 -I/opt/Xfce-beta/lib/glib-2.0/include-I/opt/Xfce-beta/include/libpng12-I/opt/Xfce-beta/include/startup-notification-1.0-I/opt/Xfce-beta/include -I/usr/local/include -I/usr/X11/include -I/usr/openwin/include -I/usr/sfw/include -c -o libthunar_vfs_1_la-thunar-vfs-io-local.lo `test -f 'thunar-vfs-io-local.c' || echo './'`thunar-vfs-io-local.c

/opt/SUNWspro/bin/cc -DHAVE_CONFIG_H -I. -I. -I.. -I.. -DEXO_API_SUBJECT_TO_CHANGE -DEXO_DISABLE_DEPRECATED -DG_LOG_DOMAIN=\"thunar-vfs\" -DLIBEXECDIR=\"/opt/Xfce-beta/libexec\" -DSN_API_NOT_YET_FROZEN -DTHUNAR_VFS_COMPILATION -DTHUNAR_VFS_VERSION_API=\"1\" -NDEBUG -DG_DISABLE_CAST_CHECKS -I/opt/Xfce-beta/include -I/usr/local/include -I/usr/X11/include -I/usr/openwin/include -I/usr/sfw/include -I/opt/Xfce-beta/include/exo-0.3 -I/opt/Xfce-beta/include/gtk-2.0 -I/opt/Xfce-beta/include/xfce4 -I/opt/Xfce-beta/lib/gtk-2.0/include -I/opt/Xfce-beta/include/atk-1.0 -I/opt/Xfce-beta/include/cairo -I/opt/Xfce-beta/include/pango-1.0 -I/opt/Xfce-beta/include/glib-2.0 -I/opt/Xfce-beta/lib/glib-2.0/include -I/opt/Xfce-beta/include/freetype2 -I/opt/Xfce-beta/include -I/opt/Xfce-beta/include/libpng12 -D_REENTRANT -I/opt/Xfce-beta/include/glib-2.0 -I/opt/Xfce-beta/lib/glib-2.0/include -I/opt/Xfce-beta/include/libpng12 -I/opt/Xfce-beta/include/startup-notification-1.0 -I/opt/Xfce-beta/include -I/usr/local/include -I/usr/X11/include -I/usr/openwin/include -I/usr/sfw/include -c thunar-vfs-io-local.c -KPIC -DPIC -o .libs/libthunar_vfs_1_la-thunar-vfs-io-local.o

cc: Warning: option -N passed to ld

"/opt/Xfce-beta/include/xfce4/libxfce4util/libxfce4util-config.h", line 31: warning: syntax error: empty declaration

"/opt/Xfce-beta/include/xfce4/libxfce4util/libxfce4util-config.h", line 49: warning: syntax error: empty declaration

"/opt/Xfce-beta/include/xfce4/libxfce4util/xfce-generics.h", line 31: warning: syntax error: empty declaration

"/opt/Xfce-beta/include/xfce4/libxfce4util/xfce-generics.h", line 115: warning: syntax error: empty declaration

"/opt/Xfce-beta/include/xfce4/libxfce4util/xfce-kiosk.h", line 31: warning: syntax error: empty declaration

"/opt/Xfce-beta/include/xfce4/libxfce4util/xfce-kiosk.h", line 43: warning: syntax error: empty declaration

"/opt/Xfce-beta/include/xfce4/libxfce4util/xfce-license.h", line 29: warning: syntax error: empty declaration

"/opt/Xfce-beta/include/xfce4/libxfce4util/xfce-license.h", line 52: warning: syntax error: empty declaration

"/opt/Xfce-beta/include/exo-0.3/exo/exo-config.h", line 32: warning: syntax error: empty declaration

"/opt/Xfce-beta/include/exo-0.3/exo/exo-config.h", line 94: warning: syntax error: empty declaration

"/opt/Xfce-beta/include/exo-0.3/exo/exo-binding.h", line 33: warning: syntax error: empty declaration

"/opt/Xfce-beta/include/exo-0.3/exo/exo-binding.h", line 111: warning: syntax error: empty declaration

"/opt/Xfce-beta/include/gtk-2.0/gtk/gtktextbuffer.h", line 52: warning: enumerator value overflows INT_MAX (2147483647)

"/opt/Xfce-beta/include/gtk-2.0/gtk/gtktextbuffer.h", line 53: warning: enumerator value overflows INT_MAX (2147483647)

"/opt/Xfce-beta/include/gtk-2.0/gtk/gtktextbuffer.h", line 55: warning: enumerator value overflows INT_MAX (2147483647)

"/opt/Xfce-beta/include/exo-0.3/exo/exo-cell-renderer-ellipsized-text.h", line 34: warning: syntax error: empty declaration

"/opt/Xfce-beta/include/exo-0.3/exo/exo-cell-renderer-ellipsized-text.h", line 64: warning: syntax error: empty declaration

"/opt/Xfce-beta/include/exo-0.3/exo/exo-cell-renderer-icon.h", line 32: warning: syntax error: empty declaration

"/opt/Xfce-beta/include/exo-0.3/exo/exo-cell-renderer-icon.h", line 69: warning: syntax error: empty declaration

"/opt/Xfce-beta/include/exo-0.3/exo/exo-execute.h", line 30: warning: syntax error: empty declaration

"/opt/Xfce-beta/include/exo-0.3/exo/exo-execute.h", line 54: warning: syntax error: empty declaration

"/opt/Xfce-beta/include/exo-0.3/exo/exo-gdk-pixbuf-extensions.h", line 34: warning: syntax error: empty declaration

"/opt/Xfce-beta/include/exo-0.3/exo/exo-gdk-pixbuf-extensions.h", line 65: warning: syntax error: empty declaration

"/opt/Xfce-beta/include/exo-0.3/exo/exo-gtk-extensions.h", line 32: warning: syntax error: empty declaration

"/opt/Xfce-beta/include/exo-0.3/exo/exo-gtk-extensions.h", line 43: warning: syntax error: empty declaration

"/opt/Xfce-beta/include/exo-0.3/exo/exo-gobject-extensions.h", line 32: warning: syntax error: empty declaration

"/opt/Xfce-beta/include/exo-0.3/exo/exo-gobject-extensions.h", line 37: warning: syntax error: empty declaration

"/opt/Xfce-beta/include/exo-0.3/exo/exo-icon-bar.h", line 32: warning: syntax error: empty declaration

"/opt/Xfce-beta/include/exo-0.3/exo/exo-icon-bar.h", line 99: warning: syntax error: empty declaration

"/opt/Xfce-beta/include/exo-0.3/exo/exo-icon-chooser-dialog.h", line 32: warning: syntax error: empty declaration

"/opt/Xfce-beta/include/exo-0.3/exo/exo-icon-chooser-dialog.h", line 76: warning: syntax error: empty declaration

"/opt/Xfce-beta/include/exo-0.3/exo/exo-icon-view.h", line 33: warning: syntax error: empty declaration

"/opt/Xfce-beta/include/exo-0.3/exo/exo-icon-view.h", line 344: warning: syntax error: empty declaration

"/opt/Xfce-beta/include/exo-0.3/exo/exo-md5.h", line 33: warning: syntax error: empty declaration

"/opt/Xfce-beta/include/exo-0.3/exo/exo-md5.h", line 58: warning: syntax error: empty declaration

"/opt/Xfce-beta/include/exo-0.3/exo/exo-string.h", line 32: warning: syntax error: empty declaration

"/opt/Xfce-beta/include/exo-0.3/exo/exo-string.h", line 55: warning: syntax error: empty declaration

"/opt/Xfce-beta/include/exo-0.3/exo/exo-toolbars-model.h", line 33: warning: syntax error: empty declaration

"/opt/Xfce-beta/include/exo-0.3/exo/exo-toolbars-model.h", line 183: warning: syntax error: empty declaration

"/opt/Xfce-beta/include/exo-0.3/exo/exo-toolbars-view.h", line 33: warning: syntax error: empty declaration

"/opt/Xfce-beta/include/exo-0.3/exo/exo-toolbars-view.h", line 87: warning: syntax error: empty declaration

"/opt/Xfce-beta/include/exo-0.3/exo/exo-toolbars-editor.h", line 33: warning: syntax error: empty declaration

"/opt/Xfce-beta/include/exo-0.3/exo/exo-toolbars-editor.h", line 78: warning: syntax error: empty declaration

"/opt/Xfce-beta/include/exo-0.3/exo/exo-toolbars-editor-dialog.h", line 33: warning: syntax error: empty declaration

"/opt/Xfce-beta/include/exo-0.3/exo/exo-toolbars-editor-dialog.h", line 68: warning: syntax error: empty declaration

"/opt/Xfce-beta/include/exo-0.3/exo/exo-tree-view.h", line 30: warning: syntax error: empty declaration

"/opt/Xfce-beta/include/exo-0.3/exo/exo-tree-view.h", line 80: warning: syntax error: empty declaration

"/opt/Xfce-beta/include/exo-0.3/exo/exo-url.h", line 30: warning: syntax error: empty declaration

"/opt/Xfce-beta/include/exo-0.3/exo/exo-url.h", line 60: warning: syntax error: empty declaration

"/opt/Xfce-beta/include/exo-0.3/exo/exo-utils.h", line 30: warning: syntax error: empty declaration

"/opt/Xfce-beta/include/exo-0.3/exo/exo-utils.h", line 84: warning: syntax error: empty declaration

"/opt/Xfce-beta/include/exo-0.3/exo/exo-wrap-table.h", line 31: warning: syntax error: empty declaration

"/opt/Xfce-beta/include/exo-0.3/exo/exo-wrap-table.h", line 79: warning: syntax error: empty declaration

"/opt/Xfce-beta/include/exo-0.3/exo/exo-xsession-client.h", line 32: warning: syntax error: empty declaration

"/opt/Xfce-beta/include/exo-0.3/exo/exo-xsession-client.h", line 79: warning: syntax error: empty declaration

"../thunar-vfs/thunar-vfs-config.h", line 30: warning: syntax error: empty declaration

"../thunar-vfs/thunar-vfs-config.h", line 61: warning: syntax error: empty declaration

"../thunar-vfs/thunar-vfs-path.h", line 30: warning: syntax error: empty declaration

"../thunar-vfs/thunar-vfs-path.h", line 277: warning: syntax error: empty declaration

"../thunar-vfs/thunar-vfs-path-private.h", line 30: warning: syntax error: empty declaration

"../thunar-vfs/thunar-vfs-path-private.h", line 92: warning: syntax error: empty declaration

"../thunar-vfs/thunar-vfs-types.h", line 29: warning: syntax error: empty declaration

"../thunar-vfs/thunar-vfs-types.h", line 156: warning: syntax error: empty declaration

"../thunar-vfs/thunar-vfs-io-ops.h", line 31: warning: syntax error: empty declaration

"../thunar-vfs/thunar-vfs-io-ops.h", line 90: warning: syntax error: empty declaration

"../thunar-vfs/thunar-vfs-io-local-xfer.h", line 30: warning: syntax error: empty declaration

"../thunar-vfs/thunar-vfs-io-local-xfer.h", line 63: warning: syntax error: empty declaration

"../thunar-vfs/thunar-vfs-mime-info.h", line 26: warning: syntax error: empty declaration

"../thunar-vfs/thunar-vfs-mime-info.h", line 104: warning: syntax error: empty declaration

"../thunar-vfs/thunar-vfs-info.h", line 32: warning: syntax error: empty declaration

"../thunar-vfs/thunar-vfs-info.h", line 213: warning: syntax error: empty declaration

"../thunar-vfs/thunar-vfs-io-local.h", line 31: warning: syntax error: empty declaration

"../thunar-vfs/thunar-vfs-io-local.h", line 61: warning: syntax error: empty declaration

"../thunar-vfs/thunar-vfs-mime-handler.h", line 30: warning: syntax error: empty declaration

"../thunar-vfs/thunar-vfs-mime-handler.h", line 80: warning: syntax error: empty declaration

"../thunar-vfs/thunar-vfs-mime-application.h", line 31: warning: syntax error: empty declaration

"../thunar-vfs/thunar-vfs-mime-application.h", line 89: warning: syntax error: empty declaration

"../thunar-vfs/thunar-vfs-mime-database.h", line 27: warning: syntax error: empty declaration

"../thunar-vfs/thunar-vfs-mime-database.h", line 74: warning: syntax error: empty declaration

"../thunar-vfs/thunar-vfs-mime-database-private.h", line 30: warning: syntax error: empty declaration

"../thunar-vfs/thunar-vfs-mime-database-private.h", line 40: warning: syntax error: empty declaration

"../thunar-vfs/thunar-vfs-os.h", line 30: warning: syntax error: empty declaration

"../thunar-vfs/thunar-vfs-os.h", line 40: warning: syntax error: empty declaration

"../thunar-vfs/thunar-vfs-private.h", line 30: warning: syntax error: empty declaration

"../thunar-vfs/thunar-vfs-private.h", line 118: warning: syntax error: empty declaration

"thunar-vfs-io-local.c", line 185: syntax error before or at: if

"thunar-vfs-io-local.c", line 185: cannot recover from previous errors

cc: acomp failed for thunar-vfs-io-local.c

gmake[1]: *** [libthunar_vfs_1_la-thunar-vfs-io-local.lo] Error 1

gmake[1]: Leaving directory `/data/Xfce-beta-src/xfce-4.3.99.1-src/Thunar-0.4.0rc1/thunar-vfs'

gmake: *** [all] Error 2

[12528 byte] By [ajangity] at [2007-11-26 9:59:01]
# 1

First of all, it's impossible to tell what the problem is without the source code.

There are still several things to mention:

1. Sun Studio compilers flags are different from gcc (some are the same, like -I or -D, but other aren't), so you generally can't use one flags set for both compilers.

2. "enumerator value overflows INT_MAX" suggests that gcc has a non-standard extention, which allows to have larger-than-int enumeration constant. Sun cc doesn't allow this according to paragraph 6.7.2.2 of C language standard. It is possible, however, that the erroneous enumerator value in question was induced by other compilation errors. Again, it's impossible to tell without the source code.

MaximKartashev at 2007-7-7 1:25:37 > top of Java-index,Development Tools,Solaris and Linux Development Tools...
# 2

Thanks for the feedback.

Does this help, do you see anything stand out? Is it a matter of missing .h or specific flags?

http://svn.xfce.org/blame.php?repname=xfce4&path=%2Fthunar%2Ftags%2Fthunar- 0.4.0rc1%2Fthunar-vfs%2Fthunar-vfs-io-local.c&rev=0&sc=0

http://www.xfce.org/archive/xfce-4.3.99.1/src/Thunar-0.4.0rc1.tar.bz2

ajangity at 2007-7-7 1:25:37 > top of Java-index,Development Tools,Solaris and Linux Development Tools...
# 3

First of all, I don't think that it's a matter of a specific flag; the only flag that confuses me is -NDEBUG, it doesn't look neither like a gcc flag nor like a Sun's cc flag.

As for the source, I believe the root of the problem is with config header(s) (thunar-vfs-config.h and suchlike). I would check it first.

The only error reported refers to strange line number -- there's no 'if' at line 185 in thunar-vfs-io-local.c. It's very likely that some macro was not defined and compiler's gone crazy.

MaximKartashev at 2007-7-7 1:25:37 > top of Java-index,Development Tools,Solaris and Linux Development Tools...
# 4

A problem common to many OpenSource applications is that they have not been tried with Sun compilers. Configuration scripts typcially test for specific compilers, and since Sun is "none of the above", the configuration typically defaults to something that is incomplete or inconsistent.

Try the Thunar wiki or forum to see if anyone has configured it for use with Sun compilers. If not, you get to be the person to do it, and submit the corrected configuration back to the source tree. :-)

clamage45 at 2007-7-7 1:25:37 > top of Java-index,Development Tools,Solaris and Linux Development Tools...
# 5

The problem is with defines in file thunar-vfs/thunar-vfs-path-private.h and here is the patch for Thunar-0.8.0 which resolves this problem:

diff -Nru Thunar-0.8.0-orig/thunar-vfs/thunar-vfs-path-private.h Thunar-0.8.0/thunar-vfs/thunar-vfs-path-private.h

Thunar-0.8.0-orig/thunar-vfs/thunar-vfs-path-private.h2007-01-20 21:39:09.000000000 +0100

+++ Thunar-0.8.0/thunar-vfs/thunar-vfs-path-private.h2007-01-31 02:33:27.348724000 +0100

@@ -29,12 +29,13 @@

G_BEGIN_DECLS;

-/* Support macros for compilers that don't support proper inlining */

+/* Support macros for compilers that don't support proper inlining

#define thunar_vfs_path_ref(path) (exo_atomic_inc (&(THUNAR_VFS_PATH ((path))->ref_count)), path)

#define thunar_vfs_path_is_root(path)(THUNAR_VFS_PATH ((path))->parent == NULL)

#define thunar_vfs_path_get_name(path)(((const gchar *) path) + sizeof (ThunarVfsPath))

#define thunar_vfs_path_get_parent(path) (THUNAR_VFS_PATH ((path))->parent)

#define thunar_vfs_path_get_scheme(path) (THUNAR_VFS_PATH ((path))->ref_count & THUNAR_VFS_PATH_SCHEME_MASK)

+*/

/* global shared variables */

extern ThunarVfsPath *_thunar_vfs_path_trash_root G_GNUC_INTERNAL;

zaga at 2007-7-7 1:25:37 > top of Java-index,Development Tools,Solaris and Linux Development Tools...