Re: FreeRadius SQL driver undefined symbol __aeabi_uidivmod

Panagiotis Atmatzidis <[email protected]>
Newsgroups gmane.os.freebsd.devel.arm
Message-ID <[email protected]>

> On 17 Dec 2023, at 8:41 AM, Panagiotis Atmatzidis <[email protected]> wrote:
> 
> Hello,
> 
> I’m trying to setup FreeRadius3 on RPi2 (armv6) running FreeBSD-13.2. I’m using MySQL as a backend because it runs nicely on a low resource hardware.
> 
> Enabling the SQL driver yields the following error:
> 
> ```
> 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 “sql"
> ```
> 
> 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?
> 
> I used “pkg” to install "mysql80-server" and "freeradius3-mysql“, however I have the ports collection installed so I could use that if it helps.
> 
> Kind regards,
> 
> P.
> 
> 
> [^1]: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=271087
> [^2]: https://bugs.freebsd.org/bugzilla/attachment.cgi?bugid=271087&action=viewall
> 

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” 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
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.