Re: BXZERO undefined in libbigloo_s-4.6a.so with recent bignumber changes

Joseph Donaldson <[email protected]> Sun, 15 Sep 2024 18:53:28 +0000 (UTC)
Newsgroups gmane.lisp.scheme.bigloo
Message-ID <[email protected]>
------=_Part_8248761_273619111.1726426408797
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

 Hello, Manuel,
Please disregard my earlier report. I had improperly bootstrapped. Once I d=
id so correctly, the problem disappeared.=20

Thanks,=20
Joseph Donaldson

    On Sunday, September 15, 2024 at 11:01:47 AM PDT, Joseph Donaldson <don=
[email protected]> wrote: =20
=20
 Hello, Manuel,
With recent bignumber changes, I am seeing BXZERO undefined errors when com=
piling bdb when configured to build the full bee.=C2=A0 The error is:


Linking...


/usr/bin/ld: /home/jwd/bigloo_srcs/bigloo-1/lib/bigloo/4.6a/libbigloo_s-4.6=
a.so: undefined reference to `BXZERO'



From what I have seen, this is due to differences in the generic and gmp im=
plementations of bignumbers. The generic implementation defines and exports=
 the functions BXZERO, BXPOSITIVE, and BXNEGATIVE. The gmp implementation d=
oes not. However, when compiling the runtime library with BGL_BOOT=3D1, it =
appears we are mixing the 2 implementations, resulting in unsafe/rsa.scm be=
ing miscompiled. It rends up eferencing the function BXZERO (due to extern =
definitions in bigloo_bignumber.h) which is not defined for the GMP bignumb=
er implementation. I am not sure why this does not show up elsewhere but it=
 does surface when compiling bdb. I have not been able to find any easy wor=
karounds. My guess is that the 2 implementations need to be reworked a bit =
to have equivalent interfaces, i.e., both export BXZERO, BXPOSITIVE, and BX=
NEGATIVE or not, but maybe, there is a better way that I have not thought o=
f.
Thanks,=C2=A0Joseph Donaldson=C2=A0 =C2=A0=20
 =20
------=_Part_8248761_273619111.1726426408797
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

<html><head></head><body><div class=3D"ydpdbffd8bayahoo-style-wrap" style=
=3D"font-family:Helvetica Neue, Helvetica, Arial, sans-serif;font-size:13px=
;"><div></div>
        <div dir=3D"ltr" data-setdir=3D"false">Hello, Manuel,</div><div dir=
=3D"ltr" data-setdir=3D"false"><br></div><div dir=3D"ltr" data-setdir=3D"fa=
lse">Please disregard my earlier report. I had improperly bootstrapped. Onc=
e I did so correctly, the problem disappeared. <br></div><div dir=3D"ltr" d=
ata-setdir=3D"false"><br></div><div dir=3D"ltr" data-setdir=3D"false">Thank=
s, <br>Joseph Donaldson<br></div><div><br></div>
       =20
        </div><div id=3D"ydp1e51a6acyahoo_quoted_7061604043" class=3D"ydp1e=
51a6acyahoo_quoted">
            <div style=3D"font-family:'Helvetica Neue', Helvetica, Arial, s=
ans-serif;font-size:13px;color:#26282a;">
               =20
                <div>
                        On Sunday, September 15, 2024 at 11:01:47 AM PDT, J=
oseph Donaldson &lt;[email protected]&gt; wrote:
                    </div>
                    <div><br></div>
                    <div><br></div>
               =20
               =20
                <div><div id=3D"ydp1e51a6acyiv1029918810"><div><div style=
=3D"font-family:Helvetica Neue, Helvetica, Arial, sans-serif;font-size:13px=
;" class=3D"ydp1e51a6acyiv1029918810yahoo-style-wrap"><div dir=3D"ltr">Hell=
o, Manuel,</div><div dir=3D"ltr"><br></div><div dir=3D"ltr">With recent big=
number changes, I am seeing BXZERO undefined errors when compiling bdb when=
 configured to build the full bee.&nbsp; The error is:<br></div><div dir=3D=
"ltr"><br></div><div dir=3D"ltr"><div><blockquote>Linking...<br></blockquot=
e><blockquote>/usr/bin/ld: /home/jwd/bigloo_srcs/bigloo-1/lib/bigloo/4.6a/l=
ibbigloo_s-4.6a.so: undefined reference to `BXZERO'<br><br></blockquote><br=
></div>From what I have seen, this is due to differences in the generic and=
 gmp implementations of bignumbers. The generic implementation defines and =
exports the functions BXZERO, BXPOSITIVE, and BXNEGATIVE. The gmp implement=
ation does not. However, when compiling the runtime library with BGL_BOOT=
=3D1, it appears we are mixing the 2 implementations, resulting in unsafe/r=
sa.scm being miscompiled. It rends up eferencing the function BXZERO (due t=
o extern definitions in bigloo_bignumber.h) which is not defined for the GM=
P bignumber implementation. I am not sure why this does not show up elsewhe=
re but it does surface when compiling bdb. I have not been able to find any=
 easy workarounds. My guess is that the 2 implementations need to be rework=
ed a bit to have equivalent interfaces, i.e., both export BXZERO, BXPOSITIV=
E, and BXNEGATIVE or not, but maybe, there is a better way that I have not =
thought of.</div><div dir=3D"ltr"><br></div><div dir=3D"ltr">Thanks,&nbsp;<=
/div><div dir=3D"ltr">Joseph Donaldson&nbsp; &nbsp; <br></div></div></div><=
/div></div>
            </div>
        </div></body></html>
------=_Part_8248761_273619111.1726426408797--