Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 17 Dec 2023 09:35:10 +0200
From:      Panagiotis Atmatzidis <atma@convalesco.org>
To:        freebsd-arm@freebsd.org
Subject:   Re: FreeRadius SQL driver undefined symbol __aeabi_uidivmod
Message-ID:  <EAFBDD77-92BA-40CC-8458-F1ED08DB7A6C@convalesco.org>
In-Reply-To: <5331A126-5DF4-4758-A607-31F23DD5C5B7@convalesco.org>
References:  <5331A126-5DF4-4758-A607-31F23DD5C5B7@convalesco.org>

next in thread | previous in thread | raw e-mail | index | archive | help

--Apple-Mail=_BB2B61D2-0678-49F0-B1F6-6A955D67B861
Content-Transfer-Encoding: quoted-printable
Content-Type: text/plain;
	charset=utf-8



> On 17 Dec 2023, at 8:41 AM, Panagiotis Atmatzidis =
<atma@convalesco.org> wrote:
>=20
> Hello,
>=20
> I=E2=80=99m trying to setup FreeRadius3 on RPi2 (armv6) running =
FreeBSD-13.2. I=E2=80=99m using MySQL as a backend because it runs =
nicely on a low resource hardware.
>=20
> Enabling the SQL driver yields the following error:
>=20
> ```
> Could not link driver rlm_sql_mysql: /usr/local/lib/libunwind.so.8: =
Undefined symbol "__aeabi_uidivmod"
> Make sure it (and all its dependent libraries!) are in the search path =
of your system's ld
> /usr/local/etc/raddb/mods-enabled/sql[27]: Instantiation failed for =
module =E2=80=9Csql"
> ```
>=20
> There is a discussion in bugtraq[^1] about this exact issue and there =
seems to be a patch as well[^2]. Can someone help me apply this patch or =
point me to a tutorial?
>=20
> I used =E2=80=9Cpkg=E2=80=9D to install "mysql80-server" and =
"freeradius3-mysql=E2=80=9C, however I have the ports collection =
installed so I could use that if it helps.
>=20
> Kind regards,
>=20
> P.
>=20
>=20
> [^1]: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D271087
> [^2]: =
https://bugs.freebsd.org/bugzilla/attachment.cgi?bugid=3D271087&action=3Dv=
iewall
>=20

Going through a similar request[^1] in the forums and a bit of  browsing =
the kernel tree helped figure things out. Sharing the solution =
step-by-step for posterity.

Copy the patch (diff file) and place the patch to the home dir e.g. " =
/home/atma/arithmetic_symbols.patch=E2=80=9D and then then:

```
[root@aeschylus /usr/src]# cd /usr/src
[root@aeschylus /usr/src]# patch -C < =
/home/atma/arithmetic_symbols.patch
Hmm...  Looks like a unified diff to me...
The text leading up to this was:
--------------------------
|diff --git a/lib/libgcc_s/Versions.def b/lib/libgcc_s/Versions.def
|index d28e9042f744..b90bc705e3de 100644
|--- a/lib/libgcc_s/Versions.def
|+++ b/lib/libgcc_s/Versions.def
--------------------------
Patching file lib/libgcc_s/Versions.def using Plan A...
Hunk #1 succeeded at 32 (offset 1 line).
Hmm...  The next patch looks like a unified diff to me...
The text leading up to this was:
--------------------------
|diff --git a/lib/libgcc_s/arm/Symbol.map b/lib/libgcc_s/arm/Symbol.map
|index 92b54761d810..49b0820b2a73 100644
|--- a/lib/libgcc_s/arm/Symbol.map
|+++ b/lib/libgcc_s/arm/Symbol.map
--------------------------
Patching file lib/libgcc_s/arm/Symbol.map using Plan A...
Hunk #1 succeeded at 16 (offset 1 line).
done
```

--
Panagiotis (atmosx) Atmatzidis
GPG:       gpg --keyserver pgp.mit.edu --recv-keys 1A7BFEC5






--Apple-Mail=_BB2B61D2-0678-49F0-B1F6-6A955D67B861
Content-Transfer-Encoding: quoted-printable
Content-Type: text/html;
	charset=utf-8

<html><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;"><br><div><br><blockquote type=3D"cite"><div>On 17 =
Dec 2023, at 8:41 AM, Panagiotis Atmatzidis &lt;atma@convalesco.org&gt; =
wrote:</div><br class=3D"Apple-interchange-newline"><div><meta =
http-equiv=3D"content-type" content=3D"text/html; charset=3Dutf-8"><div =
style=3D"overflow-wrap: break-word; -webkit-nbsp-mode: space; =
line-break: after-white-space;">Hello,<div><br></div><div>I=E2=80=99m =
trying to setup FreeRadius3 on RPi2 (armv6) running FreeBSD-13.2. I=E2=80=99=
m using MySQL as a backend because it runs nicely on a low resource =
hardware.</div><div><br></div><div>Enabling the SQL driver yields the =
following error:</div><div><br></div><div>```</div><div><div>Could not =
link driver rlm_sql_mysql: /usr/local/lib/libunwind.so.8: Undefined =
symbol "__aeabi_uidivmod"</div><div>Make sure it (and all its dependent =
libraries!) are in the search path of your system's =
ld</div><div>/usr/local/etc/raddb/mods-enabled/sql[27]: Instantiation =
failed for module =
=E2=80=9Csql"</div></div><div>```</div><div><br></div><div>There is a =
discussion in bugtraq[^1] about this exact issue and there seems to be a =
patch as well[^2]. Can someone help me apply this patch or point me to a =
tutorial?</div><div><br></div><div>I used =E2=80=9Cpkg=E2=80=9D to =
install "mysql80-server" and "freeradius3-mysql=E2=80=9C, however I have =
the ports collection installed so I could use that if it =
helps.</div><div><br></div><div>Kind =
regards,</div><div><br></div><div>P.</div><div><br></div><div><br></div><d=
iv>[^1]:&nbsp;<a =
href=3D"https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D271087">https:=
//bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D271087</a></div><div>[^2]:&n=
bsp;https://bugs.freebsd.org/bugzilla/attachment.cgi?bugid=3D271087&amp;ac=
tion=3Dviewall</div><div><div>
<meta =
charset=3D"UTF-8"><br></div></div></div></div></blockquote><br></div><div>=
Going through a similar request[^1] in the forums and a bit of =
&nbsp;browsing the kernel tree helped figure things out. Sharing the =
solution step-by-step for posterity.</div><div><br></div><div>Copy the =
patch (diff file) and place the patch to the home dir e.g. "<span =
style=3D"caret-color: rgb(0, 0, 0); color: rgb(0, 0, =
0);">&nbsp;</span><font =
color=3D"#000000">/home/atma/arithmetic_symbols.patch=E2=80=9D and then =
then:</font></div><div><br></div><div>```</div><div><div><span =
style=3D"caret-color: rgb(0, 0, 0); color: rgb(0, 0, =
0);">[root@aeschylus /usr/src]# cd =
/usr/src</span></div><div>[root@aeschylus /usr/src]# patch -C &lt; =
/home/atma/arithmetic_symbols.patch</div><div>Hmm... &nbsp;Looks like a =
unified diff to me...</div><div>The text leading up to this =
was:</div><div>--------------------------</div><div>|diff --git =
a/lib/libgcc_s/Versions.def b/lib/libgcc_s/Versions.def</div><div>|index =
d28e9042f744..b90bc705e3de 100644</div><div>|--- =
a/lib/libgcc_s/Versions.def</div><div>|+++ =
b/lib/libgcc_s/Versions.def</div><div>--------------------------</div><div=
>Patching file lib/libgcc_s/Versions.def using Plan A...</div><div>Hunk =
#1 succeeded at 32 (offset 1 line).</div><div>Hmm... &nbsp;The next =
patch looks like a unified diff to me...</div><div>The text leading up =
to this was:</div><div>--------------------------</div><div>|diff --git =
a/lib/libgcc_s/arm/Symbol.map =
b/lib/libgcc_s/arm/Symbol.map</div><div>|index =
92b54761d810..49b0820b2a73 100644</div><div>|--- =
a/lib/libgcc_s/arm/Symbol.map</div><div>|+++ =
b/lib/libgcc_s/arm/Symbol.map</div><div>--------------------------</div><d=
iv>Patching file lib/libgcc_s/arm/Symbol.map using Plan =
A...</div><div>Hunk #1 succeeded at 16 (offset 1 =
line).</div><div>done</div><div>```</div></div><br><div>
<meta charset=3D"UTF-8"><div dir=3D"auto" style=3D"caret-color: rgb(0, =
0, 0); color: rgb(0, 0, 0); letter-spacing: normal; text-align: start; =
text-indent: 0px; text-transform: none; white-space: normal; =
word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: =
none; overflow-wrap: break-word; -webkit-nbsp-mode: space; line-break: =
after-white-space;"><div dir=3D"auto" style=3D"caret-color: rgb(0, 0, =
0); color: rgb(0, 0, 0); letter-spacing: normal; text-align: start; =
text-indent: 0px; text-transform: none; white-space: normal; =
word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: =
none; overflow-wrap: break-word; -webkit-nbsp-mode: space; line-break: =
after-white-space;">--<br>Panagiotis (atmosx) Atmatzidis<br>GPG: &nbsp; =
&nbsp; &nbsp; gpg --keyserver pgp.mit.edu =
--recv-keys&nbsp;1A7BFEC5<br><br><br><br><br></div></div>
</div>
<br></body></html>=

--Apple-Mail=_BB2B61D2-0678-49F0-B1F6-6A955D67B861--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?EAFBDD77-92BA-40CC-8458-F1ED08DB7A6C>