From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp1.migadu.com ([2001:41d0:303:e16b::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms13.migadu.com with LMTPS id oM9+OY6SzGZbxQAA62LTzQ:P1 (envelope-from ) for ; Mon, 26 Aug 2024 14:34:55 +0000 Received: from aspmx1.migadu.com ([2001:41d0:303:e16b::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp1.migadu.com with LMTPS id oM9+OY6SzGZbxQAA62LTzQ (envelope-from ) for ; Mon, 26 Aug 2024 16:34:55 +0200 X-Envelope-To: larch@yhetil.org Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=riseup.net header.s=squak header.b=Du7XyXTc; spf=pass (aspmx1.migadu.com: domain of "guix-devel-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-devel-bounces+larch=yhetil.org@gnu.org"; dmarc=pass (policy=none) header.from=riseup.net ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1724682894; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post:dkim-signature; bh=gMooXLHDcbCL8lLoEy7svwkKzSXePmMSd2snsqMprfU=; b=oM16EQU06KkdCdWKGFpBOiGnb8MxnmA/pu8ydMDCHg1RaStBzGciayaOawm/lEWR3WP9d8 mSqjtFux0OF7XFd6TLVvMI5gwUxwIWJlLumB5otxeU7xZzNq6/WpW06Wkayg2LDjqqAcBX MtS3OemgVYPTn5QyEkEwZe/uX1jYUZJZDlqgZL7ljpBu/32WbP5EEJ9L3mt9GvyLCVViII ew5C2uo7JO5dIedSWWf8CEcUmkpkFEVhm8QP2rCbzYit2N7Ol7VMyB5Jv42ISRRkv5P86G JRAZw8YiyTwCJLXZLpnyWmCaE4NyBBII1IXyjQZabW5PCda+Irm83fGVyidJiA== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=riseup.net header.s=squak header.b=Du7XyXTc; spf=pass (aspmx1.migadu.com: domain of "guix-devel-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-devel-bounces+larch=yhetil.org@gnu.org"; dmarc=pass (policy=none) header.from=riseup.net ARC-Seal: i=1; s=key1; d=yhetil.org; t=1724682894; a=rsa-sha256; cv=none; b=fTFNZkG6wVIPboxlbJP6DpJ6xbepUQeYhcOkDfhmpc4FLmZKJyN99WIU9ue3JUxDPi+ja8 OEcLZWOONzYuvkyfZ8Vyga5lV3FKmuxtiEc0w8YsrZYcciXxkZf4l9ov/NnWCHNAofx4Ld 4TcrNPpqiEnc1vumNn3j05KasbVPEeHoh6OXtbJGJVIsIV1O2Lct+h5f2iOpCOjynDKxMZ G3J2je3bKwIYUMa5tLHLK48+kPltP4IxxkPH0CwcrN6oaxc6mGc3+R9ARJ2+1rGptZ8GeX D0PgqYgPqtodHHkr5XWoc5V6WFEV4dAaNGOa5dnsSIe5Kr1k7xgeZ8zkV6D2BA== Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 085553C8BF for ; Mon, 26 Aug 2024 16:34:54 +0200 (CEST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sianO-00030h-UY; Mon, 26 Aug 2024 10:34:14 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1sianM-00030G-HA for guix-devel@gnu.org; Mon, 26 Aug 2024 10:34:12 -0400 Received: from mx1.riseup.net ([198.252.153.129]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1sianK-00048w-8T; Mon, 26 Aug 2024 10:34:12 -0400 Received: from fews02-sea.riseup.net (fews02-sea-pn.riseup.net [10.0.1.112]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx1.riseup.net (Postfix) with ESMTPS id 4WstTn6NsDzDqPf; Mon, 26 Aug 2024 14:34:05 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=riseup.net; s=squak; t=1724682846; bh=7kFpTow1yoOQ9pVnPUNaGiINnuziPbhM+Hz+JwPxbvU=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=Du7XyXTc6F5Z4XmQeSZvQ07XWdivEfc/jMI15IgXh+NuW2QI7T/HaLlC99KcOfGcZ YDtXm5aPCyTCPHY1uH6jjVI18dHtjRuSluwMCkzjF7DD1ACAD7B1H3gwTfQhxEEzcG hU4LcIAECD0I5SXTKB6P2dIxGwIClZOr3G7PTRZw= X-Riseup-User-ID: F89B12C4E859202165F8593D2CA71AD4F13F5697B3BD8532D26672DC97F9DC3D Received: from [127.0.0.1] (localhost [127.0.0.1]) by fews02-sea.riseup.net (Postfix) with ESMTPSA id 4WstTm58kbzFsdq; Mon, 26 Aug 2024 14:34:04 +0000 (UTC) Date: Mon, 26 Aug 2024 11:33:56 -0300 From: =?iso-8859-1?Q?Andr=E9?= Batista To: Andreas Enge Cc: Ludovic =?iso-8859-1?Q?Court=E8s?= , guix-devel@gnu.org Subject: Re: Merging =?utf-8?B?4oCYY29yZS11cGRhdGVz?= =?utf-8?B?4oCZ?= real soon Message-ID: References: <87ikvtppye.fsf@gnu.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: Received-SPF: pass client-ip=198.252.153.129; envelope-from=nandre@riseup.net; helo=mx1.riseup.net X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: guix-devel@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-devel-bounces+larch=yhetil.org@gnu.org Sender: guix-devel-bounces+larch=yhetil.org@gnu.org X-Migadu-Country: US X-Migadu-Flow: FLOW_IN X-Migadu-Queue-Id: 085553C8BF X-Migadu-Scanner: mx13.migadu.com X-Migadu-Spam-Score: -10.49 X-Spam-Score: -10.49 X-TUID: JNN3ASPYwNOm Hi Andreas, qui 22 ago 2024 às 11:50:56 (1724338256), andreas@enge.fr enviou: > Am Wed, Aug 21, 2024 at 10:43:05PM +0200 schrieb Ludovic Courtès: > > To me, that’s the last blocker, even though there’s room for improvement > > here and there (for instance, FFmpeg currently fails to build on > > i686-linux). > > Just so that others do not have to repeat my check: ffmpeg fails to find > openal in the configure phase for i686: > ld: /tmp/guix-build-ffmpeg-6.1.1.drv-0/ffconf.FrPUM7mP/test.o: in function `check_alGetError': > test.c:(.text+0x1): undefined reference to `alGetError' > collect2: error: ld returned 1 exit status > check_lib openal AL/al.h alGetError -lopenal > check_func_headers AL/al.h alGetError -lopenal > test_ld cc -lopenal > test_cc > BEGIN /tmp/guix-build-ffmpeg-6.1.1.drv-0/ffconf.FrPUM7mP/test.c > 1 #include > 2 #include > 3 long check_alGetError(void) { return (long) alGetError; } > 4 int main(void) { int ret = 0; > 5 ret |= ((intptr_t)check_alGetError) & 0xFFFF; > 6 return ret; } > END /tmp/guix-build-ffmpeg-6.1.1.drv-0/ffconf.FrPUM7mP/test.c > This is not the whole story. ffmpeg's configure script tries different library search paths incantations and this error refers to when it tries with no command line arguments. On some other tries it actually finds openal and alGetError, but then it aborts with the following linking error: ld: /tmp/guix-build-ffmpeg-6.1.1.drv-0/ffconf.fLOeyoSu/test.o: non-canonical reference to canonical protected function `alGetError' in /gnu/store/j4qdsqxb95yllkby0w2dx6d9lib24zmn-openal-1.23.1/lib/libopenal.so ld: failed to set dynamic section sizes: bad value collect2: error: ld returned 1 exit status Searching for it, it seems this was previously a runtime error, that now fails at compile time[1] and is due to the pointer type cast when referencing alGetError on line 5 above and the segmented memory model of x86. Notice that this code snippet is run for all libraries and on the ones I've checked that have no issues linking the protection is default: $ LANG=C readelf -a /gnu/store/3b65jkdm5ip7j9j0xarzpp8iyqfgq0m7-x265-3.5/lib/libx265.so.199 | grep x265_api_get 827: 0009d500 322 FUNC GLOBAL DEFAULT 12 x265_api_get_199 or $ LANG=C readelf -a /gnu/store/8f9irjzk1zcg8z97p4zw239hnqn0plqk-xvid-1.3.7/lib/libxvidcore.so.4.3 | grep xvid_global 33: 00015790 4010 FUNC GLOBAL DEFAULT 12 xvid_global while on openal it is 'protected': $ LANG=C readelf -a /gnu/store/j4qdsqxb95yllkby0w2dx6d9lib24zmn-openal-1.23.1/lib/libopenal.so.1.23.1 | grep alGetErro 000fd45c 0000f001 R_386_32 00026a80 alGetError 240: 00026a80 246 FUNC GLOBAL PROTECTED 12 alGetError Since, however, pointer equality is not needed as the above code only tries to check if it can get a non null pointer to the given function and the code is not meant to be run, I believe it would be safe in this case to bypass this safety check[2] and force configure to succeed (we already now that openal was found). So I've bypassed this check here by adding a 'true' clause and then it configures and builds fine. However, when running tests it fails the checkasm_audiodsp test with the following error: checkasm: using random seed 3387428695 SSE: - audiodsp.audiodsp [OK] SSE2: - audiodsp.audiodsp [OK] SSSE3: audiodsp.vector_clip_int32_ssse3 (audiodsp.c:112) - audiodsp.audiodsp [FAILED] checkasm: 1 of 4 tests have failed threads=1 This _could_ be a hardware error here, but line 112 of audiodsp.c is also doing some pointer comparison and, well it's doing some audio vector thingy so afaik it could also be related. So what I'm tending to now is to create a separate openal-for-ffmpeg package definition, patching its CMakeLists.txt at line 350 whe it tries to check if gcc has protected or default visibility support, remove that setting and conditionaly enable this alternate package when building on i686. Does that make sense? I'll try that and report back if no one shows a better solution[3]. Cheers, 1. https://sourceware.org/bugzilla/show_bug.cgi?id=28875 2. https://sourceware.org/bugzilla/show_bug.cgi?id=29512 3. AKA, is there a similar simple and effetive test for dynamic symbols that does not rely on pointer references?