From owner-freebsd-ports@FreeBSD.ORG Thu Jun 23 17:39:26 2011 Return-Path: Delivered-To: ports@freebsd.org Received: from mx1.freebsd.org (unknown [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id DC7401065672 for ; Thu, 23 Jun 2011 17:39:25 +0000 (UTC) (envelope-from rhurlin@gwdg.de) Received: from amailer.gwdg.de (amailer.gwdg.de [134.76.10.18]) by mx1.freebsd.org (Postfix) with ESMTP id 70AB18FC1F for ; Thu, 23 Jun 2011 17:39:25 +0000 (UTC) Received: from p579189a3.dip.t-dialin.net ([87.145.137.163] helo=krabat.raven.hur) by mailer.gwdg.de with esmtpsa (TLSv1:AES256-SHA:256) (Exim 4.72) (envelope-from ) id 1QZnsB-0001hJ-GV; Thu, 23 Jun 2011 19:39:23 +0200 Message-ID: <4E037A4A.4000904@gwdg.de> Date: Thu, 23 Jun 2011 19:39:22 +0200 From: Rainer Hurling User-Agent: Mozilla/5.0 (X11; U; FreeBSD amd64; de-DE; rv:1.9.2.18) Gecko/20110622 Thunderbird/3.1.11 MIME-Version: 1.0 To: Koop Mast References: <4E036F01.2020708@gwdg.de> <4E03725E.7070802@rainbow-runner.nl> In-Reply-To: <4E03725E.7070802@rainbow-runner.nl> Content-Type: multipart/mixed; boundary="------------050805000906090706000309" X-Authenticated: Id:rhurlin X-Spam-Level: - X-Virus-Scanned: (clean) by exiscan+sophie Cc: ports@freebsd.org Subject: Re: math/ggobi: compile error with clang X-BeenThere: freebsd-ports@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Porting software to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 23 Jun 2011 17:39:26 -0000 This is a multi-part message in MIME format. --------------050805000906090706000309 Content-Type: text/plain; charset=ISO-8859-15; format=flowed Content-Transfer-Encoding: 7bit On 23.06.2011 19:05 (UTC+1), Koop Mast wrote: > 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, many thanks for the fast reaction. This is exactly what I did (=changing 0 in 1), gcc accepted that and until now it seems to work. Does anybody knows if changing 0 into 1 is ok in this context? I am not able to test, if this works with clang. If someone is willing to try, there is a diff attached. Rainer > -Koop --------------050805000906090706000309 Content-Type: text/plain; name="patch_ggobi_clang.diff" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="patch_ggobi_clang.diff" diff -Naur ggobi.origin/Makefile ggobi/Makefile --- ggobi.origin/Makefile 2011-05-25 16:54:44.000000000 +0200 +++ ggobi/Makefile 2011-06-23 19:15:49.000000000 +0200 @@ -2,11 +2,12 @@ # Date created: 31 January 2010 # Whom: rhurlin # -# $FreeBSD: ports/math/ggobi/Makefile,v 1.4 2011/05/25 13:18:55 pav Exp $ +# $FreeBSD$ # PORTNAME= ggobi PORTVERSION= 2.1.9 +PORTREVISION= 1 CATEGORIES= math graphics MASTER_SITES= http://www.ggobi.org/downloads/ @@ -26,6 +27,11 @@ post-patch: @${REINPLACE_CMD} -e 's|ND_coord_i|ND_coord|' \ ${WRKSRC}/plugins/GraphLayout/graphviz.c + @${REINPLACE_CMD} -e 's|#line 0|#line 1|' \ + ${WRKSRC}/src/ggobi-data.c \ + ${WRKSRC}/src/ggobi-renderer.c \ + ${WRKSRC}/src/ggobi-renderer-cairo.c \ + ${WRKSRC}/src/ggobi-renderer-factory.c \ post-install: ${MKDIR} ${PREFIX}/etc/xdg/ggobi --------------050805000906090706000309--