Re: gprolog-1.5.0 fails to compile on Linux/Debian/Trixie/x86-64 (or Ubuntu 24)

Daniel Diaz <[email protected]> Tue, 2 Dec 2025 18:16:29 +0100
Newsgroups gmane.comp.gnu.prolog.bugs
Message-ID <[email protected]>
--Apple-Mail=_AAEBCA29-FB36-405D-AD37-297AFD34439A
Content-Transfer-Encoding: quoted-printable
Content-Type: text/plain;
	charset=utf-8

Hi Basile,

This problem is reported as a GitHub issue #82: =
https://github.com/didoudiaz/gprolog/issues/82 (BTW is not preferable to =
report bugs as issues in GitHub).

A fixed will be soon pushed on GitHub (BTW: I plan to release a new =
stable version soon).

Daniel


> Le 26 nov. 2025 =C3=A0 12:29, Basile Starynkevitch =
<[email protected]> a =C3=A9crit :
>=20
> Hello
>=20
>=20
> (cd ../TopComp; make gplc)
> make[2]: Entering directory '/usr/src/Lang/gprolog-1.5.0/src/TopComp'
> gcc  -fno-strict-aliasing -fcommon -O2 -g -Wall -Wno-char-subscripts =
-o gplc top_comp.c -lm
> make[2]: Leaving directory '/usr/src/Lang/gprolog-1.5.0/src/TopComp'
> make[1]: Leaving directory '/usr/src/Lang/gprolog-1.5.0/src/EnginePl'
> . ./SETVARS;for i in EnginePl TopComp Wam2Ma Ma2Asm Linedit BipsPl =
Pl2Wam Fd2C EngineFD BipsFD;do (cd $i; make) || exit 1; done;\
> (cd TopComp; make top-level) || exit 1;\
> (cd Pl2Wam; make stage2)
> make[1]: Entering directory '/usr/src/Lang/gprolog-1.5.0/src/EnginePl'
> gcc  -fno-strict-aliasing -fcommon -O2 -g -Wall -Wno-char-subscripts  =
-o cpp_headers cpp_headers.c
> gplc -c -C '-O2 -g -Wall -Wno-char-subscripts' machine.c
> gplc -c -C '-O2 -g -Wall -Wno-char-subscripts' machine1.c
> gplc -c -C '-O2 -g -Wall -Wno-char-subscripts' stacks_sigsegv.c
> stacks_sigsegv.c:470:1: error: conflicting types for =
=E2=80=98SIGSEGV_Handler=E2=80=99; have =E2=80=98void(int,  siginfo_t *, =
void *)=E2=80=99
>  470 | SIGSEGV_Handler(int sig, siginfo_t *sip, void *scp)
>      | ^~~~~~~~~~~~~~~
> stacks_sigsegv.c:140:13: note: previous declaration of =
=E2=80=98SIGSEGV_Handler=E2=80=99 with type =E2=80=98void(void)=E2=80=99
>  140 | static void SIGSEGV_Handler();
>      |             ^~~~~~~~~~~~~~~
> compilation failed
> make[1]: *** [Makefile:29: stacks_sigsegv.o] Error 1
> make[1]: Leaving directory '/usr/src/Lang/gprolog-1.5.0/src/EnginePl'
> make: *** [Makefile:45: all] Error 1
>=20
>=20
>=20
> I believe that to fix that bug (for GCC 15 or GCC trunk on =
Linux/Debian/ ...) the line stacks_sigsegv.c:140
> should contain:
>=20
> static void SIGSEGV_Handler(int, siginfo_t*, void*);
>=20
>=20
> --=20
>=20
> Basile STARYNKEVITCH                    basile AT starynkevitch DOT =
net
> 8 rue de la Fa=C3=AFencerie                       =
http://starynkevitch.net/Basile/ =20
> 92340 Bourg-la-Reine                         =
https://github.com/bstarynk
> France                                =
https://github.com/RefPerSys/RefPerSys
>                  https://orcid.org/0000-0003-0908-5250
>=20


--Apple-Mail=_AAEBCA29-FB36-405D-AD37-297AFD34439A
Content-Transfer-Encoding: quoted-printable
Content-Type: text/html;
	charset=utf-8

<html aria-label=3D"message body"><head><meta http-equiv=3D"content-type" =
content=3D"text/html; charset=3Dutf-8"></head><body =
style=3D"overflow-wrap: break-word; -webkit-nbsp-mode: space; =
line-break: after-white-space;">Hi Basile,<br><div><br></div><div>This =
problem is reported as a GitHub issue #82:&nbsp;<a =
href=3D"https://github.com/didoudiaz/gprolog/issues/82">https://github.com=
/didoudiaz/gprolog/issues/82</a>&nbsp;(BTW is not preferable to report =
bugs as issues in GitHub).<br =
id=3D"lineBreakAtBeginningOfMessage"><div><br></div><div>A fixed will be =
soon pushed on GitHub (BTW: I plan to release a new stable version =
soon).</div><div><br></div><div>Daniel</div></div><div><br></div><div><br>=
<blockquote type=3D"cite"><div>Le 26 nov. 2025 =C3=A0 12:29, Basile =
Starynkevitch &lt;[email protected]&gt; a =C3=A9crit :</div><br =
class=3D"Apple-interchange-newline"><div><div>Hello<br><br><br>(cd =
../TopComp; make gplc)<br>make[2]: Entering directory =
'/usr/src/Lang/gprolog-1.5.0/src/TopComp'<br>gcc =
&nbsp;-fno-strict-aliasing -fcommon -O2 -g -Wall -Wno-char-subscripts -o =
gplc top_comp.c -lm<br>make[2]: Leaving directory =
'/usr/src/Lang/gprolog-1.5.0/src/TopComp'<br>make[1]: Leaving directory =
'/usr/src/Lang/gprolog-1.5.0/src/EnginePl'<br>. ./SETVARS;for i in =
EnginePl TopComp Wam2Ma Ma2Asm Linedit BipsPl Pl2Wam Fd2C EngineFD =
BipsFD;do (cd $i; make) || exit 1; done;\<br>(cd TopComp; make =
top-level) || exit 1;\<br>(cd Pl2Wam; make stage2)<br>make[1]: Entering =
directory '/usr/src/Lang/gprolog-1.5.0/src/EnginePl'<br>gcc =
&nbsp;-fno-strict-aliasing -fcommon -O2 -g -Wall -Wno-char-subscripts =
&nbsp;-o cpp_headers cpp_headers.c<br>gplc -c -C '-O2 -g -Wall =
-Wno-char-subscripts' machine.c<br>gplc -c -C '-O2 -g -Wall =
-Wno-char-subscripts' machine1.c<br>gplc -c -C '-O2 -g -Wall =
-Wno-char-subscripts' stacks_sigsegv.c<br>stacks_sigsegv.c:470:1: error: =
conflicting types for =E2=80=98SIGSEGV_Handler=E2=80=99; have =
=E2=80=98void(int, &nbsp;siginfo_t *, void *)=E2=80=99<br> &nbsp;470 | =
SIGSEGV_Handler(int sig, siginfo_t *sip, void *scp)<br> =
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;| =
^~~~~~~~~~~~~~~<br>stacks_sigsegv.c:140:13: note: previous declaration =
of =E2=80=98SIGSEGV_Handler=E2=80=99 with type =E2=80=98void(void)=E2=80=99=
<br> &nbsp;140 | static void SIGSEGV_Handler();<br> =
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;| =
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;^~=
~~~~~~~~~~~~~<br>compilation failed<br>make[1]: *** [Makefile:29: =
stacks_sigsegv.o] Error 1<br>make[1]: Leaving directory =
'/usr/src/Lang/gprolog-1.5.0/src/EnginePl'<br>make: *** [Makefile:45: =
all] Error 1<br><br><br><br>I believe that to fix that bug (for GCC 15 =
or GCC trunk on Linux/Debian/ ...) the line =
stacks_sigsegv.c:140<br>should contain:<br><br>static void =
SIGSEGV_Handler(int, siginfo_t*, void*);<br><br><br>-- <br><br>Basile =
STARYNKEVITCH =
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&n=
bsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;basile AT starynkevitch DOT =
net<br>8 rue de la Fa=C3=AFencerie =
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&n=
bsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;http://starynkev=
itch.net/Basile/ &nbsp;<br>92340 Bourg-la-Reine =
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&n=
bsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;http=
s://github.com/bstarynk<br>France =
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&n=
bsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbs=
p;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;https://github.com/RefPerSys/RefPerS=
ys<br> =
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&n=
bsp;&nbsp;&nbsp;&nbsp;&nbsp;https://orcid.org/0000-0003-0908-5250<br><br><=
/div></div></blockquote></div><br></body></html>=

--Apple-Mail=_AAEBCA29-FB36-405D-AD37-297AFD34439A--