From nobody Sun Jun 22 15:10:57 2025 X-Original-To: freebsd-ports@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 4bQF6b61Dxz5yqtT for ; Sun, 22 Jun 2025 15:11:35 +0000 (UTC) (envelope-from freebsd@walstatt-de.de) Received: from smtp6.goneo.de (smtp6.goneo.de [IPv6:2001:1640:5::8:31]) (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 4bQF6b1z85z3wV3 for ; Sun, 22 Jun 2025 15:11:35 +0000 (UTC) (envelope-from freebsd@walstatt-de.de) Authentication-Results: mx1.freebsd.org; none Received: from hub1.goneo.de (hub1.goneo.de [IPv6:2001:1640:5::8:52]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by smtp6.goneo.de (Postfix) with ESMTPS id 0C872240DFB; Sun, 22 Jun 2025 17:11:28 +0200 (CEST) Received: from hub1.goneo.de (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by hub1.goneo.de (Postfix) with ESMTPS id 6AA24240491; Sun, 22 Jun 2025 17:11:26 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=walstatt-de.de; s=DKIM001; t=1750605086; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=4wb6CG3LkEfcCaft62scepgGLzgCQKI8rs+A1SEIreI=; b=lFOK4I2WQ9d2lXfYvMB1P7MusParnBytQWNUqV5NuPFdHPHo03fRMRvRju7imAZl1Byq6t DlwlNgrzqzctggeT0vcnWAADep+oh+Dz/4i69F9TNjrbfAn0Gmb46Gnf0IZYLhAWX5ivCT GtgBBoT86W3gHpdVJQKItZIFQx6CkkONLw8MoQJj0+zxS3AEr8/w7pJVpaZMSLbcE55cGc s3xcD6oBmacmveyIzQqinbiZvPY3AEDRkT297D5ekIK0mOMsIpi6BRXYkZsYQdSn22h6Bs iZPztwhIrurVr0Rd+GbVhsSRi8zcRRS7+iHLtlDSIpVCVj7Ggv0dFL180YyCUg== Received: from thor.sb211.local (dynamic-2a02-3100-195d-e402-e03d-4007-408b-047e.310.pool.telefonica.de [IPv6:2a02:3100:195d:e402:e03d:4007:408b:47e]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (prime256v1) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by hub1.goneo.de (Postfix) with ESMTPSA id 169BD240258; Sun, 22 Jun 2025 17:11:26 +0200 (CEST) Date: Sun, 22 Jun 2025 17:10:57 +0200 From: A FreeBSD User To: Guido Falsi Cc: FreeBSD Ports Subject: Re: net/asterisk22: Illegal instruction Message-ID: <20250622171124.3ce0c6d8@thor.sb211.local> In-Reply-To: References: <20250621141656.2b7572e5@thor.sb211.local> <20250622145242.7840523a@thor.sb211.local> List-Id: Porting software to FreeBSD List-Archive: https://lists.freebsd.org/archives/freebsd-ports List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: freebsd-ports@freebsd.org Sender: owner-freebsd-ports@FreeBSD.org MIME-Version: 1.0 Content-Type: multipart/signed; boundary="Sig_/Moi2LxKHl9y/Q+5LLp1Dwy4"; protocol="application/pgp-signature"; micalg=pgp-sha512 X-Rspamd-UID: f4584f X-Rspamd-UID: 6f18a3 X-Rspamd-Queue-Id: 4bQF6b1z85z3wV3 X-Spamd-Bar: ---- X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:25394, ipnet:2001:1640::/32, country:DE] --Sig_/Moi2LxKHl9y/Q+5LLp1Dwy4 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: quoted-printable Am Tage des Herren Sun, 22 Jun 2025 15:14:08 +0200 Guido Falsi schrieb: > On 6/22/25 14:52, A FreeBSD User wrote: > > Am Tage des Herren Sat, 21 Jun 2025 15:16:40 +0200 > > Guido Falsi schrieb: > > =20 > >> On 6/21/25 14:17, A FreeBSD User wrote: =20 > >>> Hello, > >>> > >>> After a recent upgrade of a 14-STABLE (14.3-STABLE #0 n271755-ef36018= 3df81: Sat Jun 21 > >>> 11:23:41 CEST 2025 amd64) appliance and net/asterisk22 (poudriere bui= ld, builder host is > >>> also 14-STABLE, just for the record) the asteriks binzry quits with > >>> > >>> Illegal instruction (platform: PCEngine APU4C2, hw.model: AMD GX-412T= C SOC). > >>> > >>> Does anybody see this issue, too? > >>> > >>> =20 > >> > >> If I understand correctly you are building binaries yourself. =20 > >=20 > > That is correct. > > =20 > >> > >> Do you use any optimization options, especially -march and similar one= s? =20 > >=20 > > I;m not aware of using optimizations on net/asterisk* ports themselfs b= ut I have made a > > "make rmconfig config" recently due to the same thought as of yours. On= net/asterisk, I > > haven't changed anything within the past few months, but I also do not = track versions, my > > fault - so the statement is a kind of useless. I also have no clue abou= t faulty > > optimizations in adjacent/required ports like those mutually transcribi= ng codecs which are > > candidates for vectore unit optimizations, I guess. What happened is: I= exchanged my > > builder platform from Intel based, much outdated Xeon Ivybridge to rece= nt AMD Zen 5 based > > equipment. While in the bureau an older dual socket Intel Xeon perform= s the same task > > without problems, first guess is a problem with compiling AMD Zen5 code= . =20 >=20 > The change in build CPU could definitely be relat4ed to what you're seein= g. >=20 > > =20 > >> > >> The error could be caused by a binary optimized for a newer arch > >> supporting features (so instructions) not supported by the actual CPU > >> you're using. > >> > >> It is quite possible that with the same optimizations the previous > >> version used to work and the newer one does not. Maybe the code in the > >> old version did not cause the compiler to output any instructions not > >> compatible with your CPU, while some code in the new version does. > >> > >> > >> This is just one possibility though, maybe there are more possible cau= ses. > >> =20 > > That possibility sounds reasonable, see my comment on the hardware vend= or change of the > > CPU. I disabled all optimization flags as far I got a handle on them an= d/or being aware > > of, so the host is just right now a complete new repository for 14-STAB= LE. It did not help > > just disabling the optimization flag on both net/asterisk20 and net/ast= erisk22 (both > > suffer from the same issue). Will report back. =20 >=20 > Check make.conf for any options. Also, build logs usually have compiler=20 > command lines, check those for any "-m" options, like "-mnative". If you= =20 > have anything similar you should make them go away, but discovering what= =20 > is adding those to the command line could be challenging. >=20 > But I forgot asterisk has an "OPTIMIZED_CFLAGS" option. >=20 > Looking at the Makefile that is most probably your problem, with that=20 > flag asterisk is adding the "-mnative" option (or something equivalent=20 > and will optimize for the CPU it is building on, taking advantage of all= =20 > its features, so the resulting binary could fail like yours on another=20 > machine with a "simpler"(less featureful) CPU. >=20 Just an update on the matter: disabling (explicitely) the "OPTIMIZED_CFLAGS= " option on both net/asterisk20 and net/asterisk/22 solved the problem for me. But simply di= sabling and recompiling didn't do the trick alone, I also "cleaned" up the whole repo a= nd started from scratch - it took its time. Maybe also a small change in the 14-STABLE envi= ronment also did the salvation, I do not know. Lesson learned. Next time I take away all opt= imizations before complaining ... ;-) Kind regards and thanks, Oliver --=20 A FreeBSD user --Sig_/Moi2LxKHl9y/Q+5LLp1Dwy4 Content-Type: application/pgp-signature Content-Description: OpenPGP digital signature -----BEGIN PGP SIGNATURE----- iHUEARYKAB0WIQRQheDybVktG5eW/1Kxzvs8OqokrwUCaFgdHAAKCRCxzvs8Oqok r14EAP9uBy5b6qUaYW4V3rFhR6n0Fy39iO91MIvJdr6yp/HOawEAkT/QzLA038FV J0x34movR89lY5qPBwUoYjMcJKLiGg4= =kZ0E -----END PGP SIGNATURE----- --Sig_/Moi2LxKHl9y/Q+5LLp1Dwy4--