Cannot build GNU APL with PNG-only support

15 Views Asked by At

On macos 10.15 Intel, I build GNU APL from SVN 1757 with PNG support, but without X and GTK.

The command knows about the png and zlib libraries:

$ ldd /usr/local/bin/apl 
/usr/local/bin/apl:
    /usr/lib/libsqlite3.dylib (compatibility version 9.0.0, current version 308.5.0)
    /usr/local/lib/libpng16.16.dylib (compatibility version 58.0.0, current version 58.0.0)
    /usr/lib/libz.1.dylib (compatibility version 1.0.0, current version 1.2.11)
    /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1281.100.1)
    /usr/lib/libncurses.5.4.dylib (compatibility version 5.4.0, current version 5.4.0)
    /usr/lib/libc++.1.dylib (compatibility version 1.0.0, current version 902.1.0)

I run APL and try to read a png file:

      p ← ⎕png 'test.png'
SYNTAX ERROR+
      p←⎕PNG 'test.png'
        ^
      )more
Bad luck. The system function ⎕PNG has raised a SYNTAX ERROR even though the
syntax used was correct. The real reason for the SYNTAX ERROR was that a
library or header file on which ⎕PNG depends:
    ... 
    ... etc. etc. messages appropriate for a Linux system
    ...
The possibly missing (or disabled) libraries needed by ⎕PNG were: libpng.so libgtk-3.so

Ah, so now we see that PNG support relies on both libpng and libgtk.
Why?
If all I want to do is read and write PNG files, why do I need GTK also?
Doesn't the libpng library do that for us?
Is there a way to get GNU APL to use the png library without X11/GTK?
Thanks!

1

There are 1 best solutions below

0
aMike On

The good news is that SVN Revision 1763 has adjusted quad-png so folks w/o X11 can read/write PNG files. Also, on macos 'configure' detects the PCRE2 and FFTW libraries. So, now we can build apl with sqlite, png, fftw, pcre2 together. Thank you Jürgen!