[MacPorts] #60574: MyPaint-devel @1.3.0-alpha.20160514+git.1fc6f4cc: error: use of undeclared identifier 'FALSE' 'TRUE' (was: MyPaint-devel @1.3.0-alpha.20160514+git.1fc6f4cc : Building failed)

MacPorts noreply at macports.org
Tue Jun 2 20:48:54 UTC 2020


#60574: MyPaint-devel @1.3.0-alpha.20160514+git.1fc6f4cc: error: use of undeclared
identifier 'FALSE' 'TRUE'
------------------------------------+------------------------
  Reporter:  Teyphas                |      Owner:  ryandesign
      Type:  defect                 |     Status:  accepted
  Priority:  Normal                 |  Milestone:
 Component:  ports                  |    Version:  2.6.2
Resolution:                         |   Keywords:
      Port:  MyPaint Mypaint-devel  |
------------------------------------+------------------------
Changes (by ryandesign):

 * status:  assigned => accepted


Comment:

 I haven't looked at or updated either of these ports in a very long time.
 I'm not surprised they've broken. Certainly updating the ports to the
 latest versions is the first thing that should be tried, since upstream
 may have fixed this already. #51685 is the existing ticket requesting a
 MyPaint-devel update.

 The errors in the log you attached are:

 {{{
 error: use of undeclared identifier 'FALSE'
 }}}
 {{{
 error: use of undeclared identifier 'TRUE'
 }}}

 This sounds like it could be jpeg-related problem. jpeg used to define
 `TRUE` and `FALSE` but it was incorrect for it to do so and it no longer
 does, which will cause build failures in other software that erroneously
 used these jpeg defines. See #42735 for the same problem in another port.

 The errors are coming from the embedded copy of brushlib, which is now
 known as libmypaint and is available in a separate port, which builds
 fine. The MyPaint and MyPaint-devel ports are not at new enough versions
 that they use the libmypaint port, but once they're updated they will.

 I see one report of this bug in the libmypaint repository, but it was
 closed with no action taken:

 https://github.com/mypaint/libmypaint/issues/114

 glib2 also defines `TRUE` and `FALSE` (and when not using glib2,
 libmypaint is supposed to define those itself, but maybe there is or was a
 bug). MacPorts MyPaint, MyPaint-devel and libmypaint ports already declare
 a dependency on glib2. So I'm not sure why these defines aren't there.
 Maybe the old version of MyPaint we're using forgot to `#include` the
 right header. Or maybe this suspicious code in mypaint-brush.c is the
 culprit:

 {{{
 #undef TRUE
 #undef FALSE
 }}}

 Looks like that was there to work around the bug that json-c used to
 erroneously define `TRUE` and `FALSE`. It no longer does, so current
 libmypaint no longer undefines them. Maybe it was the old version of
 json-c that we used to be using that made this code work before.

 Hopefully updating the MyPaint ports to the latest version will make the
 problem disappear.

-- 
Ticket URL: <https://trac.macports.org/ticket/60574#comment:3>
MacPorts <https://www.macports.org/>
Ports system for macOS


More information about the macports-tickets mailing list