vectorgraphics / asymptote

2D & 3D TeX-Aware Vector Graphics Language
https://asymptote.sourceforge.io/
GNU General Public License v3.0
542 stars 90 forks source link

icons.qrc are now broken: pyrcc5: No such file or directory #365

Closed barracuda156 closed 1 year ago

barracuda156 commented 1 year ago
make: Entering directory `/opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_graphics_asymptote/asymptote/work/asymptote-2.84'
pyrcc5 GUI/res/icons.qrc -o GUI/icons_rc.py
make: posix_spawn: pyrcc5: No such file or directory
make: Leaving directory `/opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_graphics_asymptote/asymptote/work/asymptote-2.84'
Command failed:  cd "/opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_graphics_asymptote/asymptote/work/asymptote-2.84" && /usr/bin/make -j2 -w all 
Exit code: 2

It should be either excluded, made optional or fallback provided. A similar case earlier was handled like this: https://github.com/vectorgraphics/asymptote/commit/887964b07bc000c7d840d18370cded3561bdd263

johncbowman commented 1 year ago

Makefile.in already makes this optional (and has for many years):

GUI/icons_rc.py: GUI/res/icons.qrc
    -$(PYRCC) GUI/res/icons.qrc -o GUI/icons_rc.py
make
pyrcc5 GUI/res/icons.qrc -o GUI/icons_rc.py
make: pyrcc5: No such file or directory
make: [Makefile:228: GUI/icons_rc.py] Error 127 (ignored)
barracuda156 commented 1 year ago

However the build fails on this, it is not ignored. Manual solution with touch that you recommended works, but that cannot be a solution for Macports (for which I am trying to update asymptote to current version).

johncbowman commented 1 year ago

I tested that the Makefile (which was not recently changed) works correctly with GNU Make 3.81 on Big Sur for the x86_64 platform (Darwin kernel 20.6.0).

barracuda156 commented 1 year ago

I readily believe that it works correctly on some configurations. But maybe make an explicit config option, so that it works correctly for everyone?

johncbowman commented 1 year ago

If you post your Makefile.in and the generated Makefile perhaps it will become clear why the hyphen is disappearing in your case.

In any case, ignoring pyrcc5 is only a last resort for incomplete build environments. If you are building from git for other users, you should install pyrcc5 so that you can generate the files necessary to run xasy.

In the next asymptote-2.85.src.tgz release we will pregenerate icons_rc.py like we do for the GUI/pyUIClass/*.py files, so that will provide an alternative solution for you.

barracuda156 commented 1 year ago

I will post, but tomorrow, off computer now, late night here.

From what I understand pyrcc5 requires Qt5: we would appreciate having either a fallback to Qt4-based solution or an alternative (even if functionality will be somewhat limited then). Qt5+ is one thing which is unlikely to ever be fixed for macOS PPC. No one has time to deal with it. Qt4 and X11 is what we have on PPC, and we support those systems. (Of course, for new MacOS versions we can enable Qt5 or Qt6 as an option.)

P. S. I don’t really expect anyone to take pain to ensure backwards compatibility with Qt4, but having an option to turn off fancy graphics would do.

johncbowman commented 1 year ago

Qt5 is already optional: it is only needed if you want to use the xasy front end to asy. So there's nothing that needs to be turned off (and now that we pregenerate the icons, pyrcc5 won't be needed in the future, as long as you build from a release).