planetmaker wrote: ↑06 Feb 2020 13:08
I noticed that some of the sub-repos will need some changes to actually build - at least with the toolchain I currently have on this machine. Probably not a big deal, but will need doing before making changes, I guess. Feel free to make pull-requests... or request repository access.
No PRs or patches yet (I'm still figuring out hg), but some issues I've noticed, with solutions:
- SHELL=/bin/bash doesn't work on NixOS. This is probably not an issue on other linuxes, though, and can be fixed on the command line by invoking with `make SHELL=$(whence bash)`, so it's likely not worth fixing.
- findversion.sh uses "python", but uses a py2-only API, so it fails on modern systems where "python" is py3; replacing it with an explicit call to python2 fixes it, thus:
Code: Select all
sed -E -i 's,python -c,python2 -c,' findversion.sh */findversion.sh
- Some of the Makefiles have NML ?= "$(shell which nmlc 2>/dev/null)"; this is bad because if nmlc is in PATH it's just a more roundabout way of doing NML ?= nmlc (which some of the other Makefiles do already), and if it's not the enclosing quotes break some error checking later in the file! At minimum the quotes need to be removed. Quick sed hack:
Code: Select all
sed -E -i 's,"\$\(shell which nmlc 2>/dev/null\)",nmlc,g' Makefile */Makefile
That's as far as I can get without having nmlc installed, which is probably not happening tonight. Ok, that was a lie, I've got nmlc working now. If you are building it from source you may need to edit
nml/version_info.py and replace all references to
Image.VERSION with
Image.PILLOW_VERSION; if you have it prepackaged it is presumably either using an older version of PIL/Pillow where .VERSION still works or has been patched accordingly by the packager.
Now that I have nmlc installed, it's able to compile the landscapes, albeit with some warnings about tile animation. The build of the houses fails because it misuses unix2dos in trying to build the docs; it assumes that
unix2dos -q --version 2>/dev/null will be silent, but it's not, --version outputs the version info on stdout, and it barfs. Quick and dirty fix:
Code: Select all
sed -E -i 's,^UNIX2DOS_FLAGS,UNIX2DOS_FLAGS ?= -q,' Makefile */Makefile
This will fail on any system where unix2dos does not accept "-q" but at least works on systems where it does. A better fix might be to replace the
2>/dev/null with
>/dev/null 2>&1.
With that change made `make` runs to completion and spits out a bunch of GRFs; hopefully that'll be enough to get it working for you, too, although there seems to be a lot of fragile and not very portable stuff in these Makefiles. :/