Opened 12 years ago
Closed 12 years ago
#36397 closed defect (fixed)
jgraph-8.3 fails to compile with clang
Reported by: | brett.higgins@… | Owned by: | s@… |
---|---|---|---|
Priority: | Normal | Milestone: | |
Component: | ports | Version: | 2.1.2 |
Keywords: | clang | Cc: | |
Port: | jgraph |
Description
Short version: clang doesn't like old-style C function definitions. configure.cc gives clang on Mountain Lion (maybe on others?), so jgraph fails to compile.
Lots of warnings like this:
edit.c:683:1: warning: type specifier missing, defaults to 'int' [-Wimplicit-int] edit_hash_label(a) ^~~~~~~~~~~~~~~
and resulting errors like this:
edit.c:700:40: error: non-void function 'edit_hash_label' should return a value [-Wreturn-type] if ((s = getlabel()) == CNULL) return; ^
Adding
configure.compiler gcc
to the Portfile resolves the issue. (Alternative fix would be to patch all the old-style definitions; obviously more laborious.)
Attachments (15)
Change History (21)
comment:1 Changed 12 years ago by ryandesign (Ryan Carsten Schmidt)
Keywords: | clang added |
---|---|
Owner: | changed from macports-tickets@… to s@… |
Changed 12 years ago by stevecheckoway (Stephen Checkoway)
Attachment: | patch-draw.c.diff added |
---|
Changed 12 years ago by stevecheckoway (Stephen Checkoway)
Attachment: | patch-edit.c.diff added |
---|
Changed 12 years ago by stevecheckoway (Stephen Checkoway)
Attachment: | patch-jgraph.c.diff added |
---|
Changed 12 years ago by stevecheckoway (Stephen Checkoway)
Attachment: | patch-jgraph.h.diff added |
---|
Changed 12 years ago by stevecheckoway (Stephen Checkoway)
Attachment: | patch-list.c.diff added |
---|
Changed 12 years ago by stevecheckoway (Stephen Checkoway)
Attachment: | patch-list.h.diff added |
---|
Changed 12 years ago by stevecheckoway (Stephen Checkoway)
Attachment: | patch-makefile.diff added |
---|
Changed 12 years ago by stevecheckoway (Stephen Checkoway)
Attachment: | patch-printline.c.diff added |
---|
Changed 12 years ago by stevecheckoway (Stephen Checkoway)
Attachment: | patch-prio_list.c.diff added |
---|
Changed 12 years ago by stevecheckoway (Stephen Checkoway)
Attachment: | patch-prio_list.h.diff added |
---|
Changed 12 years ago by stevecheckoway (Stephen Checkoway)
Attachment: | patch-process.c.diff added |
---|
Changed 12 years ago by stevecheckoway (Stephen Checkoway)
Attachment: | patch-show.c.diff added |
---|
Changed 12 years ago by stevecheckoway (Stephen Checkoway)
Attachment: | patch-token.c.diff added |
---|
Changed 12 years ago by stevecheckoway (Stephen Checkoway)
comment:2 follow-up: 5 Changed 12 years ago by stevecheckoway (Stephen Checkoway)
I've uploaded a bunch of patches that allow jgraph to be compiled without error.
The new Portfile should fix ticket #36405 as well.
I've also changed my email address to match what I use for trac.
comment:3 follow-up: 4 Changed 12 years ago by mf2k (Frank Schima)
Please instead attach a unified diff of the portfile so we can see what changes you made.
Changed 12 years ago by stevecheckoway (Stephen Checkoway)
Attachment: | Portfile.diff added |
---|
comment:4 Changed 12 years ago by stevecheckoway (Stephen Checkoway)
Replying to macsforever2000@…:
Please instead attach a unified diff of the portfile so we can see what changes you made.
Done.
comment:5 Changed 12 years ago by ryandesign (Ryan Carsten Schmidt)
comment:6 Changed 12 years ago by ryandesign (Ryan Carsten Schmidt)
Resolution: | → fixed |
---|---|
Status: | new → closed |
Replying to brett.higgins@…:
On Xcode 4.2 and up.
is what we would want to put, if we cannot fix it to compile with clang.