math/ggobi: compile error with clang

Koop Mast kwm at rainbow-runner.nl
Thu Jun 23 17:06:32 UTC 2011


On 6/23/2011 18:51 , Rainer Hurling wrote:
> I just discovered, that math/ggobi does not compile with clang, see:
>
> http://pointyhat.freebsd.org/errorlogs/amd64-errorlogs/e.9-exp.20110616185105/ggobi-2.1.9.log 
>
>
> It seems, the main error is in 'line control' statement of 
> src/ggobi-data.c, l.45
>
> #line 0 "data.gob"
> static void ggobi_data_class_init (GGobiDataClass * c) G_GNUC_UNUSED;
>
> The official cpp online docs on 
> http://gcc.gnu.org/onlinedocs/cpp/Line-Control.html defines
>
> #line linenum
> linenum is a non-negative decimal integer constant. It specifies the 
> line number which should be reported for the following line of input. 
> Subsequent lines are counted from linenum.
>
> It seems gcc accepts the 0 (zero) as valid, whilst clang produces an 
> error '#line directive requires a positive integer argument'.
>
> What is the meaning of line 0 in this context? At line 1 (the first 
> line in src/data.gob) there is the initiation '%h{' for the whole file 
> contents. Does 0 mean, take the whole file?
>
> Would it be correct to change value 0 into 1 (#line 1)? At least, gcc 
> is able to build that and it seems to work fine.
>
> My system is compiled with gcc, so it would be nice, if someone would 
> give it a try with clang.
>
> Many thanks in advance,
> Rainer Hurling

I had the same problem with devel/gob2 ages ago. This following is the 
solution I settled on. I don't know if this is correct or not but it 
seems to work fine.
http://www.freebsd.org/cgi/cvsweb.cgi/~checkout~/ports/devel/gob2/files/patch-src_out.c?rev=1.1;content-type=text%2Fplain

-Koop


More information about the freebsd-ports mailing list