ggobi fails to build with clang
The group you are posting to is a
Usenet group . Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
From:
Misty De Meo <mistyde... @gmail.com>
Date: Tue, 17 Jul 2012 07:50:52 -0700 (PDT)
Local: Tues, Jul 17 2012 10:50 am
Subject: ggobi fails to build with clang
In a few spots in ggobi, there is a "#line 0" directive. This builds on gcc, but clang throws an error because it doesn't consider 0 to be a positive integer:
"ggobi-renderer.c:54:7: error: #line directive requires a positive integer argument"
I'm unsure of exactly what the #line directive does, but ggobi does appear to build and run fine with clang and gcc if all instances of "#line 0" are changed to "#line 1".
See also: https://github.com/mxcl/homebrew/pull/13423 (Homebrew bug report) http://lists.freebsd.org/pipermail/freebsd-ports/2011-June/068362.html (FreeBSD bug report)
The following patch fixes the issue:
diff --git a/src/ggobi-data.c b/src/ggobi-data.c index ccb52dc..fbd756e 100644 --- a/src/ggobi-data.c +++ b/src/ggobi-data.c @@ -42,7 +42,7 @@ typedef GGobiDataClass SelfClass; /* here are local prototypes */ static void ___object_set_property (GObject *object, guint property_id, const GValue *value, GParamSpec *pspec); static void ___object_get_property (GObject *object, guint property_id, GValue *value, GParamSpec *pspec); -#line 0 "data.gob" +#line 1 "data.gob" static void ggobi_data_class_init (GGobiDataClass * c) G_GNUC_UNUSED; #line 48 "ggobi-data.c" #line 191 "data.gob" diff --git a/src/ggobi-renderer-cairo.c b/src/ggobi-renderer-cairo.c index 0b51ab6..12a47cf 100644 --- a/src/ggobi-renderer-cairo.c +++ b/src/ggobi-renderer-cairo.c @@ -57,10 +57,10 @@ struct _GGobiRendererCairoPrivate { /* here are local prototypes */ static void ___object_set_property (GObject *object, guint property_id, const GValue *value, GParamSpec *pspec); static void ___object_get_property (GObject *object, guint property_id, GValue *value, GParamSpec *pspec); -#line 0 "renderer-cairo.gob" +#line 1 "renderer-cairo.gob" static void ggobi_renderer_cairo_init (GGobiRendererCairo * o) G_GNUC_UNUSED; #line 63 "ggobi-renderer-cairo.c" -#line 0 "renderer-cairo.gob" +#line 1 "renderer-cairo.gob" static void ggobi_renderer_cairo_class_init (GGobiRendererCairoClass * c) G_GNUC_UNUSED; #line 66 "ggobi-renderer-cairo.c" #line 36 "renderer-cairo.gob" diff --git a/src/ggobi-renderer-factory.c b/src/ggobi-renderer-factory.c index ee1c93e..5be74bf 100644 --- a/src/ggobi-renderer-factory.c +++ b/src/ggobi-renderer-factory.c @@ -44,10 +44,10 @@ typedef GGobiRendererFactory Self; typedef GGobiRendererFactoryClass SelfClass;
/* here are local prototypes */ -#line 0 "renderer-factory.gob" +#line 1 "renderer-factory.gob" static void ggobi_renderer_factory_init (GGobiRendererFactory * o) G_GNUC_UNUSED; #line 50 "ggobi-renderer-factory.c" -#line 0 "renderer-factory.gob" +#line 1 "renderer-factory.gob" static void ggobi_renderer_factory_class_init (GGobiRendererFactoryClass * c) G_GNUC_UNUSED; #line 53 "ggobi-renderer-factory.c" static GGobiRenderer * ___real_ggobi_renderer_factory_create (GGobiRendererFactory * self, GdkDrawable * parent); diff --git a/src/ggobi-renderer.c b/src/ggobi-renderer.c index 1231145..7174c13 100644 --- a/src/ggobi-renderer.c +++ b/src/ggobi-renderer.c @@ -51,7 +51,7 @@ struct _GGobiRendererPrivate { /* here are local prototypes */ static void ___object_set_property (GObject *object, guint property_id, const GValue *value, GParamSpec *pspec); static void ___object_get_property (GObject *object, guint property_id, GValue *value, GParamSpec *pspec); -#line 0 "renderer.gob" +#line 1 "renderer.gob" static void ggobi_renderer_init (GGobiRenderer * o) G_GNUC_UNUSED; #line 57 "ggobi-renderer.c" static GdkDrawable * ___real_ggobi_renderer_create_target (GGobiRenderer * self, GdkDrawable * parent);
You must
Sign in before you can post messages.
You do not have the permission required to post.
From:
Michael Lawrence <lawr... @gmail.com>
Date: Wed, 18 Jul 2012 02:03:37 -0700
Local: Wed, Jul 18 2012 5:03 am
Subject: Re: [GGobi] ggobi fails to build with clang
These #line directives are generated by gob (GObject Builder). It is kind
of a pain to have to patch generated files. Then again, I recently checked
those files into svn, because getting gob to work on Windows is becoming
increasingly difficult.
I have no idea what #line 0 would mean, since file lines are typically
enumerated with 1-based indexes.
Thanks for the patch,
Michael
On Tue, Jul 17, 2012 at 7:50 AM, Misty De Meo <mistyde... @gmail.com> wrote:
> In a few spots in ggobi, there is a "#line 0" directive. This builds on
> gcc, but clang throws an error because it doesn't consider 0 to be a
> positive integer:
> "ggobi-renderer.c:54:7: error: #line directive requires a positive integer
> argument"
> I'm unsure of exactly what the #line directive does, but ggobi does appear
> to build and run fine with clang and gcc if all instances of "#line 0" are
> changed to "#line 1".
> See also:
> https://github.com/mxcl/homebrew/pull/13423 (Homebrew bug report)
> http://lists.freebsd.org/pipermail/freebsd-ports/2011-June/068362.htm... bug report)
> The following patch fixes the issue:
> diff --git a/src/ggobi-data.c b/src/ggobi-data.c
> index ccb52dc..fbd756e 100644
> --- a/src/ggobi-data.c
> +++ b/src/ggobi-data.c
> @@ -42,7 +42,7 @@ typedef GGobiDataClass SelfClass;
> /* here are local prototypes */
> static void ___object_set_property (GObject *object, guint property_id,
> const GValue *value, GParamSpec *pspec);
> static void ___object_get_property (GObject *object, guint property_id,
> GValue *value, GParamSpec *pspec);
> -#line 0 "data.gob"
> +#line 1 "data.gob"
> static void ggobi_data_class_init (GGobiDataClass * c) G_GNUC_UNUSED;
> #line 48 "ggobi-data.c"
> #line 191 "data.gob"
> diff --git a/src/ggobi-renderer-cairo.c b/src/ggobi-renderer-cairo.c
> index 0b51ab6..12a47cf 100644
> --- a/src/ggobi-renderer-cairo.c
> +++ b/src/ggobi-renderer-cairo.c
> @@ -57,10 +57,10 @@ struct _GGobiRendererCairoPrivate {
> /* here are local prototypes */
> static void ___object_set_property (GObject *object, guint property_id,
> const GValue *value, GParamSpec *pspec);
> static void ___object_get_property (GObject *object, guint property_id,
> GValue *value, GParamSpec *pspec);
> -#line 0 "renderer-cairo.gob"
> +#line 1 "renderer-cairo.gob"
> static void ggobi_renderer_cairo_init (GGobiRendererCairo * o)
> G_GNUC_UNUSED;
> #line 63 "ggobi-renderer-cairo.c"
> -#line 0 "renderer-cairo.gob"
> +#line 1 "renderer-cairo.gob"
> static void ggobi_renderer_cairo_class_init (GGobiRendererCairoClass * c)
> G_GNUC_UNUSED;
> #line 66 "ggobi-renderer-cairo.c"
> #line 36 "renderer-cairo.gob"
> diff --git a/src/ggobi-renderer-factory.c b/src/ggobi-renderer-factory.c
> index ee1c93e..5be74bf 100644
> --- a/src/ggobi-renderer-factory.c
> +++ b/src/ggobi-renderer-factory.c
> @@ -44,10 +44,10 @@ typedef GGobiRendererFactory Self;
> typedef GGobiRendererFactoryClass SelfClass;
> /* here are local prototypes */
> -#line 0 "renderer-factory.gob"
> +#line 1 "renderer-factory.gob"
> static void ggobi_renderer_factory_init (GGobiRendererFactory * o)
> G_GNUC_UNUSED;
> #line 50 "ggobi-renderer-factory.c"
> -#line 0 "renderer-factory.gob"
> +#line 1 "renderer-factory.gob"
> static void ggobi_renderer_factory_class_init (GGobiRendererFactoryClass
> * c) G_GNUC_UNUSED;
> #line 53 "ggobi-renderer-factory.c"
> static GGobiRenderer * ___real_ggobi_renderer_factory_create
> (GGobiRendererFactory * self, GdkDrawable * parent);
> diff --git a/src/ggobi-renderer.c b/src/ggobi-renderer.c
> index 1231145..7174c13 100644
> --- a/src/ggobi-renderer.c
> +++ b/src/ggobi-renderer.c
> @@ -51,7 +51,7 @@ struct _GGobiRendererPrivate {
> /* here are local prototypes */
> static void ___object_set_property (GObject *object, guint property_id,
> const GValue *value, GParamSpec *pspec);
> static void ___object_get_property (GObject *object, guint property_id,
> GValue *value, GParamSpec *pspec);
> -#line 0 "renderer.gob"
> +#line 1 "renderer.gob"
> static void ggobi_renderer_init (GGobiRenderer * o) G_GNUC_UNUSED;
> #line 57 "ggobi-renderer.c"
> static GdkDrawable * ___real_ggobi_renderer_create_target (GGobiRenderer
> * self, GdkDrawable * parent);
> --
> You received this message because you are subscribed to the Google Groups
> "GGobi users" group.
> To view this discussion on the web visit
> https://groups.google.com/d/msg/ggobi/-/nXTVoMaAzj8J .
> To post to this group, send email to ggobi@googlegroups.com.
> To unsubscribe from this group, send email to
> ggobi+unsubscribe@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/ggobi?hl=en .
You must
Sign in before you can post messages.
You do not have the permission required to post.