[MacPorts] #36397: jgraph-8.3 fails to compile with clang

MacPorts noreply at macports.org
Sun Sep 30 15:51:39 PDT 2012


#36397: jgraph-8.3 fails to compile with clang
-----------------------------+--------------------------------
 Reporter:  brett.higgins@…  |      Owner:  macports-tickets@…
     Type:  defect           |     Status:  new
 Priority:  Normal           |  Milestone:
Component:  ports            |    Version:  2.1.2
 Keywords:                   |       Port:  jgraph
-----------------------------+--------------------------------
 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.)

-- 
Ticket URL: <https://trac.macports.org/ticket/36397>
MacPorts <http://www.macports.org/>
Ports system for Mac OS


More information about the macports-tickets mailing list