Bug 159328 - [PATCH] fix math/ggobi to build with clang
Summary: [PATCH] fix math/ggobi to build with clang
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: Normal Affects Only Me
Assignee: Rene Ladan
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-07-31 12:50 UTC by Rainer Hurling
Modified: 2011-08-05 07:40 UTC (History)
0 users

See Also:


Attachments
file.diff (536 bytes, patch)
2011-07-31 12:50 UTC, Rainer Hurling
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Rainer Hurling freebsd_committer freebsd_triage 2011-07-31 12:50:07 UTC
As criticised by pointyhad on 16/06/2011 and 24/07/2011 for amd64, port math/ggobi does not run with clang compiler. 

It seems, the main error is in the 'line control' statement of src/ggobi-data.c, l.45: #line 0 "data.gob" (and others). The GObject builder produced a line number 0 (zero) on this and some other places in GGobi's code.


The official cpp online docs on http://gcc.gnu.org/onlinedocs/cpp/Line-Control.html define

#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 as valid, whilst clang produces an error '#line directive requires a positive integer argument'.

I think in this case it would be correct to change value 0 into 1 (#line 1). GCC is able to build that and it seems to work fine. I tried to contact the ggobi developers without success for more than a month now.

At least with gcc this solution seems to work right. I had not been able to test it with clang. Please test with clang before committing.

Fix: Apply the attached patch.


Patch attached with submission follows:
How-To-Repeat: Build math/ggobi with clang.
Comment 1 Rene Ladan freebsd_committer freebsd_triage 2011-08-04 22:21:55 UTC
Responsible Changed
From-To: freebsd-ports-bugs->rene

Grab
Comment 2 Rene Ladan freebsd_committer freebsd_triage 2011-08-05 07:37:38 UTC
State Changed
From-To: open->closed

Committed, seems to run fine with clang.
Comment 3 dfilter service freebsd_committer freebsd_triage 2011-08-05 07:39:13 UTC
rene        2011-08-05 06:37:21 UTC

  FreeBSD ports repository

  Modified files:
    math/ggobi           Makefile 
  Log:
  Fix build with clang
  
  PR:             ports/159328
  Submitted by:   maintainer
  
  Revision  Changes    Path
  1.5       +5 -0      ports/math/ggobi/Makefile
_______________________________________________
cvs-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/cvs-all
To unsubscribe, send any mail to "cvs-all-unsubscribe@freebsd.org"