Re: libpng 1.6.40 build failure on macOS 10.14.6 (Mojave) using Homebrew

John Bowler <[email protected]> Sun, 10 Dec 2023 14:15:45 -0800
Newsgroups gmane.comp.graphics.png.devel
Message-ID <CAP7U398eUGG8f0F-G99DUZe4Zm+zNDt=NEeG1uTf0L8_8ew==w@mail.gmail.com>
--===============5084747105870095417==
Content-Type: multipart/alternative; boundary="00000000000056e298060c2f29a3"

--00000000000056e298060c2f29a3
Content-Type: text/plain; charset="UTF-8"

> pngvalid: pngvalid: transform: +shift: caught signal: illegal instruction

It's the arguments to the C compiler that matter along with any
machine-specific stuff that was compiled in (i.e. hardware optimizations).
SIGILL means that somehow the code has executed an invalid instruction; one
not supported by the hardware.  99% of the time this is because the code
has been compiled with options to enable instructions that aren't supported
by the actual hardware.  The other % corresponds to executing a block of
memory, which would be a much more serious problem but is pretty unlikely.

The problem can be isolated by running pngvalid with the particular options
(just pngvalid --strict --transform I think but check the log) from the
test under a debugger (do *not* recompile; debug pngvalid as it is!)  In
fact pngvalid does a lot of computation of different tests so it's probably
possible to reduce the case to just one test, but that's pointless as a
first step because normally the issue will be very obvious; the debugger
will immediately identify the problem instruction and then it should be
obvious where the problem is.

John Bowler

--00000000000056e298060c2f29a3
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr"><div dir=3D"ltr">&gt;

<span style=3D"color:rgb(47,255,18);font-family:Menlo;font-size:18px;font-v=
ariant-ligatures:no-common-ligatures;background-color:rgba(0,0,0,0.9)">pngv=
alid: pngvalid: transform: +shift: caught signal: illegal instruction<br></=
span><br></div><div dir=3D"ltr">It&#39;s the arguments to the C compiler th=
at matter along with any machine-specific stuff that was compiled in (i.e. =
hardware optimizations).=C2=A0 SIGILL means that somehow the code has execu=
ted an invalid instruction; one not supported by the hardware.=C2=A0 99% of=
 the time this is because the code has been compiled with options to enable=
 instructions that aren&#39;t supported by the actual hardware.=C2=A0 The o=
ther % corresponds to executing a block of memory, which would be a much mo=
re serious problem but is pretty unlikely.</div><div dir=3D"ltr"><br></div>=
<div>The problem can be isolated by running pngvalid with the particular op=
tions (just pngvalid --strict --transform I think but check the log) from t=
he test under a debugger (do *not* recompile; debug pngvalid as it is!)=C2=
=A0 In fact pngvalid does a lot of computation of different tests so it&#39=
;s probably possible to reduce the case to just one test, but that&#39;s po=
intless as a first step because normally the issue will be very obvious; th=
e debugger will immediately identify the problem instruction and then it sh=
ould be obvious where the problem is.</div><div><br></div><div>John Bowler<=
/div></div>

--00000000000056e298060c2f29a3--


--===============5084747105870095417==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline


--===============5084747105870095417==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

_______________________________________________
png-mng-implement mailing list
png-mng-implement-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org
https://lists.sourceforge.net/lists/listinfo/png-mng-implement

--===============5084747105870095417==--