From nobody Sun Dec 17 07:35:10 2023 X-Original-To: freebsd-arm@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4StF9S3r1Rz54F68 for ; Sun, 17 Dec 2023 07:35:24 +0000 (UTC) (envelope-from atma@convalesco.org) Received: from out5-smtp.messagingengine.com (out5-smtp.messagingengine.com [66.111.4.29]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4StF9R4NXyz4Tny for ; Sun, 17 Dec 2023 07:35:23 +0000 (UTC) (envelope-from atma@convalesco.org) Authentication-Results: mx1.freebsd.org; dkim=pass header.d=convalesco.org header.s=fm1 header.b=sjPwsfMD; dkim=pass header.d=messagingengine.com header.s=fm2 header.b="flgiD/ro"; spf=pass (mx1.freebsd.org: domain of atma@convalesco.org designates 66.111.4.29 as permitted sender) smtp.mailfrom=atma@convalesco.org; dmarc=pass (policy=reject) header.from=convalesco.org Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailout.nyi.internal (Postfix) with ESMTP id 508425C0102 for ; Sun, 17 Dec 2023 02:35:23 -0500 (EST) Received: from mailfrontend2 ([10.202.2.163]) by compute1.internal (MEProxy); Sun, 17 Dec 2023 02:35:23 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=convalesco.org; h=cc:content-type:content-type:date:date:from:from:in-reply-to :in-reply-to:message-id:mime-version:references:reply-to:subject :subject:to:to; s=fm1; t=1702798523; x=1702884923; bh=PV3ihMFSn4 vyyKxo3e9VgesoXeFSDWCzAKozFAbkSHE=; b=sjPwsfMDFPjmbNUm3CPBY9N4L6 NmN+/MaK991AuXFZc3Ks3tBGEfzOxFz9Xc4oANJzJUxKISuz202QRhtkWEyTpa6J FvMz9b98imIGXKHFYflXO+WlBw6no45AX3jY8oUmsxYvLb7WavfuJkunzldbTwAu 5d9URQLngiFOYjKR3GZ/5diVU0gkIUgSzBzpavZ0zH4NJzyane+TSxrb7E4KYETy iwU3Pcoeyyqu57GpivIkstskalpn5WOA7SVXb95aKPosQdnIbwUAwARhp+k9n0SP Ja6kHRueT1Q8Zs/MGUiY0/i8pnTO83abW+OCEP5V58WeXmGjLTqtMZLkUFNQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-type:content-type:date:date :feedback-id:feedback-id:from:from:in-reply-to:in-reply-to :message-id:mime-version:references:reply-to:subject:subject:to :to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s= fm2; t=1702798523; x=1702884923; bh=PV3ihMFSn4vyyKxo3e9VgesoXeFS DWCzAKozFAbkSHE=; b=flgiD/roIbf0l6EP4v9rR8w/8MGXsKiP+4wVgsnmJKie 7WVKZm53Z07NdkpDPU8Q1tBFqDiTBAkt16nvZ0TmA44v2WPUVty3VQ5d+Dsb4iG/ 5rZuJ/yZwUQ2IImVQvdHOlBBEII/qruthkQuUbYac+HMYpCeeow6+lGCAEX+wrlh 88hdQW2peYnnybgdyv7brovL8rP6cTXhZdIyUXk7KqkA/Srgvqka1+aGcjFwqrwl c1/DbSl1xh2KCakiRdMtidspJ3T153o0ylzYj2IvFdgxTe0mweDjsJxa7vbNkw/W gudCRLSe8oTpTy/cM4OvwuQ9/tx7+wA1aq5xlbsRcQ== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvkedrvddthedguddutdcutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfgh necuuegrihhlohhuthemuceftddtnecunecujfgurhephfgtggfuffhfvfgjkffosegrtd hmrehhtdejnecuhfhrohhmpefrrghnrghgihhothhishcutehtmhgrthiiihguihhsuceo rghtmhgrsegtohhnvhgrlhgvshgtohdrohhrgheqnecuggftrfgrthhtvghrnhepueefue ffvedujedvvdejgfdvudduvedugeeftedtieevkeeileehgfejgfejieefnecuffhomhgr ihhnpehfrhgvvggsshgurdhorhhgnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrg hmpehmrghilhhfrhhomheprghtmhgrsegtohhnvhgrlhgvshgtohdrohhrgh X-ME-Proxy: Feedback-ID: if8a042fc:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA for ; Sun, 17 Dec 2023 02:35:22 -0500 (EST) From: Panagiotis Atmatzidis Content-Type: multipart/alternative; boundary="Apple-Mail=_BB2B61D2-0678-49F0-B1F6-6A955D67B861" List-Id: Porting FreeBSD to ARM processors List-Archive: https://lists.freebsd.org/archives/freebsd-arm List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-arm@freebsd.org Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3731.700.6\)) Subject: Re: FreeRadius SQL driver undefined symbol __aeabi_uidivmod Date: Sun, 17 Dec 2023 09:35:10 +0200 References: <5331A126-5DF4-4758-A607-31F23DD5C5B7@convalesco.org> To: freebsd-arm@freebsd.org In-Reply-To: <5331A126-5DF4-4758-A607-31F23DD5C5B7@convalesco.org> Message-Id: X-Mailer: Apple Mail (2.3731.700.6) X-Spamd-Result: default: False [-4.00 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; NEURAL_HAM_LONG(-1.00)[-1.000]; NEURAL_HAM_SHORT(-1.00)[-1.000]; MV_CASE(0.50)[]; DMARC_POLICY_ALLOW(-0.50)[convalesco.org,reject]; RWL_MAILSPIKE_EXCELLENT(-0.40)[66.111.4.29:from]; R_SPF_ALLOW(-0.20)[+ip4:66.111.4.29]; R_DKIM_ALLOW(-0.20)[convalesco.org:s=fm1,messagingengine.com:s=fm2]; RCVD_IN_DNSWL_LOW(-0.10)[66.111.4.29:from]; MIME_GOOD(-0.10)[multipart/alternative,text/plain]; FROM_HAS_DN(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; ARC_NA(0.00)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; PREVIOUSLY_DELIVERED(0.00)[freebsd-arm@freebsd.org]; DWL_DNSWL_NONE(0.00)[messagingengine.com:dkim]; ASN(0.00)[asn:19151, ipnet:66.111.4.0/24, country:US]; RCVD_TLS_LAST(0.00)[]; RCVD_COUNT_THREE(0.00)[3]; TO_DN_NONE(0.00)[]; MID_RHS_MATCH_FROM(0.00)[]; DKIM_TRACE(0.00)[convalesco.org:+,messagingengine.com:+]; MIME_TRACE(0.00)[0:+,1:+,2:~]; FROM_EQ_ENVFROM(0.00)[]; RCPT_COUNT_ONE(0.00)[1]; MLMMJ_DEST(0.00)[freebsd-arm@freebsd.org] X-Rspamd-Queue-Id: 4StF9R4NXyz4Tny X-Spamd-Bar: --- --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 = 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

On 17 = Dec 2023, at 8:41 AM, Panagiotis Atmatzidis <atma@convalesco.org> = wrote:

Hello,

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.

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 = =E2=80=9Csql"
```

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 =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.

Kind = regards,

P.


[^1]: https:= //bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D271087
[^2]:&n= bsp;https://bugs.freebsd.org/bugzilla/attachment.cgi?bugid=3D271087&ac= tion=3Dviewall


= 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--