#60574 closed defect (fixed)
MyPaint-devel @1.3.0-alpha.20160514+git.1fc6f4cc: error: use of undeclared identifier 'FALSE' 'TRUE'
Reported by: | Teyphas (Teymur) | Owned by: | ryandesign (Ryan Carsten Schmidt) |
---|---|---|---|
Priority: | Normal | Milestone: | |
Component: | ports | Version: | 2.6.2 |
Keywords: | Cc: | ||
Port: | MyPaint Mypaint-devel |
Description (last modified by Teyphas (Teymur))
Both ports (MyPaint-devel @1.3.0-alpha.20160514+git.1fc6f4cc) and (MyPaint @1.2.1) are failing to build. Can someone take a look and fix them if possible? Thanks for attention.
Attachments (1)
Change History (11)
Changed 4 years ago by Teyphas (Teymur)
comment:1 Changed 4 years ago by Teyphas (Teymur)
Description: | modified (diff) |
---|---|
Port: | Mypaint-devel added; 1.3.0-alpha.20160514+git.1fc6f4cc 1.2.1 removed |
Summary: | MyPaint @1.3.0-alpha.20160514+git.1fc6f4cc : Building failed → MyPaint-devel @1.3.0-alpha.20160514+git.1fc6f4cc : Building failed |
comment:2 Changed 4 years ago by mf2k (Frank Schima)
Cc: | ryandesign removed |
---|---|
Owner: | set to ryandesign |
Status: | new → assigned |
comment:3 Changed 4 years ago by ryandesign (Ryan Carsten Schmidt)
Status: | assigned → accepted |
---|---|
Summary: | MyPaint-devel @1.3.0-alpha.20160514+git.1fc6f4cc : Building failed → MyPaint-devel @1.3.0-alpha.20160514+git.1fc6f4cc: error: use of undeclared identifier 'FALSE' 'TRUE' |
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.
comment:4 Changed 4 years ago by ryandesign (Ryan Carsten Schmidt)
Yes I think this problem arose when json-c was updated from 0.13-20171207 to 0.14-20200419 because json-c removed the defines on 20171223.
comment:5 follow-up: 6 Changed 4 years ago by ryandesign (Ryan Carsten Schmidt)
If I fix that it builds but does not run because we're now using swig4 and that doesn't work right. See the problem and the fix. But rather than backport that to the old version we have I'll try to update the ports to 2.0.1.
comment:6 Changed 4 years ago by ryandesign (Ryan Carsten Schmidt)
Replying to ryandesign:
I'll try to update the ports to 2.0.1.
I have updates to libmypaint, mypaint-brushes, gimp2, gimp2-devel, gimp3-devel, MyPaint and MyPaint-devel done locally, the only problem is that the updated mypaint doesn't launch at all so I can't commit them yet. Hopefully there will be an easy fix for that and then I can commit these updates.
comment:7 follow-up: 8 Changed 4 years ago by ryandesign (Ryan Carsten Schmidt)
Turns out it's just an incompatibility with py-gobject3 and python38. It might be fixed if we update py-gobject3 to the latest version. I can make MyPaint use python37 until then. I'm going to take a break now and commit the MyPaint updates tomorrow.
comment:8 Changed 4 years ago by Teyphas (Teymur)
Replying to ryandesign:
Turns out it's just an incompatibility with py-gobject3 and python38. It might be fixed if we update py-gobject3 to the latest version. I can make MyPaint use python37 until then. I'm going to take a break now and commit the MyPaint updates tomorrow.
Appreciate it, Ryan. I really do. I'm casual user, and I don't understand many things here, but I just loved how fast MyPaint port worked before. And those errors really brought me down. Thank you for looking into this, whether it will be successful or not.
comment:9 Changed 4 years ago by ryandesign (Ryan Carsten Schmidt)
Resolution: | → fixed |
---|---|
Status: | accepted → closed |
Main.log from macports with failing build information.