davidgiven / cpmish

An open source sort-of CP/M 2.2 distribution.
http://cowlark.com/cpmish
Other
344 stars 37 forks source link

Build failing on macOS with "error: image must be a multiple of 6 pixels across" #31

Closed wyan closed 4 years ago

wyan commented 4 years ago
[1/28] .obj/arch/nc200/utils/fontconvert/fontconvert .obj/...x7font.png > .obj/arch/nc200/supervisor/font_inc/font.inc
FAILED: .obj/arch/nc200/supervisor/font_inc/font.inc
.obj/arch/nc200/utils/fontconvert/fontconvert .obj/utils/6x7font/6x7font.png > .obj/arch/nc200/supervisor/font_inc/font.inc
error: image must be a multiple of 6 pixels across
[2/28] .obj/arch/brotherop2/utils/fontconvert/fontconvert ...font/6x7font.png > .obj/arch/brotherop2/font_inc/font.inc
FAILED: .obj/arch/brotherop2/font_inc/font.inc
.obj/arch/brotherop2/utils/fontconvert/fontconvert .obj/utils/6x7font/6x7font.png > .obj/arch/brotherop2/font_inc/font.inc
error: image must be a multiple of 6 pixels across
[3/28] .obj/arch/wp2450ds/utils/fontconvert/fontconvert .o...x7font/6x7font.png > .obj/arch/wp2450ds/font_inc/font.inc
FAILED: .obj/arch/wp2450ds/font_inc/font.inc
.obj/arch/wp2450ds/utils/fontconvert/fontconvert .obj/utils/6x7font/6x7font.png > .obj/arch/wp2450ds/font_inc/font.inc
error: image must be a multiple of 6 pixels across
[4/28] .obj/utils/objectifyc/objectifyc < .obj/utils/emu/b...bdos.cim > .obj/utils/emu/biosbdos_cim_h/biosbdos_cim_h.h
ninja: build stopped: subcommand failed.
davidgiven commented 4 years ago

Huh, weird. Unfortunately I don't have an OSX machine, and Homebrew doesn't have libz80ex so I can't use that to do OSX cpmish builds... so why is this working fine on Linux? For me, the script produces an image 48 pixels wide, and with your change the image becomes 52 pixels wide. Is the OSX version of pbmtext producing a different sized image?

wyan commented 4 years ago

It is weird! But I had to do that change to get a 48 pixel wide image, otherwise it was cutting off the last column, so the OSX version of pbmtext must be doing something different (or maybe I have a spurious config file somewhere? I need to check). In the meantime, perhaps it's of interest to you that I created a homebrew tap to install libz80ex and the Amsterdam compiler kit, they both needed minor modifications to build on OSX so I've forked them.

davidgiven commented 4 years ago

Could you attach a copy of the image that script produces (with the original -19 value)? I can't just change it to -15 because that'll break Linux --- I need to figure out why it's doing this...

Re homebrew tap: yes please for libz80ex; how do I use it? Re the ACK: it should actually build on OSX. I have a CI setup for it on OSX and it builds there: https://travis-ci.org/github/davidgiven/ack/jobs/646622199 What did you need to change?

wyan commented 4 years ago

This is the image being generated: 6x7font I'd be tempted to either make the -15/-19 selected via environment or to include the image, but then I tend to be lazy ;-)

To install libz80ex from the tap you can retrieve the tap with brew tap wyan/retro and then install with brew install libz80ex.

My bad, the only change I needed to do to ACK was to get the prefix from the environment in the Makefile, this was just to add it as a homebrew formula (available in the same tap as libz80ex as tack, since ack was already taken).

jcs commented 4 years ago

I get the same problem on OpenBSD. Perhaps it's your netpbm version? OpenBSD is at 10.91.00.

davidgiven commented 4 years ago

That seems kinda likely. I'm using the Debian version, which is 2:10.0-15.3, which looks like it got forked off the version at netpbm.sf.net at 10.0 in 2004 (!). I think I'm going to have to write my own font renderer.

jcs commented 4 years ago

FWIW netpbm is very much maintained (I just reported a double-free in pbmtext 2 days ago and the author fixed it and rolled a new release yesterday), so it might be easier just to find a proper package of netpbm on Debian.

davidgiven commented 4 years ago

Ah. It's not 10.0. It's 9.25.

But if you use Debian or Ubuntu, note that their Netpbm package is essentially Netpbm 9.25 from 2002, minus a bunch of unimportant programs. Also note that the Debian version numbering is not consistent with Sourceforge Netpbm, so a program may appear to be from e.g. Sourceforge Netpbm 10.0, but is actually 9.25. In 2002, Debian decided for various reasons not to distribute regular Netpbm and instead created its own variation of it. That variation was too hard to update with ongoing development on the main branch of Netpbm, so no one has done so. Ubuntu is based on Debian. There is a Debian bug report and a Ubuntu bug report about this. The Debian bug report was opened in 2006 and something updating the Debian package to current Sourceforge Netpbm was uploaded somewhere in June 2017; it will presumably be in Debian and Ubuntu releases soon. (The foregoing is so as of September 2017).

(From http://netpbm.sourceforge.net/getting_netpbm.php)

I have found 2:10.78.05-0.1 in the experimental Debian distribution... which was uploaded in 2017. Hmm.